2019-05-19 15:07:45 +03:00
# SPDX-License-Identifier: GPL-2.0-only
2017-10-25 10:03:49 +03:00
#
# For a description of the syntax of this configuration file,
2019-06-12 20:52:48 +03:00
# see Documentation/kbuild/kconfig-language.rst.
2017-10-25 10:03:49 +03:00
#
config NDS32
2019-03-11 16:18:46 +03:00
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 11:18:49 +03:00
select ARCH_32BIT_OFF_T
2019-04-28 22:28:38 +03:00
select ARCH_HAS_DMA_PREP_COHERENT
2018-05-28 10:55:35 +03:00
select ARCH_HAS_SYNC_DMA_FOR_CPU
select ARCH_HAS_SYNC_DMA_FOR_DEVICE
2017-10-25 10:03:49 +03:00
select ARCH_WANT_FRAME_POINTERS if FTRACE
select CLKSRC_MMIO
select CLONE_BACKWARDS
select COMMON_CLK
2019-04-28 22:28:38 +03:00
select DMA_DIRECT_REMAP
2017-10-25 10:03:49 +03:00
select GENERIC_ATOMIC64
select GENERIC_CPU_DEVICES
select GENERIC_IRQ_CHIP
select GENERIC_IRQ_SHOW
2019-08-13 12:52:20 +03:00
select GENERIC_IOREMAP
2018-06-14 17:28:52 +03: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 10:03:49 +03: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 06:14:34 +03:00
select HAVE_EXIT_THREAD
2017-10-25 10:03:49 +03: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 05:24:15 +03:00
select HAVE_PERF_EVENTS
2017-10-25 10:03:49 +03: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 05:45:59 +03:00
select HAVE_FUNCTION_TRACER
2018-08-15 05:53:04 +03:00
select HAVE_FUNCTION_GRAPH_TRACER
2018-08-15 05:57:16 +03:00
select HAVE_FTRACE_MCOUNT_RECORD
2018-08-15 06:00:08 +03:00
select HAVE_DYNAMIC_FTRACE
2020-09-03 17:22:35 +03:00
select SET_FS
2017-10-25 10:03:49 +03:00
help
Andes(nds32) Linux support.
config GENERIC_CALIBRATE_DELAY
def_bool y
config GENERIC_CSUM
2019-03-11 16:18:46 +03:00
def_bool y
2017-10-25 10:03:49 +03:00
config GENERIC_HWEIGHT
2019-03-11 16:18:46 +03:00
def_bool y
2017-10-25 10:03:49 +03:00
config GENERIC_LOCKBREAK
2019-03-11 16:18:46 +03:00
def_bool y
2019-10-15 22:18:00 +03:00
depends on PREEMPTION
2017-10-25 10:03:49 +03:00
config TRACE_IRQFLAGS_SUPPORT
def_bool y
config STACKTRACE_SUPPORT
2019-03-11 16:18:46 +03:00
def_bool y
2017-10-25 10:03:49 +03:00
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
2019-03-11 16:18:46 +03:00
def_bool y
2017-10-25 10:03:49 +03:00
config NDS32_BUILTIN_DTB
2019-03-11 16:18:46 +03:00
string "Builtin DTB"
default ""
2017-10-25 10:03:49 +03:00
help
User can use it to specify the dts of the SoC
endmenu
menu "Kernel Features"
source "kernel/Kconfig.hz"
endmenu
2018-10-24 13:14:32 +03:00
menu "Power management options"
config SYS_SUPPORTS_APM_EMULATION
bool
config ARCH_SUSPEND_POSSIBLE
def_bool y
source "kernel/power/Kconfig"
endmenu