xref: /linux/arch/loongarch/Kconfig (revision e9ef810dfee7a2227da9d423aecb0ced35faddbe)
1fa96b57cSHuacai Chen# SPDX-License-Identifier: GPL-2.0
2fa96b57cSHuacai Chenconfig LOONGARCH
3fa96b57cSHuacai Chen	bool
4fa96b57cSHuacai Chen	default y
5f30d1f49SHuacai Chen	select ACPI
6cd057667SJianmin Lv	select ACPI_GENERIC_GSI if ACPI
757fc7323SHuacai Chen	select ACPI_MCFG if ACPI
8a02f66bbSJames Morse	select ACPI_HOTPLUG_CPU if ACPI_PROCESSOR && HOTPLUG_CPU
9f6f0c9a7SHuacai Chen	select ACPI_PPTT if ACPI
10fa96b57cSHuacai Chen	select ACPI_SYSTEM_POWER_STATES_SUPPORT	if ACPI
11fa96b57cSHuacai Chen	select ARCH_BINFMT_ELF_STATE
125aa4ac64SQing Zhang	select ARCH_DISABLE_KASAN_INLINE
13fa96b57cSHuacai Chen	select ARCH_ENABLE_MEMORY_HOTPLUG
14fa96b57cSHuacai Chen	select ARCH_ENABLE_MEMORY_HOTREMOVE
15b3ff2d9cSMasahiro Yamada	select ARCH_ENABLE_THP_MIGRATION if TRANSPARENT_HUGEPAGE
16fa96b57cSHuacai Chen	select ARCH_HAS_ACPI_TABLE_UPGRADE	if ACPI
179841c423SThomas Gleixner	select ARCH_HAS_CPU_FINALIZE_INIT
1872f51a4fSEric Biggers	select ARCH_HAS_CURRENT_STACK_POINTER
198b5db5e5SHuacai Chen	select ARCH_HAS_DEBUG_VM_PGTABLE
20614d7e99SHuacai Chen	select ARCH_HAS_FAST_MULTIPLIER
212cce9059SXi Ruoyao	select ARCH_HAS_FORTIFY_SOURCE
22d4c937c2SQing Zhang	select ARCH_HAS_KCOV
232363088eSFeiyang Chen	select ARCH_HAS_KERNEL_FPU_SUPPORT if CPU_HAS_FPU
24372f6623SSamuel Holland	select ARCH_HAS_NMI_SAFE_THIS_CPU_OPS
253f48f3d9SPaul E. McKenney	select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
26de0e30beSChenguang Zhao	select ARCH_HAS_PREEMPT_LAZY
27704f06eeSHuacai Chen	select ARCH_HAS_PTE_SPECIAL
28b7a2750eSHuacai Chen	select ARCH_HAS_SET_MEMORY
29fa96b57cSHuacai Chen	select ARCH_HAS_SET_DIRECT_MAP
30e86935f7SHuacai Chen	select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
31f04de6d8SHuacai Chen	select ARCH_HAS_UBSAN
32fa96b57cSHuacai Chen	select ARCH_HAS_VDSO_ARCH_DATA
33892a7963SYuli Wang	select ARCH_INLINE_READ_LOCK if !PREEMPTION
34d2862bb9SThomas Weißschuh	select ARCH_INLINE_READ_LOCK_BH if !PREEMPTION
35fa96b57cSHuacai Chen	select ARCH_INLINE_READ_LOCK_IRQ if !PREEMPTION
36fa96b57cSHuacai Chen	select ARCH_INLINE_READ_LOCK_IRQSAVE if !PREEMPTION
37fa96b57cSHuacai Chen	select ARCH_INLINE_READ_UNLOCK if !PREEMPTION
38fa96b57cSHuacai Chen	select ARCH_INLINE_READ_UNLOCK_BH if !PREEMPTION
39fa96b57cSHuacai Chen	select ARCH_INLINE_READ_UNLOCK_IRQ if !PREEMPTION
40fa96b57cSHuacai Chen	select ARCH_INLINE_READ_UNLOCK_IRQRESTORE if !PREEMPTION
41fa96b57cSHuacai Chen	select ARCH_INLINE_WRITE_LOCK if !PREEMPTION
42fa96b57cSHuacai Chen	select ARCH_INLINE_WRITE_LOCK_BH if !PREEMPTION
43fa96b57cSHuacai Chen	select ARCH_INLINE_WRITE_LOCK_IRQ if !PREEMPTION
44fa96b57cSHuacai Chen	select ARCH_INLINE_WRITE_LOCK_IRQSAVE if !PREEMPTION
45fa96b57cSHuacai Chen	select ARCH_INLINE_WRITE_UNLOCK if !PREEMPTION
46fa96b57cSHuacai Chen	select ARCH_INLINE_WRITE_UNLOCK_BH if !PREEMPTION
47fa96b57cSHuacai Chen	select ARCH_INLINE_WRITE_UNLOCK_IRQ if !PREEMPTION
48fa96b57cSHuacai Chen	select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE if !PREEMPTION
49fa96b57cSHuacai Chen	select ARCH_INLINE_SPIN_TRYLOCK if !PREEMPTION
50fa96b57cSHuacai Chen	select ARCH_INLINE_SPIN_TRYLOCK_BH if !PREEMPTION
51fa96b57cSHuacai Chen	select ARCH_INLINE_SPIN_LOCK if !PREEMPTION
52fa96b57cSHuacai Chen	select ARCH_INLINE_SPIN_LOCK_BH if !PREEMPTION
53fa96b57cSHuacai Chen	select ARCH_INLINE_SPIN_LOCK_IRQ if !PREEMPTION
54fa96b57cSHuacai Chen	select ARCH_INLINE_SPIN_LOCK_IRQSAVE if !PREEMPTION
55fa96b57cSHuacai Chen	select ARCH_INLINE_SPIN_UNLOCK if !PREEMPTION
56fa96b57cSHuacai Chen	select ARCH_INLINE_SPIN_UNLOCK_BH if !PREEMPTION
57fa96b57cSHuacai Chen	select ARCH_INLINE_SPIN_UNLOCK_IRQ if !PREEMPTION
58fa96b57cSHuacai Chen	select ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE if !PREEMPTION
59fa96b57cSHuacai Chen	select ARCH_KEEP_MEMBLOCK
60fa96b57cSHuacai Chen	select ARCH_MIGHT_HAVE_PC_PARPORT
61e0fba87cSHuacai Chen	select ARCH_MIGHT_HAVE_PC_SERIO
62fa96b57cSHuacai Chen	select ARCH_SPARSEMEM_ENABLE
63fa96b57cSHuacai Chen	select ARCH_STACKWALK
64fa96b57cSHuacai Chen	select ARCH_SUPPORTS_ACPI
6593a4fa62SQing Zhang	select ARCH_SUPPORTS_ATOMIC_RMW
66fa96b57cSHuacai Chen	select ARCH_SUPPORTS_HUGETLBFS
67fa96b57cSHuacai Chen	select ARCH_SUPPORTS_INT128 if CC_HAS_INT128
68fa96b57cSHuacai Chen	select ARCH_SUPPORTS_LTO_CLANG
695125d033SXi Ruoyao	select ARCH_SUPPORTS_LTO_CLANG_THIN
705a31ed46SWANG Xuerui	select ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPINGS
715a31ed46SWANG Xuerui	select ARCH_SUPPORTS_NUMA_BALANCING
72b37981ceSYuli Wang	select ARCH_SUPPORTS_RT
73d4b6f156SHuacai Chen	select ARCH_USE_BUILTIN_BSWAP
74be2ea982SHuacai Chen	select ARCH_USE_CMPXCHG_LOCKREF
75fa96b57cSHuacai Chen	select ARCH_USE_MEMTEST
76fa96b57cSHuacai Chen	select ARCH_USE_QUEUED_RWLOCKS
77fb8e9f59SYuli Wang	select ARCH_USE_QUEUED_SPINLOCKS
78fa96b57cSHuacai Chen	select ARCH_WANT_DEFAULT_BPF_JIT
795f1e001bSHuacai Chen	select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT
80d0b35b02SHuacai Chen	select ARCH_WANT_LD_ORPHAN_WARN
81fa96b57cSHuacai Chen	select ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP
821429cfdeSArd Biesheuvel	select ARCH_WANTS_NO_INSTR
830b6f1582SAneesh Kumar K.V	select ARCH_WANTS_THP_SWAP if HAVE_ARCH_TRANSPARENT_HUGEPAGE
84fa96b57cSHuacai Chen	select BUILDTIME_TABLE_SORT
85ff4a2443SHuacai Chen	select COMMON_CLK
86fa96b57cSHuacai Chen	select CPU_PM
87fa96b57cSHuacai Chen	select EDAC_SUPPORT
88366bb35aSHuacai Chen	select EFI
89558aff7aSZhao Qunqin	select GENERIC_CLOCKEVENTS
90f30d1f49SHuacai Chen	select GENERIC_CMOS_UPDATE
91fa96b57cSHuacai Chen	select GENERIC_CPU_AUTOPROBE
92fa96b57cSHuacai Chen	select GENERIC_CPU_DEVICES
93fa96b57cSHuacai Chen	select GENERIC_CPU_VULNERABILITIES
94db3ba29aSJames Morse	select GENERIC_ENTRY
95e8dd556cSTiezhu Yang	select GENERIC_GETTIMEOFDAY
96fa96b57cSHuacai Chen	select GENERIC_IOREMAP if !ARCH_IOREMAP
97fa96b57cSHuacai Chen	select GENERIC_IRQ_MATRIX_ALLOCATOR
98d2791341SHuacai Chen	select GENERIC_IRQ_MULTI_HANDLER
99ae16f05cSTianyang Zhang	select GENERIC_IRQ_PROBE
100fa96b57cSHuacai Chen	select GENERIC_IRQ_SHOW
101fa96b57cSHuacai Chen	select GENERIC_LIB_ASHLDI3
102fa96b57cSHuacai Chen	select GENERIC_LIB_ASHRDI3
103fa96b57cSHuacai Chen	select GENERIC_LIB_CMPDI2
104fa96b57cSHuacai Chen	select GENERIC_LIB_LSHRDI3
105fa96b57cSHuacai Chen	select GENERIC_LIB_UCMPDI2
106fa96b57cSHuacai Chen	select GENERIC_LIB_DEVMEM_IS_ALLOWED
107fa96b57cSHuacai Chen	select GENERIC_PCI_IOMAP
108235d074fSHuacai Chen	select GENERIC_SCHED_CLOCK
109fa96b57cSHuacai Chen	select GENERIC_SMP_IDLE_THREAD
110fa96b57cSHuacai Chen	select GENERIC_TIME_VSYSCALL
11146859ac8SHuacai Chen	select GENERIC_VDSO_DATA_STORE
112fa96b57cSHuacai Chen	select GENERIC_VDSO_TIME_NS
113d2862bb9SThomas Weißschuh	select GPIOLIB
114aa5e65dcSTiezhu Yang	select HAS_IOPORT
115fa96b57cSHuacai Chen	select HAVE_ARCH_AUDITSYSCALL
116fcbfe812SNiklas Schnelle	select HAVE_ARCH_JUMP_LABEL
117fa96b57cSHuacai Chen	select HAVE_ARCH_JUMP_LABEL_RELATIVE
118f02644e3SYouling Tang	select HAVE_ARCH_KASAN
119f02644e3SYouling Tang	select HAVE_ARCH_KFENCE
1205aa4ac64SQing Zhang	select HAVE_ARCH_KGDB if PERF_EVENTS
1216ad3df56SEnze Li	select HAVE_ARCH_KSTACK_ERASE
122e14dd076SQing Zhang	select HAVE_ARCH_MMAP_RND_BITS if MMU
123fa96b57cSHuacai Chen	select HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET
124a0f7085fSJinjie Ruan	select HAVE_ARCH_SECCOMP
1256b79ecd0SMasahiro Yamada	select HAVE_ARCH_SECCOMP_FILTER
126fa96b57cSHuacai Chen	select HAVE_ARCH_TRACEHOOK
127a45728fdSYouling Tang	select HAVE_ARCH_TRANSPARENT_HUGEPAGE
128fa96b57cSHuacai Chen	select HAVE_ARCH_USERFAULTFD_MINOR if USERFAULTFD
129fa96b57cSHuacai Chen	select HAVE_ASM_MODVERSIONS
130f48ad26eSHuacai Chen	select HAVE_CONTEXT_TRACKING_USER
131fa96b57cSHuacai Chen	select HAVE_C_RECORDMCOUNT
13224a9c541SFrederic Weisbecker	select HAVE_DEBUG_KMEMLEAK
133a0a458fbSQing Zhang	select HAVE_DEBUG_STACKOVERFLOW
1345d553770STiezhu Yang	select HAVE_DMA_CONTIGUOUS
135fa96b57cSHuacai Chen	select HAVE_DYNAMIC_FTRACE
136fa96b57cSHuacai Chen	select HAVE_DYNAMIC_FTRACE_WITH_ARGS
1374733f09dSQing Zhang	select HAVE_FTRACE_REGS_HAVING_PT_REGS
138ac7127e1SQing Zhang	select HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS
139762abbc0SMasami Hiramatsu (Google)	select HAVE_DYNAMIC_FTRACE_WITH_REGS
1409cdc3b6aSYouling Tang	select HAVE_EBPF_JIT
1418778ba2cSQing Zhang	select HAVE_EFFICIENT_UNALIGNED_ACCESS if !ARCH_STRICT_ALIGN
1425dc61552STiezhu Yang	select HAVE_EXIT_THREAD
14341596803SHuacai Chen	select HAVE_GUP_FAST
144fa96b57cSHuacai Chen	select HAVE_FTRACE_GRAPH_FUNC
14525176ad0SDavid Hildenbrand	select HAVE_FUNCTION_ARG_ACCESS_API
146a762e926SMasami Hiramatsu (Google)	select HAVE_FUNCTION_ERROR_INJECTION
147a0a458fbSQing Zhang	select HAVE_FUNCTION_GRAPH_FREGS
148356bd6f2SQing Zhang	select HAVE_FUNCTION_GRAPH_TRACER
1498b5ee2c6STiezhu Yang	select HAVE_FUNCTION_TRACER
150a3ed4157SMasami Hiramatsu (Google)	select HAVE_GCC_PLUGINS
151dbe3ba30SQing Zhang	select HAVE_GENERIC_VDSO
152dbe3ba30SQing Zhang	select HAVE_HW_BREAKPOINT if PERF_EVENTS
1532363088eSFeiyang Chen	select HAVE_IOREMAP_PROT
154fa96b57cSHuacai Chen	select HAVE_IRQ_EXIT_ON_IRQ_STACK
155edffa33cSQing Zhang	select HAVE_IRQ_TIME_ACCOUNTING
156fa96b57cSHuacai Chen	select HAVE_KPROBES
157fa96b57cSHuacai Chen	select HAVE_KPROBES_ON_FTRACE
158fa96b57cSHuacai Chen	select HAVE_KRETPROBES
1596d4cc40fSTiezhu Yang	select HAVE_LIVEPATCH
16009e679c2STiezhu Yang	select HAVE_MOD_ARCH_SPECIFIC
1613f553686STiezhu Yang	select HAVE_NMI
162199cc14cSJinyang He	select HAVE_OBJTOOL if AS_HAS_EXPLICIT_RELOCS && AS_HAS_THIN_ADD_SUB
163fa96b57cSHuacai Chen	select HAVE_PCI
164fa96b57cSHuacai Chen	select HAVE_PERF_EVENTS
165b8468bd9STiezhu Yang	select HAVE_PERF_REGS
16657fc7323SHuacai Chen	select HAVE_PERF_USER_STACK_DUMP
167fa96b57cSHuacai Chen	select HAVE_POSIX_CPU_TIMERS_TASK_WORK
168b37042b2SHuacai Chen	select HAVE_PREEMPT_DYNAMIC_KEY
169b37042b2SHuacai Chen	select HAVE_REGS_AND_STACK_ACCESS_API
170826d2af6SHuacai Chen	select HAVE_RELIABLE_STACKTRACE if UNWINDER_ORC
17180c7889dSHuacai Chen	select HAVE_RETHOOK
172fa96b57cSHuacai Chen	select HAVE_RSEQ
173199cc14cSJinyang He	select HAVE_RUST
1747b0a0964SHaoran Jiang	select HAVE_SAMPLE_FTRACE_DIRECT
175fa96b57cSHuacai Chen	select HAVE_SAMPLE_FTRACE_DIRECT_MULTI
17690868ff9SWANG Rui	select HAVE_SETUP_PER_CPU_AREA if NUMA
17722f367a6SYouling Tang	select HAVE_STACK_VALIDATION if HAVE_OBJTOOL
17822f367a6SYouling Tang	select HAVE_STACKPROTECTOR
179d4b6f156SHuacai Chen	select HAVE_SYSCALL_TRACEPOINTS
180cb8a2ef0STiezhu Yang	select HAVE_TIF_NOHZ
18109f33601SHuacai Chen	select HAVE_VIRT_CPU_ACCOUNTING_GEN
182fa96b57cSHuacai Chen	select IRQ_FORCED_THREADING
183fa96b57cSHuacai Chen	select IRQ_LOONGARCH_CPU
18408dac3b8SBibo Mao	select LOCK_MM_AND_FIND_VMA
185fa96b57cSHuacai Chen	select MMU_GATHER_MERGE_VMAS if MMU
186fa96b57cSHuacai Chen	select MODULES_USE_ELF_RELA if MODULES
187a050ba1eSLinus Torvalds	select NEED_PER_CPU_EMBED_FIRST_CHUNK
188f30d1f49SHuacai Chen	select NEED_PER_CPU_PAGE_FIRST_CHUNK
189fa96b57cSHuacai Chen	select NUMA_MEMBLKS if NUMA
190d4b6f156SHuacai Chen	select OF
191d4b6f156SHuacai Chen	select OF_EARLY_FLATTREE
192*a24f2fb7SHuacai Chen	select PCI
19388d4d957SBinbin Zhou	select PCI_DOMAINS_GENERIC
19488d4d957SBinbin Zhou	select PCI_ECAM if ACPI
19557fc7323SHuacai Chen	select PCI_LOONGSON
19657fc7323SHuacai Chen	select PCI_MSI_ARCH_FALLBACKS
19757fc7323SHuacai Chen	select PCI_QUIRKS
19857fc7323SHuacai Chen	select PERF_USE_VMALLOC
19957fc7323SHuacai Chen	select RTC_LIB
2007c12bb8fSHuacai Chen	select SPARSE_IRQ
201fa96b57cSHuacai Chen	select SYSCTL_ARCH_UNALIGN_ALLOW
202fa96b57cSHuacai Chen	select SYSCTL_ARCH_UNALIGN_NO_WARN
203fa96b57cSHuacai Chen	select SYSCTL_EXCEPTION_TRACE
20461a6fcccSHuacai Chen	select SWIOTLB
20561a6fcccSHuacai Chen	select TRACE_IRQFLAGS_SUPPORT
206fa96b57cSHuacai Chen	select USE_PERCPU_NUMA_NODE_ID
207fa96b57cSHuacai Chen	select USER_STACKTRACE_SUPPORT
208fa96b57cSHuacai Chen	select VDSO_GETRANDOM
209d4b6f156SHuacai Chen	select ZONE_DMA32
2104d7bf939SQing Zhang
21118efd0b1SXi Ruoyaoconfig 32BIT
212fa96b57cSHuacai Chen	bool
213fa96b57cSHuacai Chen
214fa96b57cSHuacai Chenconfig 64BIT
215fa96b57cSHuacai Chen	def_bool y
216fa96b57cSHuacai Chen
217fa96b57cSHuacai Chenconfig GENERIC_BUG
218fa96b57cSHuacai Chen	def_bool y
219fa96b57cSHuacai Chen	depends on BUG
2202d2c3952SYouling Tang
2212d2c3952SYouling Tangconfig GENERIC_BUG_RELATIVE_POINTERS
2222d2c3952SYouling Tang	def_bool y
2232d2c3952SYouling Tang	depends on GENERIC_BUG
2242d2c3952SYouling Tang
2252d2c3952SYouling Tangconfig GENERIC_CALIBRATE_DELAY
2262d2c3952SYouling Tang	def_bool y
2272d2c3952SYouling Tang
228fa96b57cSHuacai Chenconfig GENERIC_CSUM
229fa96b57cSHuacai Chen	def_bool y
230fa96b57cSHuacai Chen
231fa96b57cSHuacai Chenconfig GENERIC_HWEIGHT
232fa96b57cSHuacai Chen	def_bool y
233fa96b57cSHuacai Chen
234fa96b57cSHuacai Chenconfig L1_CACHE_SHIFT
235fa96b57cSHuacai Chen	int
236fa96b57cSHuacai Chen	default "6"
237fa96b57cSHuacai Chen
238fa96b57cSHuacai Chenconfig LOCKDEP_SUPPORT
239fa96b57cSHuacai Chen	bool
240fa96b57cSHuacai Chen	default y
241fa96b57cSHuacai Chen
242fa96b57cSHuacai Chenconfig STACKTRACE_SUPPORT
243fa96b57cSHuacai Chen	bool
244fa96b57cSHuacai Chen	default y
24593a4fa62SQing Zhang
24693a4fa62SQing Zhang# MACH_LOONGSON32 and MACH_LOONGSON64 are deliberately carried over from the
24793a4fa62SQing Zhang# MIPS Loongson code, to preserve Loongson-specific code paths in drivers that
24893a4fa62SQing Zhang# are shared between architectures, and specifically expecting the symbols.
2499550dfdeSColin Ian Kingconfig MACH_LOONGSON32
250fa96b57cSHuacai Chen	def_bool 32BIT
251fa96b57cSHuacai Chen
252fa96b57cSHuacai Chenconfig MACH_LOONGSON64
253fa96b57cSHuacai Chen	def_bool 64BIT
254fa96b57cSHuacai Chen
255fa96b57cSHuacai Chenconfig FIX_EARLYCON_MEM
256fa96b57cSHuacai Chen	def_bool !ARCH_IOREMAP
257fa96b57cSHuacai Chen
258d2791341SHuacai Chenconfig PGTABLE_2LEVEL
259341cf992SJiaxun Yang	bool
260d2791341SHuacai Chen
261fa96b57cSHuacai Chenconfig PGTABLE_3LEVEL
262fa96b57cSHuacai Chen	bool
263fa96b57cSHuacai Chen
264fa96b57cSHuacai Chenconfig PGTABLE_4LEVEL
265fa96b57cSHuacai Chen	bool
266fa96b57cSHuacai Chen
267fa96b57cSHuacai Chenconfig PGTABLE_LEVELS
268fa96b57cSHuacai Chen	int
269fa96b57cSHuacai Chen	default 2 if PGTABLE_2LEVEL
270fa96b57cSHuacai Chen	default 3 if PGTABLE_3LEVEL
271fa96b57cSHuacai Chen	default 4 if PGTABLE_4LEVEL
272fa96b57cSHuacai Chen
273fa96b57cSHuacai Chenconfig SCHED_OMIT_FRAME_POINTER
274fa96b57cSHuacai Chen	bool
275fa96b57cSHuacai Chen	default y
276fa96b57cSHuacai Chen
277fa96b57cSHuacai Chenconfig AS_HAS_EXPLICIT_RELOCS
278fa96b57cSHuacai Chen	def_bool $(as-instr,x:pcalau12i \$t0$(comma)%pc_hi20(x))
279fa96b57cSHuacai Chen
2800d8dad70SXi Ruoyaoconfig AS_HAS_FCSR_CLASS
2810d8dad70SXi Ruoyao	def_bool $(as-instr,movfcsr2gr \$t0$(comma)\$fcsr0)
2820d8dad70SXi Ruoyao
28338bb46f9SWANG Xueruiconfig AS_HAS_THIN_ADD_SUB
28438bb46f9SWANG Xuerui	def_bool $(cc-option,-Wa$(comma)-mthin-add-sub) || AS_IS_LLVM
28538bb46f9SWANG Xuerui
286120dd411SXi Ruoyaoconfig AS_HAS_LSX_EXTENSION
287a7e08377STiezhu Yang	def_bool $(as-instr,vld \$vr0$(comma)\$a0$(comma)0)
288120dd411SXi Ruoyao
28961650023SHuacai Chenconfig AS_HAS_LASX_EXTENSION
29061650023SHuacai Chen	def_bool $(as-instr,xvld \$xr0$(comma)\$a0$(comma)0)
29161650023SHuacai Chen
29261650023SHuacai Chenconfig AS_HAS_LBT_EXTENSION
29361650023SHuacai Chen	def_bool $(as-instr,movscr2gr \$a0$(comma)\$scr0)
29461650023SHuacai Chen
295bd3c5798SQi Huconfig AS_HAS_LVZ_EXTENSION
296bd3c5798SQi Hu	def_bool $(as-instr,hvcl 0)
297bd3c5798SQi Hu
298c1fc48aaSTianrui Zhaoconfig CC_HAS_ANNOTATE_TABLEJUMP
299c1fc48aaSTianrui Zhao	def_bool $(cc-option,-mannotate-tablejump)
300c1fc48aaSTianrui Zhao
301e20ab7d4STiezhu Yangmenu "Kernel type and options"
302e20ab7d4STiezhu Yang
303e20ab7d4STiezhu Yangsource "kernel/Kconfig.hz"
304fa96b57cSHuacai Chen
305fa96b57cSHuacai Chenchoice
306fa96b57cSHuacai Chen	prompt "Page Table Layout"
307fa96b57cSHuacai Chen	default 16KB_2LEVEL if 32BIT
308fa96b57cSHuacai Chen	default 16KB_3LEVEL if 64BIT
309fa96b57cSHuacai Chen	help
310fa96b57cSHuacai Chen	  Allows choosing the page table layout, which is a combination
311fa96b57cSHuacai Chen	  of page size and page table levels. The size of virtual memory
312fa96b57cSHuacai Chen	  address space are determined by the page table layout.
313fa96b57cSHuacai Chen
314fa96b57cSHuacai Chenconfig 4KB_3LEVEL
315fa96b57cSHuacai Chen	bool "4KB with 3 levels"
316fa96b57cSHuacai Chen	select HAVE_PAGE_SIZE_4KB
317fa96b57cSHuacai Chen	select PGTABLE_3LEVEL
318fa96b57cSHuacai Chen	help
319ba89f9c8SArnd Bergmann	  This option selects 4KB page size with 3 level page tables, which
320fa96b57cSHuacai Chen	  support a maximum of 39 bits of application virtual memory.
321fa96b57cSHuacai Chen
322fa96b57cSHuacai Chenconfig 4KB_4LEVEL
323fa96b57cSHuacai Chen	bool "4KB with 4 levels"
324fa96b57cSHuacai Chen	select HAVE_PAGE_SIZE_4KB
325fa96b57cSHuacai Chen	select PGTABLE_4LEVEL
326fa96b57cSHuacai Chen	help
327ba89f9c8SArnd Bergmann	  This option selects 4KB page size with 4 level page tables, which
328fa96b57cSHuacai Chen	  support a maximum of 48 bits of application virtual memory.
329fa96b57cSHuacai Chen
330fa96b57cSHuacai Chenconfig 16KB_2LEVEL
331fa96b57cSHuacai Chen	bool "16KB with 2 levels"
332fa96b57cSHuacai Chen	select HAVE_PAGE_SIZE_16KB
333fa96b57cSHuacai Chen	select PGTABLE_2LEVEL
334fa96b57cSHuacai Chen	help
335ba89f9c8SArnd Bergmann	  This option selects 16KB page size with 2 level page tables, which
336fa96b57cSHuacai Chen	  support a maximum of 36 bits of application virtual memory.
337fa96b57cSHuacai Chen
338fa96b57cSHuacai Chenconfig 16KB_3LEVEL
339fa96b57cSHuacai Chen	bool "16KB with 3 levels"
340fa96b57cSHuacai Chen	select HAVE_PAGE_SIZE_16KB
341fa96b57cSHuacai Chen	select PGTABLE_3LEVEL
342fa96b57cSHuacai Chen	help
343ba89f9c8SArnd Bergmann	  This option selects 16KB page size with 3 level page tables, which
344fa96b57cSHuacai Chen	  support a maximum of 47 bits of application virtual memory.
345fa96b57cSHuacai Chen
346fa96b57cSHuacai Chenconfig 64KB_2LEVEL
347fa96b57cSHuacai Chen	bool "64KB with 2 levels"
348fa96b57cSHuacai Chen	select HAVE_PAGE_SIZE_64KB
349fa96b57cSHuacai Chen	select PGTABLE_2LEVEL
350fa96b57cSHuacai Chen	help
351ba89f9c8SArnd Bergmann	  This option selects 64KB page size with 2 level page tables, which
352fa96b57cSHuacai Chen	  support a maximum of 42 bits of application virtual memory.
353fa96b57cSHuacai Chen
354fa96b57cSHuacai Chenconfig 64KB_3LEVEL
355fa96b57cSHuacai Chen	bool "64KB with 3 levels"
356fa96b57cSHuacai Chen	select HAVE_PAGE_SIZE_64KB
357fa96b57cSHuacai Chen	select PGTABLE_3LEVEL
358fa96b57cSHuacai Chen	help
359ba89f9c8SArnd Bergmann	  This option selects 64KB page size with 3 level page tables, which
360fa96b57cSHuacai Chen	  support a maximum of 55 bits of application virtual memory.
361fa96b57cSHuacai Chen
362fa96b57cSHuacai Chenendchoice
363fa96b57cSHuacai Chen
364fa96b57cSHuacai Chenconfig CMDLINE
365fa96b57cSHuacai Chen	string "Built-in kernel command line"
366fa96b57cSHuacai Chen	help
367fa96b57cSHuacai Chen	  For most platforms, the arguments for the kernel's command line
368fa96b57cSHuacai Chen	  are provided at run-time, during boot. However, there are cases
369fa96b57cSHuacai Chen	  where either no arguments are being provided or the provided
370fa96b57cSHuacai Chen	  arguments are insufficient or even invalid.
371fa96b57cSHuacai Chen
372fa96b57cSHuacai Chen	  When that occurs, it is possible to define a built-in command
373fa96b57cSHuacai Chen	  line here and choose how the kernel should use it later on.
374fa96b57cSHuacai Chen
375fa96b57cSHuacai Chenchoice
376fa96b57cSHuacai Chen	prompt "Kernel command line type"
377fa96b57cSHuacai Chen	default CMDLINE_BOOTLOADER
378fa96b57cSHuacai Chen	help
379fa96b57cSHuacai Chen	  Choose how the kernel will handle the provided built-in command
380fa96b57cSHuacai Chen	  line.
381fa96b57cSHuacai Chen
382fa96b57cSHuacai Chenconfig CMDLINE_BOOTLOADER
383fa96b57cSHuacai Chen	bool "Use bootloader kernel arguments if available"
384fa96b57cSHuacai Chen	help
385fa96b57cSHuacai Chen	  Prefer the command-line passed by the boot loader if available.
386fa96b57cSHuacai Chen	  Use the built-in command line as fallback in case we get nothing
387fa96b57cSHuacai Chen	  during boot. This is the default behaviour.
388fa96b57cSHuacai Chen
389fa96b57cSHuacai Chenconfig CMDLINE_EXTEND
390fa96b57cSHuacai Chen	bool "Use built-in to extend bootloader kernel arguments"
391fa96b57cSHuacai Chen	help
392fa96b57cSHuacai Chen	  The built-in command line will be appended to the command-
393fa96b57cSHuacai Chen	  line arguments provided during boot. This is useful in
394fa96b57cSHuacai Chen	  cases where the provided arguments are insufficient and
395be216cbcS谢致邦 (XIE Zhibang)	  you don't want to or cannot modify them.
396be216cbcS谢致邦 (XIE Zhibang)
397fa96b57cSHuacai Chenconfig CMDLINE_FORCE
398fa96b57cSHuacai Chen	bool "Always use the built-in kernel command string"
399fa96b57cSHuacai Chen	help
400fa96b57cSHuacai Chen	  Always use the built-in command line, even if we get one during
401fa96b57cSHuacai Chen	  boot. This is useful in case you need to override the provided
402fa96b57cSHuacai Chen	  command line on systems where you don't have or want control
403fa96b57cSHuacai Chen	  over it.
404fa96b57cSHuacai Chen
405fa96b57cSHuacai Chenendchoice
406fa96b57cSHuacai Chen
407fa96b57cSHuacai Chenconfig BUILTIN_DTB
408fa96b57cSHuacai Chen	bool "Enable built-in dtb in kernel"
409fa96b57cSHuacai Chen	depends on OF
4105f346a6eSBinbin Zhou	select GENERIC_BUILTIN_DTB
4115f346a6eSBinbin Zhou	help
4125f346a6eSBinbin Zhou	  Some existing systems do not provide a canonical device tree to
413c91ddab5SMasahiro Yamada	  the kernel at boot time. Let's provide a device tree table in the
4145f346a6eSBinbin Zhou	  kernel, keyed by the dts filename, containing the relevant DTBs.
4155f346a6eSBinbin Zhou
4165f346a6eSBinbin Zhou	  Built-in DTBs are generic enough and can be used as references.
4175f346a6eSBinbin Zhou
4185f346a6eSBinbin Zhouconfig BUILTIN_DTB_NAME
4195f346a6eSBinbin Zhou	string "Source file for built-in dtb"
4205f346a6eSBinbin Zhou	depends on BUILTIN_DTB
4215f346a6eSBinbin Zhou	help
4225f346a6eSBinbin Zhou	  Base name (without suffix, relative to arch/loongarch/boot/dts/)
4235f346a6eSBinbin Zhou	  for the DTS file that will be used to produce the DTB linked into
4245f346a6eSBinbin Zhou	  the kernel.
4255f346a6eSBinbin Zhou
4265f346a6eSBinbin Zhouconfig DMI
4275f346a6eSBinbin Zhou	bool "Enable DMI scanning"
4285f346a6eSBinbin Zhou	select DMI_SCAN_MACHINE_NON_EFI_FALLBACK
429fa96b57cSHuacai Chen	default y
430fa96b57cSHuacai Chen	help
431fa96b57cSHuacai Chen	  This enables SMBIOS/DMI feature for systems, and scanning of
432fa96b57cSHuacai Chen	  DMI to identify machine quirks.
433fa96b57cSHuacai Chen
434fa96b57cSHuacai Chenconfig EFI
435fa96b57cSHuacai Chen	bool "EFI runtime service support"
436fa96b57cSHuacai Chen	select UCS2_STRING
437fa96b57cSHuacai Chen	select EFI_RUNTIME_WRAPPERS
438fa96b57cSHuacai Chen	help
439fa96b57cSHuacai Chen	  This enables the kernel to use EFI runtime services that are
440fa96b57cSHuacai Chen	  available (such as the EFI variable services).
441fa96b57cSHuacai Chen
442fa96b57cSHuacai Chenconfig EFI_STUB
443fa96b57cSHuacai Chen	bool "EFI boot stub support"
444fa96b57cSHuacai Chen	default y
445ead384d9SHuacai Chen	depends on EFI
446ead384d9SHuacai Chen	select EFI_GENERIC_STUB
447ead384d9SHuacai Chen	help
448ead384d9SHuacai Chen	  This kernel feature allows the kernel to be loaded directly by
449ead384d9SHuacai Chen	  EFI firmware without the use of a bootloader.
450ead384d9SHuacai Chen
451ead384d9SHuacai Chenconfig SCHED_SMT
452ead384d9SHuacai Chen	bool "SMT scheduler support"
453ead384d9SHuacai Chen	depends on SMP
454f6f0c9a7SHuacai Chen	default y
455f6f0c9a7SHuacai Chen	help
4565685d7fcSTiezhu Yang	  Improves scheduler's performance when there are multiple
457f6f0c9a7SHuacai Chen	  threads in one physical core.
458f6f0c9a7SHuacai Chen
459f6f0c9a7SHuacai Chenconfig SCHED_MC
460f6f0c9a7SHuacai Chen	bool "Multi-core scheduler support"
461f6f0c9a7SHuacai Chen	depends on SMP
46293f43731STianyang Zhang	default y
46393f43731STianyang Zhang	help
46493f43731STianyang Zhang	  Multi-core scheduler support improves the CPU scheduler's decision
46593f43731STianyang Zhang	  making when dealing with multi-core CPU chips at a cost of slightly
46693f43731STianyang Zhang	  increased overhead in some places.
46793f43731STianyang Zhang
46893f43731STianyang Zhangconfig SMP
46993f43731STianyang Zhang	bool "Multi-Processing support"
47093f43731STianyang Zhang	help
47146859ac8SHuacai Chen	  This enables support for systems with more than one CPU. If you have
47246859ac8SHuacai Chen	  a system with only one CPU, say N. If you have a system with more
47346859ac8SHuacai Chen	  than one CPU, say Y.
47446859ac8SHuacai Chen
47546859ac8SHuacai Chen	  If you say N here, the kernel will run on uni- and multiprocessor
47646859ac8SHuacai Chen	  machines, but will use only one CPU of a multiprocessor machine. If
47746859ac8SHuacai Chen	  you say Y here, the kernel will run on many, but not all,
47846859ac8SHuacai Chen	  uniprocessor machines. On a uniprocessor machine, the kernel
47946859ac8SHuacai Chen	  will run faster if you say N here.
48046859ac8SHuacai Chen
48146859ac8SHuacai Chen	  See also the SMP-HOWTO available at <http://www.tldp.org/docs.html#howto>.
48246859ac8SHuacai Chen
48346859ac8SHuacai Chen	  If you don't know what to do here, say N.
48446859ac8SHuacai Chen
48546859ac8SHuacai Chenconfig HOTPLUG_CPU
48646859ac8SHuacai Chen	bool "Support for hot-pluggable CPUs"
48746859ac8SHuacai Chen	depends on SMP
48846859ac8SHuacai Chen	select GENERIC_IRQ_MIGRATION
48946859ac8SHuacai Chen	help
49046859ac8SHuacai Chen	  Say Y here to allow turning CPUs off and on. CPUs can be
49146859ac8SHuacai Chen	  controlled through /sys/devices/system/cpu.
49246859ac8SHuacai Chen	  (Note: power management support will enable this option
49346859ac8SHuacai Chen	    automatically on SMP systems. )
49446859ac8SHuacai Chen	  Say N if you want to disable CPU hotplug.
49546859ac8SHuacai Chen
49646859ac8SHuacai Chenconfig NR_CPUS
49746859ac8SHuacai Chen	int "Maximum number of CPUs (2-2048)"
49846859ac8SHuacai Chen	range 2 2048
49946859ac8SHuacai Chen	default "2048"
5009559d580SHuacai Chen	depends on SMP
5019559d580SHuacai Chen	help
5029559d580SHuacai Chen	  This allows you to specify the maximum number of CPUs which this
50346859ac8SHuacai Chen	  kernel will support.
50446859ac8SHuacai Chen
50546859ac8SHuacai Chenconfig NUMA
50646859ac8SHuacai Chen	bool "NUMA Support"
50746859ac8SHuacai Chen	select SMP
508d4b6f156SHuacai Chen	help
509d4b6f156SHuacai Chen	  Say Y to compile the kernel with NUMA (Non-Uniform Memory Access)
510255b4658SHuacai Chen	  support.  This option improves performance on systems with more
511d4b6f156SHuacai Chen	  than one NUMA node; on single node systems it is generally better
512d4b6f156SHuacai Chen	  to leave it disabled.
513d4b6f156SHuacai Chen
514d4b6f156SHuacai Chenconfig NODES_SHIFT
515d4b6f156SHuacai Chen	int
516d4b6f156SHuacai Chen	default "6"
517d4b6f156SHuacai Chen	depends on NUMA
518d4b6f156SHuacai Chen
519d4b6f156SHuacai Chenconfig ARCH_FORCE_MAX_ORDER
520d4b6f156SHuacai Chen	int "Maximum zone order"
521d4b6f156SHuacai Chen	default "13" if PAGE_SIZE_64KB
5220192445cSZi Yan	default "11" if PAGE_SIZE_16KB
523fa96b57cSHuacai Chen	default "10"
52423baf831SKirill A. Shutemov	help
52523baf831SKirill A. Shutemov	  The kernel memory allocator divides physically contiguous memory
52623baf831SKirill A. Shutemov	  blocks into "zones", where each zone is a power of two number of
527fa96b57cSHuacai Chen	  pages.  This option selects the largest power of two that the kernel
528fa96b57cSHuacai Chen	  keeps in the memory allocator.  If you need to allocate very large
529fa96b57cSHuacai Chen	  blocks of physically contiguous memory, then you may need to
530fa96b57cSHuacai Chen	  increase this value.
531fa96b57cSHuacai Chen
532fa96b57cSHuacai Chen	  The page size is not necessarily 4KB.  Keep this in mind
533fa96b57cSHuacai Chen	  when choosing a value for this option.
534fa96b57cSHuacai Chen
535fa96b57cSHuacai Chenconfig ARCH_IOREMAP
536fa96b57cSHuacai Chen	bool "Enable LoongArch DMW-based ioremap()"
537fa96b57cSHuacai Chen	help
538d2791341SHuacai Chen	  We use generic TLB-based ioremap() by default since it has page
539d2791341SHuacai Chen	  protection support. However, you can enable LoongArch DMW-based
540d2791341SHuacai Chen	  ioremap() for better performance.
541d2791341SHuacai Chen
542d2791341SHuacai Chenconfig ARCH_WRITECOMBINE
543d2791341SHuacai Chen	bool "Enable WriteCombine (WUC) for ioremap()"
544d2791341SHuacai Chen	help
54516c52e50SHuacai Chen	  LoongArch maintains cache coherency in hardware, but when paired
54616c52e50SHuacai Chen	  with LS7A chipsets the WUC attribute (Weak-ordered UnCached, which
54716c52e50SHuacai Chen	  is similar to WriteCombine) is out of the scope of cache coherency
54816c52e50SHuacai Chen	  machanism for PCIe devices (this is a PCIe protocol violation, which
54916c52e50SHuacai Chen	  may be fixed in newer chipsets).
55016c52e50SHuacai Chen
55116c52e50SHuacai Chen	  This means WUC can only used for write-only memory regions now, so
55216c52e50SHuacai Chen	  this option is disabled by default, making WUC silently fallback to
55316c52e50SHuacai Chen	  SUC for ioremap(). You can enable this option if the kernel is ensured
55416c52e50SHuacai Chen	  to run on hardware without this bug.
55516c52e50SHuacai Chen
55616c52e50SHuacai Chen	  You can override this setting via writecombine=on/off boot parameter.
55716c52e50SHuacai Chen
55816c52e50SHuacai Chenconfig ARCH_STRICT_ALIGN
55916c52e50SHuacai Chen	bool "Enable -mstrict-align to prevent unaligned accesses" if EXPERT
56016c52e50SHuacai Chen	default y
56141596803SHuacai Chen	help
56241596803SHuacai Chen	  Not all LoongArch cores support h/w unaligned access, we can use
56341596803SHuacai Chen	  -mstrict-align build parameter to prevent unaligned accesses.
56441596803SHuacai Chen
56541596803SHuacai Chen	  CPUs with h/w unaligned access support:
56641596803SHuacai Chen	  Loongson-2K2000/2K3000/3A5000/3C5000/3D5000.
56741596803SHuacai Chen
56841596803SHuacai Chen	  CPUs without h/w unaligned access support:
56941596803SHuacai Chen	  Loongson-2K500/2K1000.
57041596803SHuacai Chen
57141596803SHuacai Chen	  This option is enabled by default to make the kernel be able to run
57241596803SHuacai Chen	  on all LoongArch systems. But you can disable it manually if you want
57341596803SHuacai Chen	  to run kernel only on systems with h/w unaligned access support in
57441596803SHuacai Chen	  order to optimise for performance.
57541596803SHuacai Chen
57641596803SHuacai Chenconfig CPU_HAS_FPU
57741596803SHuacai Chen	bool
57841596803SHuacai Chen	default y
57961650023SHuacai Chen
58061650023SHuacai Chenconfig CPU_HAS_LSX
58161650023SHuacai Chen	bool "Support for the Loongson SIMD Extension"
58261650023SHuacai Chen	depends on AS_HAS_LSX_EXTENSION
58361650023SHuacai Chen	help
58461650023SHuacai Chen	  Loongson SIMD Extension (LSX) introduces 128 bit wide vector registers
58561650023SHuacai Chen	  and a set of SIMD instructions to operate on them. When this option
58661650023SHuacai Chen	  is enabled the kernel will support allocating & switching LSX
58761650023SHuacai Chen	  vector register contexts. If you know that your kernel will only be
58861650023SHuacai Chen	  running on CPUs which do not support LSX or that your userland will
58961650023SHuacai Chen	  not be making use of it then you may wish to say N here to reduce
59061650023SHuacai Chen	  the size & complexity of your kernel.
59161650023SHuacai Chen
59261650023SHuacai Chen	  If unsure, say Y.
59361650023SHuacai Chen
59461650023SHuacai Chenconfig CPU_HAS_LASX
59561650023SHuacai Chen	bool "Support for the Loongson Advanced SIMD Extension"
59661650023SHuacai Chen	depends on CPU_HAS_LSX
59761650023SHuacai Chen	depends on AS_HAS_LASX_EXTENSION
59861650023SHuacai Chen	help
59961650023SHuacai Chen	  Loongson Advanced SIMD Extension (LASX) introduces 256 bit wide vector
60061650023SHuacai Chen	  registers and a set of SIMD instructions to operate on them. When this
60161650023SHuacai Chen	  option is enabled the kernel will support allocating & switching LASX
60261650023SHuacai Chen	  vector register contexts. If you know that your kernel will only be
60361650023SHuacai Chen	  running on CPUs which do not support LASX or that your userland will
60461650023SHuacai Chen	  not be making use of it then you may wish to say N here to reduce
60561650023SHuacai Chen	  the size & complexity of your kernel.
60661650023SHuacai Chen
60761650023SHuacai Chen	  If unsure, say Y.
60861650023SHuacai Chen
60961650023SHuacai Chenconfig CPU_HAS_LBT
61061650023SHuacai Chen	bool "Support for the Loongson Binary Translation Extension"
61161650023SHuacai Chen	depends on AS_HAS_LBT_EXTENSION
612bd3c5798SQi Hu	help
613bd3c5798SQi Hu	  Loongson Binary Translation (LBT) introduces 4 scratch registers (SCR0
614bd3c5798SQi Hu	  to SCR3), x86/ARM eflags (eflags) and x87 fpu stack pointer (ftop).
615bd3c5798SQi Hu	  Enabling this option allows the kernel to allocate and switch registers
616bd3c5798SQi Hu	  specific to LBT.
617bd3c5798SQi Hu
618bd3c5798SQi Hu	  If you want to use this feature, such as the Loongson Architecture
619bd3c5798SQi Hu	  Translator (LAT), say Y.
620bd3c5798SQi Hu
621bd3c5798SQi Huconfig CPU_HAS_PREFETCH
622bd3c5798SQi Hu	bool
623bd3c5798SQi Hu	default y
62461650023SHuacai Chen
62561650023SHuacai Chenconfig ARCH_SUPPORTS_KEXEC
62661650023SHuacai Chen	def_bool y
62761650023SHuacai Chen
62819e6dd0bSEric DeVolderconfig ARCH_SUPPORTS_CRASH_DUMP
62919e6dd0bSEric DeVolder	def_bool y
6304a03b2acSYouling Tang
63119e6dd0bSEric DeVolderconfig ARCH_DEFAULT_CRASH_DUMP
63219e6dd0bSEric DeVolder	def_bool y
6334a03b2acSYouling Tang
63431daa343SDave Vasilevskyconfig ARCH_SELECTS_CRASH_DUMP
63531daa343SDave Vasilevsky	def_bool y
63631daa343SDave Vasilevsky	depends on CRASH_DUMP
63719e6dd0bSEric DeVolder	select RELOCATABLE
63819e6dd0bSEric DeVolder
63919e6dd0bSEric DeVolderconfig ARCH_HAS_GENERIC_CRASHKERNEL_RESERVATION
6403f89765dSYouling Tang	def_bool CRASH_RESERVE
6414e62d1d8SYouling Tang
64278de91b4SYouling Tangconfig RELOCATABLE
643697f3342SBaoquan He	bool "Relocatable kernel"
64478de91b4SYouling Tang	select ARCH_HAS_RELR
645d8da19fbSYouling Tang	help
646d8da19fbSYouling Tang	  This builds the kernel as a Position Independent Executable (PIE),
647e05d4cd9SXi Ruoyao	  which retains all relocation metadata required, so as to relocate
648d8da19fbSYouling Tang	  the kernel binary at runtime to a different virtual address from
649d8da19fbSYouling Tang	  its link address.
650d8da19fbSYouling Tang
651d8da19fbSYouling Tangconfig RANDOMIZE_BASE
652d8da19fbSYouling Tang	bool "Randomize the address of the kernel (KASLR)"
653d8da19fbSYouling Tang	depends on RELOCATABLE
654e5f02b51SYouling Tang	help
655e5f02b51SYouling Tang	   Randomizes the physical and virtual address at which the
656e5f02b51SYouling Tang	   kernel image is loaded, as a security feature that
657e5f02b51SYouling Tang	   deters exploit attempts relying on knowledge of the location
658e5f02b51SYouling Tang	   of kernel internals.
659e5f02b51SYouling Tang
660e5f02b51SYouling Tang	   The kernel will be offset by up to RANDOMIZE_BASE_MAX_OFFSET.
661e5f02b51SYouling Tang
662e5f02b51SYouling Tang	   If unsure, say N.
663e5f02b51SYouling Tang
664e5f02b51SYouling Tangconfig RANDOMIZE_BASE_MAX_OFFSET
665e5f02b51SYouling Tang	hex "Maximum KASLR offset" if EXPERT
666e5f02b51SYouling Tang	depends on RANDOMIZE_BASE
667e5f02b51SYouling Tang	range 0x0 0x10000000
668e5f02b51SYouling Tang	default "0x01000000"
669e5f02b51SYouling Tang	help
670e5f02b51SYouling Tang	  When KASLR is active, this provides the maximum offset that will
671e5f02b51SYouling Tang	  be applied to the kernel image. It should be set according to the
672e5f02b51SYouling Tang	  amount of physical RAM available in the target system.
673e5f02b51SYouling Tang
674e5f02b51SYouling Tang	  This is limited by the size of the lower address memory, 256MB.
675e5f02b51SYouling Tang
676e5f02b51SYouling Tangsource "kernel/livepatch/Kconfig"
677e5f02b51SYouling Tang
678e5f02b51SYouling Tangconfig PARAVIRT
679199cc14cSJinyang He	bool "Enable paravirtualization code"
680199cc14cSJinyang He	depends on AS_HAS_LVZ_EXTENSION
68174c16b2eSBibo Mao	help
68274c16b2eSBibo Mao	  This changes the kernel so it can modify itself when it is run
68374c16b2eSBibo Mao	  under a hypervisor, potentially improving performance significantly
68474c16b2eSBibo Mao	  over full virtualization.  However, when run without a hypervisor
68574c16b2eSBibo Mao	  the kernel is theoretically slower and slightly larger.
68674c16b2eSBibo Mao
68774c16b2eSBibo Maoconfig PARAVIRT_TIME_ACCOUNTING
68874c16b2eSBibo Mao	bool "Paravirtual steal time accounting"
68974c16b2eSBibo Mao	depends on PARAVIRT
69003779999SBibo Mao	help
69103779999SBibo Mao	  Select this option to enable fine granularity task steal time
69203779999SBibo Mao	  accounting. Time spent executing other tasks in parallel with
69303779999SBibo Mao	  the current vCPU is discounted from the vCPU power. To account for
69403779999SBibo Mao	  that, there can be a small performance impact.
69503779999SBibo Mao
69603779999SBibo Mao	  If in doubt, say N here.
69703779999SBibo Mao
69803779999SBibo Maoendmenu
69903779999SBibo Mao
70003779999SBibo Maoconfig ARCH_SELECT_MEMORY_MODEL
701fa96b57cSHuacai Chen	def_bool y
702fa96b57cSHuacai Chen
703fa96b57cSHuacai Chenconfig ARCH_FLATMEM_ENABLE
704fa96b57cSHuacai Chen	def_bool y
705fa96b57cSHuacai Chen	depends on !NUMA
706fa96b57cSHuacai Chen
707fa96b57cSHuacai Chenconfig ARCH_SPARSEMEM_ENABLE
708d4b6f156SHuacai Chen	def_bool y
709fa96b57cSHuacai Chen	select SPARSEMEM_VMEMMAP_ENABLE
710fa96b57cSHuacai Chen	help
711fa96b57cSHuacai Chen	  Say Y to support efficient handling of sparse physical memory,
7127b09f5afSFeiyang Chen	  for architectures which are either NUMA (Non-Uniform Memory Access)
713fa96b57cSHuacai Chen	  or have huge holes in the physical address space for other reasons.
714fa96b57cSHuacai Chen	  See <file:Documentation/mm/numa.rst> for more.
715fa96b57cSHuacai Chen
716fa96b57cSHuacai Chenconfig ARCH_MEMORY_PROBE
717ee65728eSMike Rapoport	def_bool y
718fa96b57cSHuacai Chen	depends on MEMORY_HOTPLUG
719fa96b57cSHuacai Chen
720fa96b57cSHuacai Chenconfig MMU
721fa96b57cSHuacai Chen	bool
722fa96b57cSHuacai Chen	default y
723fa96b57cSHuacai Chen
724fa96b57cSHuacai Chenconfig ARCH_MMAP_RND_BITS_MIN
725fa96b57cSHuacai Chen	default 12
726fa96b57cSHuacai Chen
727fa96b57cSHuacai Chenconfig ARCH_MMAP_RND_BITS_MAX
728fa96b57cSHuacai Chen	default 18
729fa96b57cSHuacai Chen
730fa96b57cSHuacai Chenconfig ARCH_SUPPORTS_UPROBES
731fa96b57cSHuacai Chen	def_bool y
732fa96b57cSHuacai Chen
73319bc6cb6STiezhu Yangconfig KASAN_SHADOW_OFFSET
73419bc6cb6STiezhu Yang	hex
73519bc6cb6STiezhu Yang	default 0x0
7365aa4ac64SQing Zhang	depends on KASAN
7375aa4ac64SQing Zhang
7385aa4ac64SQing Zhangmenu "Power management options"
7395aa4ac64SQing Zhang
7405aa4ac64SQing Zhangconfig ARCH_SUSPEND_POSSIBLE
741fa96b57cSHuacai Chen	def_bool y
742fa96b57cSHuacai Chen
743366bb35aSHuacai Chenconfig ARCH_HIBERNATION_POSSIBLE
744366bb35aSHuacai Chen	def_bool y
745366bb35aSHuacai Chen
7467db54bfeSHuacai Chensource "kernel/power/Kconfig"
7477db54bfeSHuacai Chensource "drivers/acpi/Kconfig"
7487db54bfeSHuacai Chensource "drivers/cpufreq/Kconfig"
749366bb35aSHuacai Chen
750fa96b57cSHuacai Chenendmenu
751f60d251bSHuacai Chen
752fa96b57cSHuacai Chensource "arch/loongarch/kvm/Kconfig"
753fa96b57cSHuacai Chen