2022-05-31 18:04:11 +08:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
config LOONGARCH
|
|
|
|
bool
|
|
|
|
default y
|
2022-08-06 15:19:32 +08:00
|
|
|
select ACPI
|
2022-07-20 18:51:24 +08:00
|
|
|
select ACPI_GENERIC_GSI if ACPI
|
2022-08-06 15:19:33 +08:00
|
|
|
select ACPI_MCFG if ACPI
|
2023-06-29 20:58:43 +08:00
|
|
|
select ACPI_PPTT if ACPI
|
2022-05-31 18:04:11 +08:00
|
|
|
select ACPI_SYSTEM_POWER_STATES_SUPPORT if ACPI
|
|
|
|
select ARCH_BINFMT_ELF_STATE
|
|
|
|
select ARCH_ENABLE_MEMORY_HOTPLUG
|
|
|
|
select ARCH_ENABLE_MEMORY_HOTREMOVE
|
|
|
|
select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI
|
2023-06-14 07:39:28 +08:00
|
|
|
select ARCH_HAS_CPU_FINALIZE_INIT
|
2023-05-01 17:19:52 +08:00
|
|
|
select ARCH_HAS_FORTIFY_SOURCE
|
2022-09-29 02:21:54 +08:00
|
|
|
select ARCH_HAS_NMI_SAFE_THIS_CPU_OPS
|
2023-07-28 10:30:42 +08:00
|
|
|
select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
|
2022-05-31 18:04:11 +08:00
|
|
|
select ARCH_HAS_PTE_SPECIAL
|
|
|
|
select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
|
|
|
|
select ARCH_INLINE_READ_LOCK if !PREEMPTION
|
|
|
|
select ARCH_INLINE_READ_LOCK_BH if !PREEMPTION
|
|
|
|
select ARCH_INLINE_READ_LOCK_IRQ if !PREEMPTION
|
|
|
|
select ARCH_INLINE_READ_LOCK_IRQSAVE if !PREEMPTION
|
|
|
|
select ARCH_INLINE_READ_UNLOCK if !PREEMPTION
|
|
|
|
select ARCH_INLINE_READ_UNLOCK_BH if !PREEMPTION
|
|
|
|
select ARCH_INLINE_READ_UNLOCK_IRQ if !PREEMPTION
|
|
|
|
select ARCH_INLINE_READ_UNLOCK_IRQRESTORE if !PREEMPTION
|
|
|
|
select ARCH_INLINE_WRITE_LOCK if !PREEMPTION
|
|
|
|
select ARCH_INLINE_WRITE_LOCK_BH if !PREEMPTION
|
|
|
|
select ARCH_INLINE_WRITE_LOCK_IRQ if !PREEMPTION
|
|
|
|
select ARCH_INLINE_WRITE_LOCK_IRQSAVE if !PREEMPTION
|
|
|
|
select ARCH_INLINE_WRITE_UNLOCK if !PREEMPTION
|
|
|
|
select ARCH_INLINE_WRITE_UNLOCK_BH if !PREEMPTION
|
|
|
|
select ARCH_INLINE_WRITE_UNLOCK_IRQ if !PREEMPTION
|
|
|
|
select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE if !PREEMPTION
|
|
|
|
select ARCH_INLINE_SPIN_TRYLOCK if !PREEMPTION
|
|
|
|
select ARCH_INLINE_SPIN_TRYLOCK_BH if !PREEMPTION
|
|
|
|
select ARCH_INLINE_SPIN_LOCK if !PREEMPTION
|
|
|
|
select ARCH_INLINE_SPIN_LOCK_BH if !PREEMPTION
|
|
|
|
select ARCH_INLINE_SPIN_LOCK_IRQ if !PREEMPTION
|
|
|
|
select ARCH_INLINE_SPIN_LOCK_IRQSAVE if !PREEMPTION
|
|
|
|
select ARCH_INLINE_SPIN_UNLOCK if !PREEMPTION
|
|
|
|
select ARCH_INLINE_SPIN_UNLOCK_BH if !PREEMPTION
|
|
|
|
select ARCH_INLINE_SPIN_UNLOCK_IRQ if !PREEMPTION
|
|
|
|
select ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE if !PREEMPTION
|
2022-09-02 22:33:42 +08:00
|
|
|
select ARCH_KEEP_MEMBLOCK
|
2022-05-31 18:04:11 +08:00
|
|
|
select ARCH_MIGHT_HAVE_PC_PARPORT
|
|
|
|
select ARCH_MIGHT_HAVE_PC_SERIO
|
|
|
|
select ARCH_SPARSEMEM_ENABLE
|
2022-08-06 16:10:04 +08:00
|
|
|
select ARCH_STACKWALK
|
2022-05-31 18:04:11 +08:00
|
|
|
select ARCH_SUPPORTS_ACPI
|
|
|
|
select ARCH_SUPPORTS_ATOMIC_RMW
|
|
|
|
select ARCH_SUPPORTS_HUGETLBFS
|
2023-06-29 20:58:43 +08:00
|
|
|
select ARCH_SUPPORTS_LTO_CLANG
|
|
|
|
select ARCH_SUPPORTS_LTO_CLANG_THIN
|
2022-05-31 18:04:12 +08:00
|
|
|
select ARCH_SUPPORTS_NUMA_BALANCING
|
2022-05-31 18:04:11 +08:00
|
|
|
select ARCH_USE_BUILTIN_BSWAP
|
|
|
|
select ARCH_USE_CMPXCHG_LOCKREF
|
|
|
|
select ARCH_USE_QUEUED_RWLOCKS
|
2022-10-12 16:36:14 +08:00
|
|
|
select ARCH_USE_QUEUED_SPINLOCKS
|
2022-05-31 18:04:11 +08:00
|
|
|
select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT
|
2022-08-24 23:31:10 +08:00
|
|
|
select ARCH_WANT_LD_ORPHAN_WARN
|
2023-04-12 13:00:25 +08:00
|
|
|
select ARCH_WANT_OPTIMIZE_VMEMMAP
|
2022-05-31 18:04:11 +08:00
|
|
|
select ARCH_WANTS_NO_INSTR
|
|
|
|
select BUILDTIME_TABLE_SORT
|
|
|
|
select COMMON_CLK
|
2022-12-10 22:40:15 +08:00
|
|
|
select CPU_PM
|
2022-08-06 15:19:32 +08:00
|
|
|
select EFI
|
2022-05-31 18:04:11 +08:00
|
|
|
select GENERIC_CLOCKEVENTS
|
|
|
|
select GENERIC_CMOS_UPDATE
|
|
|
|
select GENERIC_CPU_AUTOPROBE
|
|
|
|
select GENERIC_ENTRY
|
|
|
|
select GENERIC_GETTIMEOFDAY
|
2022-10-12 16:36:14 +08:00
|
|
|
select GENERIC_IOREMAP if !ARCH_IOREMAP
|
2022-05-31 18:04:11 +08:00
|
|
|
select GENERIC_IRQ_MULTI_HANDLER
|
|
|
|
select GENERIC_IRQ_PROBE
|
|
|
|
select GENERIC_IRQ_SHOW
|
|
|
|
select GENERIC_LIB_ASHLDI3
|
|
|
|
select GENERIC_LIB_ASHRDI3
|
|
|
|
select GENERIC_LIB_CMPDI2
|
|
|
|
select GENERIC_LIB_LSHRDI3
|
|
|
|
select GENERIC_LIB_UCMPDI2
|
2022-10-12 16:36:14 +08:00
|
|
|
select GENERIC_LIB_DEVMEM_IS_ALLOWED
|
2022-05-31 18:04:11 +08:00
|
|
|
select GENERIC_PCI_IOMAP
|
|
|
|
select GENERIC_SCHED_CLOCK
|
2022-05-31 18:04:12 +08:00
|
|
|
select GENERIC_SMP_IDLE_THREAD
|
2022-05-31 18:04:11 +08:00
|
|
|
select GENERIC_TIME_VSYSCALL
|
2023-06-29 20:58:43 +08:00
|
|
|
select GENERIC_VDSO_TIME_NS
|
2022-05-31 18:04:11 +08:00
|
|
|
select GPIOLIB
|
2023-03-24 00:33:52 +08:00
|
|
|
select HAS_IOPORT
|
2022-05-31 18:04:11 +08:00
|
|
|
select HAVE_ARCH_AUDITSYSCALL
|
2023-06-29 20:58:44 +08:00
|
|
|
select HAVE_ARCH_JUMP_LABEL
|
|
|
|
select HAVE_ARCH_JUMP_LABEL_RELATIVE
|
2022-05-31 18:04:11 +08:00
|
|
|
select HAVE_ARCH_MMAP_RND_BITS if MMU
|
|
|
|
select HAVE_ARCH_SECCOMP_FILTER
|
|
|
|
select HAVE_ARCH_TRACEHOOK
|
|
|
|
select HAVE_ARCH_TRANSPARENT_HUGEPAGE
|
|
|
|
select HAVE_ASM_MODVERSIONS
|
2022-06-08 22:40:24 +08:00
|
|
|
select HAVE_CONTEXT_TRACKING_USER
|
2022-12-10 22:40:15 +08:00
|
|
|
select HAVE_C_RECORDMCOUNT
|
2023-06-29 20:58:44 +08:00
|
|
|
select HAVE_DEBUG_KMEMLEAK
|
2022-05-31 18:04:11 +08:00
|
|
|
select HAVE_DEBUG_STACKOVERFLOW
|
|
|
|
select HAVE_DMA_CONTIGUOUS
|
2022-12-10 22:40:15 +08:00
|
|
|
select HAVE_DYNAMIC_FTRACE
|
2022-12-10 22:40:16 +08:00
|
|
|
select HAVE_DYNAMIC_FTRACE_WITH_ARGS
|
2023-05-01 17:19:53 +08:00
|
|
|
select HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS
|
2022-12-10 22:40:15 +08:00
|
|
|
select HAVE_DYNAMIC_FTRACE_WITH_REGS
|
2022-10-12 16:36:20 +08:00
|
|
|
select HAVE_EBPF_JIT
|
2023-02-25 15:52:56 +08:00
|
|
|
select HAVE_EFFICIENT_UNALIGNED_ACCESS if !ARCH_STRICT_ALIGN
|
2022-05-31 18:04:11 +08:00
|
|
|
select HAVE_EXIT_THREAD
|
|
|
|
select HAVE_FAST_GUP
|
2022-12-10 22:40:15 +08:00
|
|
|
select HAVE_FTRACE_MCOUNT_RECORD
|
2023-02-25 15:52:57 +08:00
|
|
|
select HAVE_FUNCTION_ARG_ACCESS_API
|
2023-05-01 17:19:52 +08:00
|
|
|
select HAVE_FUNCTION_ERROR_INJECTION
|
2023-04-08 20:42:21 +08:00
|
|
|
select HAVE_FUNCTION_GRAPH_RETVAL if HAVE_FUNCTION_GRAPH_TRACER
|
2022-12-10 22:40:15 +08:00
|
|
|
select HAVE_FUNCTION_GRAPH_TRACER
|
|
|
|
select HAVE_FUNCTION_TRACER
|
2022-05-31 18:04:11 +08:00
|
|
|
select HAVE_GENERIC_VDSO
|
2023-02-25 15:52:57 +08:00
|
|
|
select HAVE_HW_BREAKPOINT if PERF_EVENTS
|
2022-05-31 18:04:11 +08:00
|
|
|
select HAVE_IOREMAP_PROT
|
|
|
|
select HAVE_IRQ_EXIT_ON_IRQ_STACK
|
|
|
|
select HAVE_IRQ_TIME_ACCOUNTING
|
2023-02-25 15:52:57 +08:00
|
|
|
select HAVE_KPROBES
|
2023-02-25 15:52:57 +08:00
|
|
|
select HAVE_KPROBES_ON_FTRACE
|
2023-02-25 15:52:57 +08:00
|
|
|
select HAVE_KRETPROBES
|
2022-05-31 18:04:11 +08:00
|
|
|
select HAVE_MOD_ARCH_SPECIFIC
|
|
|
|
select HAVE_NMI
|
2022-08-06 15:19:33 +08:00
|
|
|
select HAVE_PCI
|
2022-05-31 18:04:11 +08:00
|
|
|
select HAVE_PERF_EVENTS
|
2022-10-12 16:36:14 +08:00
|
|
|
select HAVE_PERF_REGS
|
|
|
|
select HAVE_PERF_USER_STACK_DUMP
|
2022-05-31 18:04:11 +08:00
|
|
|
select HAVE_REGS_AND_STACK_ACCESS_API
|
2023-06-29 20:58:44 +08:00
|
|
|
select HAVE_RETHOOK
|
2022-05-31 18:04:11 +08:00
|
|
|
select HAVE_RSEQ
|
2023-05-01 17:19:53 +08:00
|
|
|
select HAVE_SAMPLE_FTRACE_DIRECT
|
|
|
|
select HAVE_SAMPLE_FTRACE_DIRECT_MULTI
|
2022-05-31 18:04:12 +08:00
|
|
|
select HAVE_SETUP_PER_CPU_AREA if NUMA
|
2022-12-10 22:40:15 +08:00
|
|
|
select HAVE_STACKPROTECTOR
|
2022-05-31 18:04:11 +08:00
|
|
|
select HAVE_SYSCALL_TRACEPOINTS
|
|
|
|
select HAVE_TIF_NOHZ
|
2022-05-31 18:04:12 +08:00
|
|
|
select HAVE_VIRT_CPU_ACCOUNTING_GEN if !SMP
|
2022-05-31 18:04:11 +08:00
|
|
|
select IRQ_FORCED_THREADING
|
|
|
|
select IRQ_LOONGARCH_CPU
|
mm/fault: convert remaining simple cases to lock_mm_and_find_vma()
This does the simple pattern conversion of alpha, arc, csky, hexagon,
loongarch, nios2, sh, sparc32, and xtensa to the lock_mm_and_find_vma()
helper. They all have the regular fault handling pattern without odd
special cases.
The remaining architectures all have something that keeps us from a
straightforward conversion: ia64 and parisc have stacks that can grow
both up as well as down (and ia64 has special address region checks).
And m68k, microblaze, openrisc, sparc64, and um end up having extra
rules about only expanding the stack down a limited amount below the
user space stack pointer. That is something that x86 used to do too
(long long ago), and it probably could just be skipped, but it still
makes the conversion less than trivial.
Note that this conversion was done manually and with the exception of
alpha without any build testing, because I have a fairly limited cross-
building environment. The cases are all simple, and I went through the
changes several times, but...
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2023-06-25 01:55:38 +08:00
|
|
|
select LOCK_MM_AND_FIND_VMA
|
2022-08-06 15:19:32 +08:00
|
|
|
select MMU_GATHER_MERGE_VMAS if MMU
|
2022-05-31 18:04:11 +08:00
|
|
|
select MODULES_USE_ELF_RELA if MODULES
|
2022-05-31 18:04:12 +08:00
|
|
|
select NEED_PER_CPU_EMBED_FIRST_CHUNK
|
|
|
|
select NEED_PER_CPU_PAGE_FIRST_CHUNK
|
2022-12-10 22:40:05 +08:00
|
|
|
select OF
|
|
|
|
select OF_EARLY_FLATTREE
|
2022-08-06 15:19:33 +08:00
|
|
|
select PCI
|
|
|
|
select PCI_DOMAINS_GENERIC
|
|
|
|
select PCI_ECAM if ACPI
|
|
|
|
select PCI_LOONGSON
|
|
|
|
select PCI_MSI_ARCH_FALLBACKS
|
2022-08-25 19:34:59 +08:00
|
|
|
select PCI_QUIRKS
|
2022-05-31 18:04:11 +08:00
|
|
|
select PERF_USE_VMALLOC
|
|
|
|
select RTC_LIB
|
2022-08-06 15:19:32 +08:00
|
|
|
select SMP
|
2022-05-31 18:04:11 +08:00
|
|
|
select SPARSE_IRQ
|
2022-12-10 22:39:59 +08:00
|
|
|
select SYSCTL_ARCH_UNALIGN_ALLOW
|
|
|
|
select SYSCTL_ARCH_UNALIGN_NO_WARN
|
2022-05-31 18:04:11 +08:00
|
|
|
select SYSCTL_EXCEPTION_TRACE
|
|
|
|
select SWIOTLB
|
|
|
|
select TRACE_IRQFLAGS_SUPPORT
|
2022-05-31 18:04:12 +08:00
|
|
|
select USE_PERCPU_NUMA_NODE_ID
|
2022-08-06 16:10:05 +08:00
|
|
|
select USER_STACKTRACE_SUPPORT
|
2022-05-31 18:04:11 +08:00
|
|
|
select ZONE_DMA32
|
|
|
|
|
|
|
|
config 32BIT
|
|
|
|
bool
|
|
|
|
|
|
|
|
config 64BIT
|
|
|
|
def_bool y
|
|
|
|
|
2022-10-12 16:36:19 +08:00
|
|
|
config GENERIC_BUG
|
|
|
|
def_bool y
|
|
|
|
depends on BUG
|
|
|
|
|
|
|
|
config GENERIC_BUG_RELATIVE_POINTERS
|
|
|
|
def_bool y
|
|
|
|
depends on GENERIC_BUG
|
|
|
|
|
2022-05-31 18:04:11 +08:00
|
|
|
config GENERIC_CALIBRATE_DELAY
|
|
|
|
def_bool y
|
|
|
|
|
|
|
|
config GENERIC_CSUM
|
|
|
|
def_bool y
|
|
|
|
|
|
|
|
config GENERIC_HWEIGHT
|
|
|
|
def_bool y
|
|
|
|
|
|
|
|
config L1_CACHE_SHIFT
|
|
|
|
int
|
|
|
|
default "6"
|
|
|
|
|
|
|
|
config LOCKDEP_SUPPORT
|
|
|
|
bool
|
2022-08-06 16:10:04 +08:00
|
|
|
default y
|
|
|
|
|
|
|
|
config STACKTRACE_SUPPORT
|
|
|
|
bool
|
2022-05-31 18:04:11 +08:00
|
|
|
default y
|
|
|
|
|
2022-10-12 16:36:08 +08:00
|
|
|
# MACH_LOONGSON32 and MACH_LOONGSON64 are deliberately carried over from the
|
2022-05-31 18:04:11 +08:00
|
|
|
# MIPS Loongson code, to preserve Loongson-specific code paths in drivers that
|
|
|
|
# are shared between architectures, and specifically expecting the symbols.
|
|
|
|
config MACH_LOONGSON32
|
|
|
|
def_bool 32BIT
|
|
|
|
|
|
|
|
config MACH_LOONGSON64
|
|
|
|
def_bool 64BIT
|
|
|
|
|
2022-10-12 16:36:14 +08:00
|
|
|
config FIX_EARLYCON_MEM
|
|
|
|
def_bool y
|
|
|
|
|
2022-05-31 18:04:11 +08:00
|
|
|
config PAGE_SIZE_4KB
|
|
|
|
bool
|
|
|
|
|
|
|
|
config PAGE_SIZE_16KB
|
|
|
|
bool
|
|
|
|
|
|
|
|
config PAGE_SIZE_64KB
|
|
|
|
bool
|
|
|
|
|
|
|
|
config PGTABLE_2LEVEL
|
|
|
|
bool
|
|
|
|
|
|
|
|
config PGTABLE_3LEVEL
|
|
|
|
bool
|
|
|
|
|
|
|
|
config PGTABLE_4LEVEL
|
|
|
|
bool
|
|
|
|
|
|
|
|
config PGTABLE_LEVELS
|
|
|
|
int
|
|
|
|
default 2 if PGTABLE_2LEVEL
|
|
|
|
default 3 if PGTABLE_3LEVEL
|
|
|
|
default 4 if PGTABLE_4LEVEL
|
|
|
|
|
|
|
|
config SCHED_OMIT_FRAME_POINTER
|
|
|
|
bool
|
|
|
|
default y
|
|
|
|
|
2022-10-12 16:36:08 +08:00
|
|
|
config AS_HAS_EXPLICIT_RELOCS
|
|
|
|
def_bool $(as-instr,x:pcalau12i \$t0$(comma)%pc_hi20(x))
|
|
|
|
|
2023-06-29 20:58:43 +08:00
|
|
|
config AS_HAS_FCSR_CLASS
|
|
|
|
def_bool $(as-instr,movfcsr2gr \$t0$(comma)\$fcsr0)
|
|
|
|
|
2023-06-29 20:58:43 +08:00
|
|
|
config AS_HAS_LSX_EXTENSION
|
|
|
|
def_bool $(as-instr,vld \$vr0$(comma)\$a0$(comma)0)
|
|
|
|
|
|
|
|
config AS_HAS_LASX_EXTENSION
|
|
|
|
def_bool $(as-instr,xvld \$xr0$(comma)\$a0$(comma)0)
|
|
|
|
|
2022-05-31 18:04:11 +08:00
|
|
|
menu "Kernel type and options"
|
|
|
|
|
|
|
|
source "kernel/Kconfig.hz"
|
|
|
|
|
|
|
|
choice
|
|
|
|
prompt "Page Table Layout"
|
|
|
|
default 16KB_2LEVEL if 32BIT
|
|
|
|
default 16KB_3LEVEL if 64BIT
|
|
|
|
help
|
|
|
|
Allows choosing the page table layout, which is a combination
|
|
|
|
of page size and page table levels. The size of virtual memory
|
|
|
|
address space are determined by the page table layout.
|
|
|
|
|
|
|
|
config 4KB_3LEVEL
|
|
|
|
bool "4KB with 3 levels"
|
|
|
|
select PAGE_SIZE_4KB
|
|
|
|
select PGTABLE_3LEVEL
|
|
|
|
help
|
|
|
|
This option selects 4KB page size with 3 level page tables, which
|
|
|
|
support a maximum of 39 bits of application virtual memory.
|
|
|
|
|
|
|
|
config 4KB_4LEVEL
|
|
|
|
bool "4KB with 4 levels"
|
|
|
|
select PAGE_SIZE_4KB
|
|
|
|
select PGTABLE_4LEVEL
|
|
|
|
help
|
|
|
|
This option selects 4KB page size with 4 level page tables, which
|
|
|
|
support a maximum of 48 bits of application virtual memory.
|
|
|
|
|
|
|
|
config 16KB_2LEVEL
|
|
|
|
bool "16KB with 2 levels"
|
|
|
|
select PAGE_SIZE_16KB
|
|
|
|
select PGTABLE_2LEVEL
|
|
|
|
help
|
|
|
|
This option selects 16KB page size with 2 level page tables, which
|
|
|
|
support a maximum of 36 bits of application virtual memory.
|
|
|
|
|
|
|
|
config 16KB_3LEVEL
|
|
|
|
bool "16KB with 3 levels"
|
|
|
|
select PAGE_SIZE_16KB
|
|
|
|
select PGTABLE_3LEVEL
|
|
|
|
help
|
|
|
|
This option selects 16KB page size with 3 level page tables, which
|
|
|
|
support a maximum of 47 bits of application virtual memory.
|
|
|
|
|
|
|
|
config 64KB_2LEVEL
|
|
|
|
bool "64KB with 2 levels"
|
|
|
|
select PAGE_SIZE_64KB
|
|
|
|
select PGTABLE_2LEVEL
|
|
|
|
help
|
|
|
|
This option selects 64KB page size with 2 level page tables, which
|
|
|
|
support a maximum of 42 bits of application virtual memory.
|
|
|
|
|
|
|
|
config 64KB_3LEVEL
|
|
|
|
bool "64KB with 3 levels"
|
|
|
|
select PAGE_SIZE_64KB
|
|
|
|
select PGTABLE_3LEVEL
|
|
|
|
help
|
|
|
|
This option selects 64KB page size with 3 level page tables, which
|
|
|
|
support a maximum of 55 bits of application virtual memory.
|
|
|
|
|
|
|
|
endchoice
|
|
|
|
|
|
|
|
config CMDLINE
|
|
|
|
string "Built-in kernel command line"
|
|
|
|
help
|
|
|
|
For most platforms, the arguments for the kernel's command line
|
|
|
|
are provided at run-time, during boot. However, there are cases
|
|
|
|
where either no arguments are being provided or the provided
|
|
|
|
arguments are insufficient or even invalid.
|
|
|
|
|
|
|
|
When that occurs, it is possible to define a built-in command
|
|
|
|
line here and choose how the kernel should use it later on.
|
|
|
|
|
|
|
|
choice
|
|
|
|
prompt "Kernel command line type"
|
|
|
|
default CMDLINE_BOOTLOADER
|
|
|
|
help
|
|
|
|
Choose how the kernel will handle the provided built-in command
|
|
|
|
line.
|
|
|
|
|
|
|
|
config CMDLINE_BOOTLOADER
|
|
|
|
bool "Use bootloader kernel arguments if available"
|
|
|
|
help
|
|
|
|
Prefer the command-line passed by the boot loader if available.
|
|
|
|
Use the built-in command line as fallback in case we get nothing
|
|
|
|
during boot. This is the default behaviour.
|
|
|
|
|
|
|
|
config CMDLINE_EXTEND
|
|
|
|
bool "Use built-in to extend bootloader kernel arguments"
|
|
|
|
help
|
|
|
|
The command-line arguments provided during boot will be
|
|
|
|
appended to the built-in command line. This is useful in
|
|
|
|
cases where the provided arguments are insufficient and
|
|
|
|
you don't want to or cannot modify them.
|
|
|
|
|
|
|
|
config CMDLINE_FORCE
|
|
|
|
bool "Always use the built-in kernel command string"
|
|
|
|
help
|
|
|
|
Always use the built-in command line, even if we get one during
|
|
|
|
boot. This is useful in case you need to override the provided
|
|
|
|
command line on systems where you don't have or want control
|
|
|
|
over it.
|
|
|
|
|
|
|
|
endchoice
|
|
|
|
|
|
|
|
config DMI
|
|
|
|
bool "Enable DMI scanning"
|
|
|
|
select DMI_SCAN_MACHINE_NON_EFI_FALLBACK
|
|
|
|
default y
|
|
|
|
help
|
|
|
|
This enables SMBIOS/DMI feature for systems, and scanning of
|
|
|
|
DMI to identify machine quirks.
|
|
|
|
|
|
|
|
config EFI
|
|
|
|
bool "EFI runtime service support"
|
|
|
|
select UCS2_STRING
|
|
|
|
select EFI_RUNTIME_WRAPPERS
|
|
|
|
help
|
|
|
|
This enables the kernel to use EFI runtime services that are
|
|
|
|
available (such as the EFI variable services).
|
|
|
|
|
efi/loongarch: Add efistub booting support
This patch adds efistub booting support, which is the standard UEFI boot
protocol for LoongArch to use.
We use generic efistub, which means we can pass boot information (i.e.,
system table, memory map, kernel command line, initrd) via a light FDT
and drop a lot of non-standard code.
We use a flat mapping to map the efi runtime in the kernel's address
space. In efi, VA = PA; in kernel, VA = PA + PAGE_OFFSET. As a result,
flat mapping is not identity mapping, SetVirtualAddressMap() is still
needed for the efi runtime.
Tested-by: Xi Ruoyao <xry111@xry111.site>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
[ardb: change fpic to fpie as suggested by Xi Ruoyao]
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
2022-08-19 18:20:37 +08:00
|
|
|
config EFI_STUB
|
|
|
|
bool "EFI boot stub support"
|
|
|
|
default y
|
|
|
|
depends on EFI
|
|
|
|
select EFI_GENERIC_STUB
|
|
|
|
help
|
|
|
|
This kernel feature allows the kernel to be loaded directly by
|
|
|
|
EFI firmware without the use of a bootloader.
|
|
|
|
|
2023-06-29 20:58:43 +08:00
|
|
|
config SCHED_SMT
|
|
|
|
bool "SMT scheduler support"
|
|
|
|
default y
|
|
|
|
help
|
|
|
|
Improves scheduler's performance when there are multiple
|
|
|
|
threads in one physical core.
|
|
|
|
|
2022-05-31 18:04:12 +08:00
|
|
|
config SMP
|
|
|
|
bool "Multi-Processing support"
|
|
|
|
help
|
|
|
|
This enables support for systems with more than one CPU. If you have
|
|
|
|
a system with only one CPU, say N. If you have a system with more
|
|
|
|
than one CPU, say Y.
|
|
|
|
|
|
|
|
If you say N here, the kernel will run on uni- and multiprocessor
|
|
|
|
machines, but will use only one CPU of a multiprocessor machine. If
|
|
|
|
you say Y here, the kernel will run on many, but not all,
|
|
|
|
uniprocessor machines. On a uniprocessor machine, the kernel
|
|
|
|
will run faster if you say N here.
|
|
|
|
|
|
|
|
See also the SMP-HOWTO available at <http://www.tldp.org/docs.html#howto>.
|
|
|
|
|
|
|
|
If you don't know what to do here, say N.
|
|
|
|
|
|
|
|
config HOTPLUG_CPU
|
|
|
|
bool "Support for hot-pluggable CPUs"
|
|
|
|
depends on SMP
|
|
|
|
select GENERIC_IRQ_MIGRATION
|
|
|
|
help
|
|
|
|
Say Y here to allow turning CPUs off and on. CPUs can be
|
|
|
|
controlled through /sys/devices/system/cpu.
|
|
|
|
(Note: power management support will enable this option
|
|
|
|
automatically on SMP systems. )
|
|
|
|
Say N if you want to disable CPU hotplug.
|
|
|
|
|
|
|
|
config NR_CPUS
|
|
|
|
int "Maximum number of CPUs (2-256)"
|
|
|
|
range 2 256
|
|
|
|
depends on SMP
|
|
|
|
default "64"
|
|
|
|
help
|
|
|
|
This allows you to specify the maximum number of CPUs which this
|
|
|
|
kernel will support.
|
|
|
|
|
2022-05-31 18:04:12 +08:00
|
|
|
config NUMA
|
|
|
|
bool "NUMA Support"
|
LoongArch: Fix the !CONFIG_SMP build
1, We assume arch/loongarch/include/asm/smp.h be included in include/
linux/smp.h is valid and the reverse inclusion isn't. So remove the
<linux/smp.h> in arch/loongarch/include/asm/smp.h.
2, arch/loongarch/include/asm/smp.h is only needed when CONFIG_SMP,
and setup.c include it only because it need plat_smp_setup(). So,
reorganize setup.c & smp.h, and then remove <asm/smp.h> in setup.c.
3, Fix cacheinfo.c and percpu.h build error by adding the missing header
files when !CONFIG_SMP.
4, Fix acpi.c build error by adding CONFIG_SMP guards.
5, Move irq_stat definition from smp.c to irq.c and fix its declaration.
6, Select CONFIG_SMP for CONFIG_NUMA, similar as other architectures do.
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
2022-06-05 16:19:53 +08:00
|
|
|
select SMP
|
2022-05-31 18:04:12 +08:00
|
|
|
select ACPI_NUMA if ACPI
|
|
|
|
help
|
|
|
|
Say Y to compile the kernel with NUMA (Non-Uniform Memory Access)
|
|
|
|
support. This option improves performance on systems with more
|
|
|
|
than one NUMA node; on single node systems it is generally better
|
|
|
|
to leave it disabled.
|
|
|
|
|
|
|
|
config NODES_SHIFT
|
|
|
|
int
|
|
|
|
default "6"
|
|
|
|
depends on NUMA
|
|
|
|
|
2022-08-15 22:39:59 +08:00
|
|
|
config ARCH_FORCE_MAX_ORDER
|
2022-05-31 18:04:11 +08:00
|
|
|
int "Maximum zone order"
|
2023-03-15 19:31:33 +08:00
|
|
|
default "13" if PAGE_SIZE_64KB
|
|
|
|
default "11" if PAGE_SIZE_16KB
|
|
|
|
default "10"
|
2022-05-31 18:04:11 +08:00
|
|
|
help
|
|
|
|
The kernel memory allocator divides physically contiguous memory
|
|
|
|
blocks into "zones", where each zone is a power of two number of
|
|
|
|
pages. This option selects the largest power of two that the kernel
|
|
|
|
keeps in the memory allocator. If you need to allocate very large
|
|
|
|
blocks of physically contiguous memory, then you may need to
|
|
|
|
increase this value.
|
|
|
|
|
|
|
|
The page size is not necessarily 4KB. Keep this in mind
|
|
|
|
when choosing a value for this option.
|
|
|
|
|
2022-10-12 16:36:14 +08:00
|
|
|
config ARCH_IOREMAP
|
|
|
|
bool "Enable LoongArch DMW-based ioremap()"
|
|
|
|
help
|
|
|
|
We use generic TLB-based ioremap() by default since it has page
|
|
|
|
protection support. However, you can enable LoongArch DMW-based
|
|
|
|
ioremap() for better performance.
|
|
|
|
|
2023-04-18 19:38:58 +08:00
|
|
|
config ARCH_WRITECOMBINE
|
|
|
|
bool "Enable WriteCombine (WUC) for ioremap()"
|
|
|
|
help
|
|
|
|
LoongArch maintains cache coherency in hardware, but when paired
|
|
|
|
with LS7A chipsets the WUC attribute (Weak-ordered UnCached, which
|
|
|
|
is similar to WriteCombine) is out of the scope of cache coherency
|
|
|
|
machanism for PCIe devices (this is a PCIe protocol violation, which
|
|
|
|
may be fixed in newer chipsets).
|
|
|
|
|
|
|
|
This means WUC can only used for write-only memory regions now, so
|
|
|
|
this option is disabled by default, making WUC silently fallback to
|
|
|
|
SUC for ioremap(). You can enable this option if the kernel is ensured
|
|
|
|
to run on hardware without this bug.
|
|
|
|
|
|
|
|
You can override this setting via writecombine=on/off boot parameter.
|
|
|
|
|
2023-02-25 15:52:56 +08:00
|
|
|
config ARCH_STRICT_ALIGN
|
|
|
|
bool "Enable -mstrict-align to prevent unaligned accesses" if EXPERT
|
|
|
|
default y
|
|
|
|
help
|
|
|
|
Not all LoongArch cores support h/w unaligned access, we can use
|
|
|
|
-mstrict-align build parameter to prevent unaligned accesses.
|
|
|
|
|
|
|
|
CPUs with h/w unaligned access support:
|
|
|
|
Loongson-2K2000/2K3000/3A5000/3C5000/3D5000.
|
|
|
|
|
|
|
|
CPUs without h/w unaligned access support:
|
|
|
|
Loongson-2K500/2K1000.
|
|
|
|
|
|
|
|
This option is enabled by default to make the kernel be able to run
|
|
|
|
on all LoongArch systems. But you can disable it manually if you want
|
|
|
|
to run kernel only on systems with h/w unaligned access support in
|
|
|
|
order to optimise for performance.
|
|
|
|
|
2023-06-29 20:58:43 +08:00
|
|
|
config CPU_HAS_FPU
|
|
|
|
bool
|
|
|
|
default y
|
|
|
|
|
|
|
|
config CPU_HAS_LSX
|
|
|
|
bool "Support for the Loongson SIMD Extension"
|
|
|
|
depends on AS_HAS_LSX_EXTENSION
|
|
|
|
help
|
|
|
|
Loongson SIMD Extension (LSX) introduces 128 bit wide vector registers
|
|
|
|
and a set of SIMD instructions to operate on them. When this option
|
|
|
|
is enabled the kernel will support allocating & switching LSX
|
|
|
|
vector register contexts. If you know that your kernel will only be
|
|
|
|
running on CPUs which do not support LSX or that your userland will
|
|
|
|
not be making use of it then you may wish to say N here to reduce
|
|
|
|
the size & complexity of your kernel.
|
|
|
|
|
|
|
|
If unsure, say Y.
|
|
|
|
|
|
|
|
config CPU_HAS_LASX
|
|
|
|
bool "Support for the Loongson Advanced SIMD Extension"
|
|
|
|
depends on CPU_HAS_LSX
|
|
|
|
depends on AS_HAS_LASX_EXTENSION
|
|
|
|
help
|
|
|
|
Loongson Advanced SIMD Extension (LASX) introduces 256 bit wide vector
|
|
|
|
registers and a set of SIMD instructions to operate on them. When this
|
|
|
|
option is enabled the kernel will support allocating & switching LASX
|
|
|
|
vector register contexts. If you know that your kernel will only be
|
|
|
|
running on CPUs which do not support LASX or that your userland will
|
|
|
|
not be making use of it then you may wish to say N here to reduce
|
|
|
|
the size & complexity of your kernel.
|
|
|
|
|
|
|
|
If unsure, say Y.
|
|
|
|
|
|
|
|
config CPU_HAS_PREFETCH
|
|
|
|
bool
|
|
|
|
default y
|
|
|
|
|
2022-10-12 16:36:19 +08:00
|
|
|
config KEXEC
|
|
|
|
bool "Kexec system call"
|
|
|
|
select KEXEC_CORE
|
|
|
|
help
|
|
|
|
kexec is a system call that implements the ability to shutdown your
|
|
|
|
current kernel, and to start another kernel. It is like a reboot
|
|
|
|
but it is independent of the system firmware. And like a reboot
|
|
|
|
you can start any kernel with it, not just Linux.
|
|
|
|
|
|
|
|
The name comes from the similarity to the exec system call.
|
|
|
|
|
LoongArch: Add kdump support
This patch adds support for kdump. In kdump case the normal kernel will
reserve a region for the crash kernel and jump there on panic.
Arch-specific functions are added to allow for implementing a crash dump
file interface, /proc/vmcore, which can be viewed as a ELF file.
A user-space tool, such as kexec-tools, is responsible for allocating a
separate region for the core's ELF header within the crash kdump kernel
memory and filling it in when executing kexec_load().
Then, its location will be advertised to the crash dump kernel via a
command line argument "elfcorehdr=", and the crash dump kernel will
preserve this region for later use with arch_reserve_vmcore() at boot
time.
At the same time, the crash kdump kernel is also limited within the
"crashkernel" area via a command line argument "mem=", so as not to
destroy the original kernel dump data.
In the crash dump kernel environment, /proc/vmcore is used to access the
primary kernel's memory with copy_oldmem_page().
I tested kdump on LoongArch machines (Loongson-3A5000) and it works as
expected (suggested crashkernel parameter is "crashkernel=512M@2560M"),
you may test it by triggering a crash through /proc/sysrq-trigger:
$ sudo kexec -p /boot/vmlinux-kdump --reuse-cmdline --append="nr_cpus=1"
# echo c > /proc/sysrq-trigger
Signed-off-by: Youling Tang <tangyouling@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
2022-10-12 16:36:19 +08:00
|
|
|
config CRASH_DUMP
|
|
|
|
bool "Build kdump crash kernel"
|
2023-02-25 15:52:56 +08:00
|
|
|
select RELOCATABLE
|
LoongArch: Add kdump support
This patch adds support for kdump. In kdump case the normal kernel will
reserve a region for the crash kernel and jump there on panic.
Arch-specific functions are added to allow for implementing a crash dump
file interface, /proc/vmcore, which can be viewed as a ELF file.
A user-space tool, such as kexec-tools, is responsible for allocating a
separate region for the core's ELF header within the crash kdump kernel
memory and filling it in when executing kexec_load().
Then, its location will be advertised to the crash dump kernel via a
command line argument "elfcorehdr=", and the crash dump kernel will
preserve this region for later use with arch_reserve_vmcore() at boot
time.
At the same time, the crash kdump kernel is also limited within the
"crashkernel" area via a command line argument "mem=", so as not to
destroy the original kernel dump data.
In the crash dump kernel environment, /proc/vmcore is used to access the
primary kernel's memory with copy_oldmem_page().
I tested kdump on LoongArch machines (Loongson-3A5000) and it works as
expected (suggested crashkernel parameter is "crashkernel=512M@2560M"),
you may test it by triggering a crash through /proc/sysrq-trigger:
$ sudo kexec -p /boot/vmlinux-kdump --reuse-cmdline --append="nr_cpus=1"
# echo c > /proc/sysrq-trigger
Signed-off-by: Youling Tang <tangyouling@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
2022-10-12 16:36:19 +08:00
|
|
|
help
|
|
|
|
Generate crash dump after being started by kexec. This should
|
|
|
|
be normally only set in special crash dump kernels which are
|
|
|
|
loaded in the main kernel with kexec-tools into a specially
|
|
|
|
reserved region and then later executed after a crash by
|
|
|
|
kdump/kexec.
|
|
|
|
|
|
|
|
For more details see Documentation/admin-guide/kdump/kdump.rst
|
|
|
|
|
2023-02-25 15:52:56 +08:00
|
|
|
config RELOCATABLE
|
|
|
|
bool "Relocatable kernel"
|
|
|
|
help
|
|
|
|
This builds the kernel as a Position Independent Executable (PIE),
|
|
|
|
which retains all relocation metadata required, so as to relocate
|
|
|
|
the kernel binary at runtime to a different virtual address from
|
|
|
|
its link address.
|
|
|
|
|
2023-02-25 15:52:56 +08:00
|
|
|
config RANDOMIZE_BASE
|
|
|
|
bool "Randomize the address of the kernel (KASLR)"
|
|
|
|
depends on RELOCATABLE
|
|
|
|
help
|
|
|
|
Randomizes the physical and virtual address at which the
|
|
|
|
kernel image is loaded, as a security feature that
|
|
|
|
deters exploit attempts relying on knowledge of the location
|
|
|
|
of kernel internals.
|
|
|
|
|
|
|
|
The kernel will be offset by up to RANDOMIZE_BASE_MAX_OFFSET.
|
|
|
|
|
|
|
|
If unsure, say N.
|
|
|
|
|
|
|
|
config RANDOMIZE_BASE_MAX_OFFSET
|
|
|
|
hex "Maximum KASLR offset" if EXPERT
|
|
|
|
depends on RANDOMIZE_BASE
|
|
|
|
range 0x0 0x10000000
|
|
|
|
default "0x01000000"
|
|
|
|
help
|
|
|
|
When KASLR is active, this provides the maximum offset that will
|
|
|
|
be applied to the kernel image. It should be set according to the
|
|
|
|
amount of physical RAM available in the target system.
|
|
|
|
|
|
|
|
This is limited by the size of the lower address memory, 256MB.
|
|
|
|
|
2022-05-31 18:04:11 +08:00
|
|
|
config SECCOMP
|
|
|
|
bool "Enable seccomp to safely compute untrusted bytecode"
|
|
|
|
depends on PROC_FS
|
|
|
|
default y
|
|
|
|
help
|
|
|
|
This kernel feature is useful for number crunching applications
|
|
|
|
that may need to compute untrusted bytecode during their
|
|
|
|
execution. By using pipes or other transports made available to
|
|
|
|
the process as file descriptors supporting the read/write
|
|
|
|
syscalls, it's possible to isolate those applications in
|
|
|
|
their own address space using seccomp. Once seccomp is
|
|
|
|
enabled via /proc/<pid>/seccomp, it cannot be disabled
|
|
|
|
and the task is only allowed to execute a few safe syscalls
|
|
|
|
defined by each seccomp mode.
|
|
|
|
|
|
|
|
If unsure, say Y. Only embedded should say N here.
|
|
|
|
|
|
|
|
endmenu
|
|
|
|
|
|
|
|
config ARCH_SELECT_MEMORY_MODEL
|
|
|
|
def_bool y
|
|
|
|
|
|
|
|
config ARCH_FLATMEM_ENABLE
|
|
|
|
def_bool y
|
2022-05-31 18:04:12 +08:00
|
|
|
depends on !NUMA
|
2022-05-31 18:04:11 +08:00
|
|
|
|
|
|
|
config ARCH_SPARSEMEM_ENABLE
|
|
|
|
def_bool y
|
2022-10-27 20:52:51 +08:00
|
|
|
select SPARSEMEM_VMEMMAP_ENABLE
|
2022-05-31 18:04:11 +08:00
|
|
|
help
|
|
|
|
Say Y to support efficient handling of sparse physical memory,
|
|
|
|
for architectures which are either NUMA (Non-Uniform Memory Access)
|
|
|
|
or have huge holes in the physical address space for other reasons.
|
2022-06-27 14:00:26 +08:00
|
|
|
See <file:Documentation/mm/numa.rst> for more.
|
2022-05-31 18:04:11 +08:00
|
|
|
|
|
|
|
config ARCH_ENABLE_THP_MIGRATION
|
|
|
|
def_bool y
|
|
|
|
depends on TRANSPARENT_HUGEPAGE
|
|
|
|
|
|
|
|
config ARCH_MEMORY_PROBE
|
|
|
|
def_bool y
|
|
|
|
depends on MEMORY_HOTPLUG
|
|
|
|
|
|
|
|
config MMU
|
|
|
|
bool
|
|
|
|
default y
|
|
|
|
|
|
|
|
config ARCH_MMAP_RND_BITS_MIN
|
|
|
|
default 12
|
|
|
|
|
|
|
|
config ARCH_MMAP_RND_BITS_MAX
|
|
|
|
default 18
|
|
|
|
|
2023-06-29 20:58:44 +08:00
|
|
|
config ARCH_SUPPORTS_UPROBES
|
|
|
|
def_bool y
|
|
|
|
|
2022-05-31 18:04:11 +08:00
|
|
|
menu "Power management options"
|
|
|
|
|
2022-12-10 22:40:15 +08:00
|
|
|
config ARCH_SUSPEND_POSSIBLE
|
|
|
|
def_bool y
|
|
|
|
|
2022-12-10 22:40:15 +08:00
|
|
|
config ARCH_HIBERNATION_POSSIBLE
|
|
|
|
def_bool y
|
|
|
|
|
2022-12-10 22:40:15 +08:00
|
|
|
source "kernel/power/Kconfig"
|
2022-05-31 18:04:11 +08:00
|
|
|
source "drivers/acpi/Kconfig"
|
|
|
|
|
|
|
|
endmenu
|
|
|
|
|
|
|
|
source "drivers/firmware/Kconfig"
|