2017-10-25 15:03:49 +08:00
|
|
|
#
|
|
|
|
# For a description of the syntax of this configuration file,
|
|
|
|
# see Documentation/kbuild/kconfig-language.txt.
|
|
|
|
#
|
|
|
|
|
|
|
|
config NDS32
|
|
|
|
def_bool y
|
32-bit userspace ABI: introduce ARCH_32BIT_OFF_T config option
All new 32-bit architectures should have 64-bit userspace off_t type, but
existing architectures has 32-bit ones.
To enforce the rule, new config option is added to arch/Kconfig that defaults
ARCH_32BIT_OFF_T to be disabled for new 32-bit architectures. All existing
32-bit architectures enable it explicitly.
New option affects force_o_largefile() behaviour. Namely, if userspace
off_t is 64-bits long, we have no reason to reject user to open big files.
Note that even if architectures has only 64-bit off_t in the kernel
(arc, c6x, h8300, hexagon, nios2, openrisc, and unicore32),
a libc may use 32-bit off_t, and therefore want to limit the file size
to 4GB unless specified differently in the open flags.
Signed-off-by: Yury Norov <ynorov@caviumnetworks.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Yury Norov <ynorov@marvell.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2018-05-16 16:18:49 +08:00
|
|
|
select ARCH_32BIT_OFF_T
|
2018-05-28 15:55:35 +08:00
|
|
|
select ARCH_HAS_SYNC_DMA_FOR_CPU
|
|
|
|
select ARCH_HAS_SYNC_DMA_FOR_DEVICE
|
2017-10-25 15:03:49 +08:00
|
|
|
select ARCH_WANT_FRAME_POINTERS if FTRACE
|
|
|
|
select CLKSRC_MMIO
|
|
|
|
select CLONE_BACKWARDS
|
|
|
|
select COMMON_CLK
|
|
|
|
select GENERIC_ATOMIC64
|
|
|
|
select GENERIC_CPU_DEVICES
|
|
|
|
select GENERIC_CLOCKEVENTS
|
|
|
|
select GENERIC_IRQ_CHIP
|
|
|
|
select GENERIC_IRQ_SHOW
|
2018-06-14 22:28:52 +08:00
|
|
|
select GENERIC_LIB_ASHLDI3
|
|
|
|
select GENERIC_LIB_ASHRDI3
|
|
|
|
select GENERIC_LIB_CMPDI2
|
|
|
|
select GENERIC_LIB_LSHRDI3
|
|
|
|
select GENERIC_LIB_MULDI3
|
|
|
|
select GENERIC_LIB_UCMPDI2
|
2017-10-25 15:03:49 +08:00
|
|
|
select GENERIC_STRNCPY_FROM_USER
|
|
|
|
select GENERIC_STRNLEN_USER
|
|
|
|
select GENERIC_TIME_VSYSCALL
|
|
|
|
select HANDLE_DOMAIN_IRQ
|
|
|
|
select HAVE_ARCH_TRACEHOOK
|
|
|
|
select HAVE_DEBUG_KMEMLEAK
|
2018-11-22 11:14:34 +08:00
|
|
|
select HAVE_EXIT_THREAD
|
2017-10-25 15:03:49 +08:00
|
|
|
select HAVE_REGS_AND_STACK_ACCESS_API
|
nds32: Perf porting
This is the commit that porting the perf for nds32.
1.Raw event:
The raw events start with 'r'.
Usage:
perf stat -e rXYZ ./app
X: the index of performance counter.
YZ: the index(convert to hexdecimal) of events
Example:
'perf stat -e r101 ./app' means the counter 1 will count the instruction
event.
The index of counter and events can be found in
"Andes System Privilege Architecture Version 3 Manual".
Or you can perform the 'perf list' to find the symbolic name of raw events.
2.Perf mmap2:
Fix unexpected perf mmap2() page fault
When the mmap2() called by perf application,
you will encounter such condition:"failed to write."
With return value -EFAULT
This is due to the page fault caused by "reading" buffer
from the mapped legal address region to write to the descriptor.
The page_fault handler will get a VM_FAULT_SIGBUS return value,
which should not happens here.(Due to this is a read request.)
You can refer to kernel/events/core.c:perf_mmap_fault(...)
If "(vmf->pgoff && (vmf->flags & FAULT_FLAG_WRITE))" is evaluated
as true, you will get VM_FAULT_SIGBUS as return value.
However, this is not an write request. The flags which indicated
why the page fault happens is wrong.
Furthermore, NDS32 SPAv3 is not able to detect it is read or write.
It only know either it is instruction fetch or data access.
Therefore, by removing the wrong flag assignment(actually, the hardware
is not able to show the reason), we can fix this bug.
3.Perf multiple events map to same counter.
When there are multiple events map to the same counter, the counter
counts inaccurately. This is because each counter only counts one event
in the same time.
So when there are multiple events map to same counter, they have to take
turns in each context.
There are two solution:
1. Print the error message when multiple events map to the same counter.
But print the error message would let the program hang in loop. The ltp
(linux test program) would be failed when the program hang in loop.
2. Don't print the error message, the ltp would pass. But the user need to
have the knowledge that don't count the events which map to the same
counter, or the user will get the inaccurate results.
We choose method 2 for the solution
Signed-off-by: Nickhu <nickhu@andestech.com>
Acked-by: Greentime Hu <greentime@andestech.com>
Signed-off-by: Greentime Hu <greentime@andestech.com>
2018-10-25 10:24:15 +08:00
|
|
|
select HAVE_PERF_EVENTS
|
2017-10-25 15:03:49 +08:00
|
|
|
select IRQ_DOMAIN
|
|
|
|
select LOCKDEP_SUPPORT
|
|
|
|
select MODULES_USE_ELF_RELA
|
|
|
|
select OF
|
|
|
|
select OF_EARLY_FLATTREE
|
|
|
|
select NO_IOPORT_MAP
|
|
|
|
select RTC_LIB
|
|
|
|
select THREAD_INFO_IN_TASK
|
2018-08-15 10:45:59 +08:00
|
|
|
select HAVE_FUNCTION_TRACER
|
2018-08-15 10:53:04 +08:00
|
|
|
select HAVE_FUNCTION_GRAPH_TRACER
|
2018-08-15 10:57:16 +08:00
|
|
|
select HAVE_FTRACE_MCOUNT_RECORD
|
2018-08-15 11:00:08 +08:00
|
|
|
select HAVE_DYNAMIC_FTRACE
|
2017-10-25 15:03:49 +08:00
|
|
|
help
|
|
|
|
Andes(nds32) Linux support.
|
|
|
|
|
|
|
|
config GENERIC_CALIBRATE_DELAY
|
|
|
|
def_bool y
|
|
|
|
|
|
|
|
config GENERIC_CSUM
|
|
|
|
def_bool y
|
|
|
|
|
|
|
|
config GENERIC_HWEIGHT
|
|
|
|
def_bool y
|
|
|
|
|
|
|
|
config GENERIC_LOCKBREAK
|
|
|
|
def_bool y
|
|
|
|
depends on PREEMPT
|
|
|
|
|
|
|
|
config RWSEM_GENERIC_SPINLOCK
|
|
|
|
def_bool y
|
|
|
|
|
|
|
|
config TRACE_IRQFLAGS_SUPPORT
|
|
|
|
def_bool y
|
|
|
|
|
|
|
|
config STACKTRACE_SUPPORT
|
|
|
|
def_bool y
|
|
|
|
|
|
|
|
config FIX_EARLYCON_MEM
|
|
|
|
def_bool y
|
|
|
|
|
|
|
|
config PGTABLE_LEVELS
|
|
|
|
default 2
|
|
|
|
|
|
|
|
menu "System Type"
|
|
|
|
source "arch/nds32/Kconfig.cpu"
|
|
|
|
config NR_CPUS
|
|
|
|
int
|
|
|
|
default 1
|
|
|
|
|
|
|
|
config MMU
|
|
|
|
def_bool y
|
|
|
|
|
|
|
|
config NDS32_BUILTIN_DTB
|
|
|
|
string "Builtin DTB"
|
|
|
|
default ""
|
|
|
|
help
|
|
|
|
User can use it to specify the dts of the SoC
|
|
|
|
endmenu
|
|
|
|
|
|
|
|
menu "Kernel Features"
|
|
|
|
source "kernel/Kconfig.hz"
|
|
|
|
endmenu
|
2018-10-24 18:14:32 +08:00
|
|
|
|
|
|
|
menu "Power management options"
|
|
|
|
config SYS_SUPPORTS_APM_EMULATION
|
|
|
|
bool
|
|
|
|
|
|
|
|
config ARCH_SUSPEND_POSSIBLE
|
|
|
|
def_bool y
|
|
|
|
|
|
|
|
source "kernel/power/Kconfig"
|
|
|
|
endmenu
|