]> Git Repo - linux.git/blame - arch/riscv/Kconfig
RISC-V: Drop invalid test from CONFIG_AS_HAS_OPTION_ARCH
[linux.git] / arch / riscv / Kconfig
CommitLineData
ec8f24b7 1# SPDX-License-Identifier: GPL-2.0-only
fbe934d6
PD
2#
3# For a description of the syntax of this configuration file,
cd238eff 4# see Documentation/kbuild/kconfig-language.rst.
fbe934d6
PD
5#
6
c3e4ed01
CH
7config 64BIT
8 bool
9
10config 32BIT
11 bool
12
fbe934d6
PD
13config RISCV
14 def_bool y
a91a9ffb
S
15 select ACPI_GENERIC_GSI if ACPI
16 select ACPI_REDUCED_HARDWARE_ONLY if ACPI
c00a60d6 17 select ARCH_DMA_DEFAULT_COHERENT
c24a1967 18 select ARCH_ENABLE_HUGEPAGE_MIGRATION if HUGETLB_PAGE && MIGRATION
5a7ac592 19 select ARCH_ENABLE_SPLIT_PMD_PTLOCK if PGTABLE_LEVELS > 2
5f365c13 20 select ARCH_ENABLE_THP_MIGRATION if TRANSPARENT_HUGEPAGE
ad97f9df 21 select ARCH_HAS_BINFMT_FLAT
fdecfea0 22 select ARCH_HAS_CURRENT_STACK_POINTER
e8c7ef7d 23 select ARCH_HAS_DEBUG_VIRTUAL if MMU
5f365c13 24 select ARCH_HAS_DEBUG_VM_PGTABLE
b422d28b 25 select ARCH_HAS_DEBUG_WX
95301414 26 select ARCH_HAS_FORTIFY_SOURCE
e8c7ef7d
PD
27 select ARCH_HAS_GCOV_PROFILE_ALL
28 select ARCH_HAS_GIGANTIC_PAGE
20d38f7c 29 select ARCH_HAS_KCOV
e8c7ef7d 30 select ARCH_HAS_MMIOWB
99a670b2 31 select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
a49ab905 32 select ARCH_HAS_PMEM_API
e8c7ef7d 33 select ARCH_HAS_PTE_SPECIAL
10cc3278
MR
34 select ARCH_HAS_SET_DIRECT_MAP if MMU
35 select ARCH_HAS_SET_MEMORY if MMU
44c92257
VW
36 select ARCH_HAS_STRICT_KERNEL_RWX if MMU && !XIP_KERNEL
37 select ARCH_HAS_STRICT_MODULE_RWX if MMU && !XIP_KERNEL
08d0ce30 38 select ARCH_HAS_SYSCALL_WRAPPER
2f100585 39 select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
8341dcfb 40 select ARCH_HAS_UBSAN_SANITIZE_ALL
aa5af0aa 41 select ARCH_HAS_VDSO_DATA
e8065df5 42 select ARCH_KEEP_MEMBLOCK if ACPI
fc0c769f
VC
43 select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX
44 select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT
7f85b04b
JZ
45 select ARCH_STACKWALK
46 select ARCH_SUPPORTS_ATOMIC_RMW
74f8fc31 47 select ARCH_SUPPORTS_CFI_CLANG
7f85b04b 48 select ARCH_SUPPORTS_DEBUG_PAGEALLOC if MMU
855f9a8e 49 select ARCH_SUPPORTS_HUGETLBFS if MMU
34c0a5b0 50 select ARCH_SUPPORTS_PAGE_TABLE_CHECK if MMU
648321fa 51 select ARCH_SUPPORTS_PER_VMA_LOCK if MMU
d1584d79 52 select ARCH_SUPPORTS_SHADOW_CALL_STACK if HAVE_SHADOW_CALL_STACK
97a03108 53 select ARCH_USE_MEMTEST
c9c0b0ba 54 select ARCH_USE_QUEUED_RWLOCKS
af0ead42 55 select ARCH_USES_CFI_TRAPS if CFI_CLANG
54d7431a 56 select ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH if SMP && MMU
e8c7ef7d 57 select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT if MMU
fbe934d6 58 select ARCH_WANT_FRAME_POINTERS
82a1a1f3 59 select ARCH_WANT_GENERAL_HUGETLB if !RISCV_ISA_SVNAPOT
e8c7ef7d 60 select ARCH_WANT_HUGE_PMD_SHARE if 64BIT
f4b71bff 61 select ARCH_WANT_LD_ORPHAN_WARN if !XIP_KERNEL
0b6f1582 62 select ARCH_WANT_OPTIMIZE_HUGETLB_VMEMMAP
cfbc4f81 63 select ARCH_WANTS_NO_INSTR
87f81e66 64 select ARCH_WANTS_THP_SWAP if HAVE_ARCH_TRANSPARENT_HUGEPAGE
09accc3a 65 select BINFMT_FLAT_NO_DATA_START_OFFSET if !MMU
54fed35f 66 select BUILDTIME_TABLE_SORT if MMU
d5be89a8 67 select CLINT_TIMER if !MMU
5f365c13 68 select CLONE_BACKWARDS
fbe934d6 69 select COMMON_CLK
4dc4af9c 70 select CPU_PM if CPU_IDLE || HIBERNATION || SUSPEND
e8c7ef7d 71 select EDAC_SUPPORT
9f944d2e 72 select FRAME_POINTER if PERF_EVENTS || (FUNCTION_TRACER && !DYNAMIC_FTRACE)
b546d636 73 select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY if DYNAMIC_FTRACE
fbd92809 74 select GENERIC_ARCH_TOPOLOGY
e8c7ef7d 75 select GENERIC_ATOMIC64 if !64BIT
2f100585 76 select GENERIC_CLOCKEVENTS_BROADCAST if SMP
96cf2036 77 select GENERIC_CPU_DEVICES
6262f661 78 select GENERIC_EARLY_IOREMAP
f0bddf50 79 select GENERIC_ENTRY
ad5d1122 80 select GENERIC_GETTIMEOFDAY if HAVE_GENERIC_VDSO
bcf11b5e 81 select GENERIC_IDLE_POLL_SETUP
8350229f 82 select GENERIC_IOREMAP if MMU
832f15f4
AP
83 select GENERIC_IRQ_IPI if SMP
84 select GENERIC_IRQ_IPI_MUX if SMP
e8c7ef7d 85 select GENERIC_IRQ_MULTI_HANDLER
fbe934d6 86 select GENERIC_IRQ_SHOW
ecd4916c 87 select GENERIC_IRQ_SHOW_LEVEL
78ed473c 88 select GENERIC_LIB_DEVMEM_IS_ALLOWED
fbe934d6 89 select GENERIC_PCI_IOMAP
e8c7ef7d 90 select GENERIC_PTDUMP if MMU
9b9afe4a 91 select GENERIC_SCHED_CLOCK
e8c7ef7d 92 select GENERIC_SMP_IDLE_THREAD
ad5d1122 93 select GENERIC_TIME_VSYSCALL if MMU && 64BIT
dffe11e2 94 select GENERIC_VDSO_TIME_NS if HAVE_GENERIC_VDSO
c45fc916 95 select HARDIRQS_SW_RESEND
fcbfe812 96 select HAS_IOPORT if MMU
efe75c49 97 select HAVE_ARCH_AUDITSYSCALL
be79afc7 98 select HAVE_ARCH_HUGE_VMALLOC if HAVE_ARCH_HUGE_VMAP
310f541a 99 select HAVE_ARCH_HUGE_VMAP if MMU && 64BIT && !XIP_KERNEL
42e0e0b4
JZ
100 select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL
101 select HAVE_ARCH_JUMP_LABEL_RELATIVE if !XIP_KERNEL
e8c7ef7d 102 select HAVE_ARCH_KASAN if MMU && 64BIT
e178d670 103 select HAVE_ARCH_KASAN_VMALLOC if MMU && 64BIT
47513f24 104 select HAVE_ARCH_KFENCE if MMU && 64BIT
42e0e0b4 105 select HAVE_ARCH_KGDB if !XIP_KERNEL
e8c7ef7d
PD
106 select HAVE_ARCH_KGDB_QXFER_PKT
107 select HAVE_ARCH_MMAP_RND_BITS if MMU
9be84592 108 select HAVE_ARCH_MMAP_RND_COMPAT_BITS if COMPAT
5340627e 109 select HAVE_ARCH_SECCOMP_FILTER
5f365c13 110 select HAVE_ARCH_THREAD_STRUCT_WHITELIST
e8c7ef7d 111 select HAVE_ARCH_TRACEHOOK
9b76d71f 112 select HAVE_ARCH_TRANSPARENT_HUGEPAGE if 64BIT && MMU
a2492ca8 113 select HAVE_ARCH_USERFAULTFD_MINOR if 64BIT && USERFAULTFD
31da94c2 114 select HAVE_ARCH_VMAP_STACK if MMU && 64BIT
2ff2b7ec 115 select HAVE_ASM_MODVERSIONS
24a9c541 116 select HAVE_CONTEXT_TRACKING_USER
cbb3d91d 117 select HAVE_DEBUG_KMEMLEAK
6bd33e1e 118 select HAVE_DMA_CONTIGUOUS if MMU
ab7fa6b0 119 select HAVE_DYNAMIC_FTRACE if !XIP_KERNEL && MMU && (CLANG_SUPPORTS_DYNAMIC_FTRACE || GCC_SUPPORTS_DYNAMIC_FTRACE)
196c79f1 120 select HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS
ab7fa6b0
JZ
121 select HAVE_DYNAMIC_FTRACE_WITH_REGS if HAVE_DYNAMIC_FTRACE
122 select HAVE_FTRACE_MCOUNT_RECORD if !XIP_KERNEL
123 select HAVE_FUNCTION_GRAPH_TRACER
4f6b6c2b 124 select HAVE_FUNCTION_GRAPH_RETVAL if HAVE_FUNCTION_GRAPH_TRACER
ab7fa6b0 125 select HAVE_FUNCTION_TRACER if !XIP_KERNEL && !PREEMPTION
e8c7ef7d 126 select HAVE_EBPF_JIT if MMU
5f365c13 127 select HAVE_FUNCTION_ARG_ACCESS_API
ee55ff80 128 select HAVE_FUNCTION_ERROR_INJECTION
20d38f7c 129 select HAVE_GCC_PLUGINS
ad5d1122 130 select HAVE_GENERIC_VDSO if MMU && 64BIT
31564b8b 131 select HAVE_IRQ_TIME_ACCOUNTING
42e0e0b4
JZ
132 select HAVE_KPROBES if !XIP_KERNEL
133 select HAVE_KPROBES_ON_FTRACE if !XIP_KERNEL
134 select HAVE_KRETPROBES if !XIP_KERNEL
f7584322
ND
135 # https://github.com/ClangBuiltLinux/linux/issues/1881
136 select HAVE_LD_DEAD_CODE_DATA_ELIMINATION if !LD_IS_LLD
3332f419
JZ
137 select HAVE_MOVE_PMD
138 select HAVE_MOVE_PUD
e8c7ef7d 139 select HAVE_PCI
178e9fc4 140 select HAVE_PERF_EVENTS
98a93b0b
MH
141 select HAVE_PERF_REGS
142 select HAVE_PERF_USER_STACK_DUMP
b60ca697 143 select HAVE_POSIX_CPU_TIMERS_TASK_WORK
4e90d052 144 select HAVE_PREEMPT_DYNAMIC_KEY if !XIP_KERNEL
dcdc7a53 145 select HAVE_REGS_AND_STACK_ACCESS_API
ab7fa6b0 146 select HAVE_RETHOOK if !XIP_KERNEL
5f365c13 147 select HAVE_RSEQ
629291dd
SS
148 select HAVE_SAMPLE_FTRACE_DIRECT
149 select HAVE_SAMPLE_FTRACE_DIRECT_MULTI
f2c9699f 150 select HAVE_STACKPROTECTOR
5aeb1b36 151 select HAVE_SYSCALL_TRACEPOINTS
72b11aa7 152 select HOTPLUG_CORE_SYNC_DEAD if HOTPLUG_CPU
fbe934d6 153 select IRQ_DOMAIN
8165c6ae 154 select IRQ_FORCED_THREADING
864046c5 155 select KASAN_VMALLOC if KASAN
7267ef7b 156 select LOCK_MM_AND_FIND_VMA
fbe934d6 157 select MODULES_USE_ELF_RELA if MODULES
2cffc956 158 select MODULE_SECTIONS if MODULES
e8c7ef7d
PD
159 select OF
160 select OF_EARLY_FLATTREE
161 select OF_IRQ
2eac9c2d 162 select PCI_DOMAINS_GENERIC if PCI
eb01d42a 163 select PCI_MSI if PCI
1ee7fc3f 164 select RISCV_ALTERNATIVE if !XIP_KERNEL
e71ee06e 165 select RISCV_INTC
2bc3fc87 166 select RISCV_TIMER if RISCV_SBI
bf3d7b1d 167 select SIFIVE_PLIC
e8c7ef7d
PD
168 select SPARSE_IRQ
169 select SYSCTL_EXCEPTION_TRACE
170 select THREAD_INFO_IN_TASK
4aae683f 171 select TRACE_IRQFLAGS_SUPPORT
11129e8e 172 select UACCESS_MEMCPY if !MMU
63703f37 173 select ZONE_DMA32 if 64BIT
54c95a11 174
b3d6bdfe
NC
175config CLANG_SUPPORTS_DYNAMIC_FTRACE
176 def_bool CC_IS_CLANG
177 # https://github.com/llvm/llvm-project/commit/6ab8927931851bb42b2c93a00801dc499d7d9b1e
178 depends on CLANG_VERSION >= 130000
179 # https://github.com/ClangBuiltLinux/linux/issues/1817
180 depends on AS_IS_GNU || (AS_IS_LLVM && (LD_IS_LLD || LD_VERSION >= 23600))
181
182config GCC_SUPPORTS_DYNAMIC_FTRACE
183 def_bool CC_IS_GCC
184 depends on $(cc-option,-fpatchable-function-entry=8)
185
d1584d79
ST
186config HAVE_SHADOW_CALL_STACK
187 def_bool $(cc-option,-fsanitize=shadow-call-stack)
188 # https://github.com/riscv-non-isa/riscv-elf-psabi-doc/commit/a484e843e6eeb51f0cb7b8819e50da6d2444d769
189 depends on $(ld-option,--no-relax-gp)
190
55b71d2c
NC
191config RISCV_USE_LINKER_RELAXATION
192 def_bool y
193 # https://github.com/llvm/llvm-project/commit/6611d58f5bbcbec77262d392e2923e1d680f6985
194 depends on !LD_IS_LLD || LLD_VERSION >= 150000
195
ae84ff9a
NC
196# https://github.com/llvm/llvm-project/commit/bbc0f99f3bc96f1db16f649fc21dd18e5b0918f6
197config ARCH_HAS_BROKEN_DWARF5
198 def_bool y
199 depends on RISCV_USE_LINKER_RELAXATION
200 # https://github.com/llvm/llvm-project/commit/1df5ea29b43690b6622db2cad7b745607ca4de6a
201 depends on AS_IS_LLVM && AS_VERSION < 180000
202 # https://github.com/llvm/llvm-project/commit/7ffabb61a5569444b5ac9322e22e5471cc5e4a77
203 depends on LD_IS_LLD && LLD_VERSION < 180000
204
54c95a11
AG
205config ARCH_MMAP_RND_BITS_MIN
206 default 18 if 64BIT
207 default 8
208
9be84592
GR
209config ARCH_MMAP_RND_COMPAT_BITS_MIN
210 default 8
211
54c95a11
AG
212# max bits determined by the following formula:
213# VA_BITS - PAGE_SHIFT - 3
214config ARCH_MMAP_RND_BITS_MAX
215 default 24 if 64BIT # SV39 based
216 default 17
fbe934d6 217
9be84592
GR
218config ARCH_MMAP_RND_COMPAT_BITS_MAX
219 default 17
220
a4c3733d
CH
221# set if we run in machine mode, cleared if we run in supervisor mode
222config RISCV_M_MODE
223 bool
6bd33e1e 224 default !MMU
a4c3733d 225
eded8bc6
DLM
226# set if we are running in S-mode and can use SBI calls
227config RISCV_SBI
228 bool
229 depends on !RISCV_M_MODE
230 default y
231
fbe934d6 232config MMU
6bd33e1e
CH
233 bool "MMU-based Paged Memory Management Support"
234 default y
235 help
236 Select if you want MMU-based virtualised addressing space
237 support by paged memory management. If unsure, say 'Y'.
fbe934d6 238
fbe934d6
PD
239config PAGE_OFFSET
240 hex
b5e2c507
YG
241 default 0xC0000000 if 32BIT && MMU
242 default 0x80000000 if !MMU
011f09d1 243 default 0xff60000000000000 if 64BIT
fbe934d6 244
54c5639d
AG
245config KASAN_SHADOW_OFFSET
246 hex
247 depends on KASAN_GENERIC
f7ae0233 248 default 0xdfffffff00000000 if 64BIT
54c5639d
AG
249 default 0xffffffff if 32BIT
250
d95f1a54 251config ARCH_FLATMEM_ENABLE
4f0e8eef 252 def_bool !NUMA
d95f1a54
LG
253
254config ARCH_SPARSEMEM_ENABLE
255 def_bool y
aa273420 256 depends on MMU
199fc6b8 257 select SPARSEMEM_STATIC if 32BIT && SPARSEMEM
a5406a7f 258 select SPARSEMEM_VMEMMAP_ENABLE if 64BIT
d95f1a54
LG
259
260config ARCH_SELECT_MEMORY_MODEL
261 def_bool ARCH_SPARSEMEM_ENABLE
262
74784081
GR
263config ARCH_SUPPORTS_UPROBES
264 def_bool y
265
fbe934d6
PD
266config STACKTRACE_SUPPORT
267 def_bool y
268
fbe934d6
PD
269config GENERIC_BUG
270 def_bool y
271 depends on BUG
272 select GENERIC_BUG_RELATIVE_POINTERS if 64BIT
273
274config GENERIC_BUG_RELATIVE_POINTERS
275 bool
276
277config GENERIC_CALIBRATE_DELAY
278 def_bool y
279
280config GENERIC_CSUM
281 def_bool y
282
283config GENERIC_HWEIGHT
284 def_bool y
285
f2c17aab 286config FIX_EARLYCON_MEM
0312a3d4 287 def_bool MMU
f2c17aab 288
fbe934d6
PD
289config PGTABLE_LEVELS
290 int
011f09d1 291 default 5 if 64BIT
fbe934d6
PD
292 default 2
293
3c469798
GR
294config LOCKDEP_SUPPORT
295 def_bool y
296
1631ba12
HS
297config RISCV_DMA_NONCOHERENT
298 bool
299 select ARCH_HAS_DMA_PREP_COHERENT
1631ba12 300 select ARCH_HAS_SETUP_DMA_OPS
5f365c13
CD
301 select ARCH_HAS_SYNC_DMA_FOR_CPU
302 select ARCH_HAS_SYNC_DMA_FOR_DEVICE
f51f7a0f 303 select DMA_BOUNCE_UNALIGNED_KMALLOC if SWIOTLB
1631ba12 304
b79f300c
LP
305config RISCV_NONSTANDARD_CACHE_OPS
306 bool
b79f300c
LP
307 help
308 This enables function pointer support for non-standard noncoherent
309 systems to handle cache management.
310
5ac43ab2
AJ
311config AS_HAS_INSN
312 def_bool $(as-instr,.insn r 51$(comma) 0$(comma) 0$(comma) t0$(comma) t0$(comma) zero)
313
e4bb020f
AC
314config AS_HAS_OPTION_ARCH
315 # https://reviews.llvm.org/D123515
316 def_bool y
317 depends on $(as-instr, .option arch$(comma) +m)
e4bb020f 318
0cbb8a32 319source "arch/riscv/Kconfig.socs"
a3d095ac 320source "arch/riscv/Kconfig.errata"
0cbb8a32 321
fbe934d6
PD
322menu "Platform type"
323
44c1e84a
PD
324config NONPORTABLE
325 bool "Allow configurations that result in non-portable kernels"
326 help
327 RISC-V kernel binaries are compatible between all known systems
328 whenever possible, but there are some use cases that can only be
329 satisfied by configurations that result in kernel binaries that are
330 not portable between systems.
331
332 Selecting N does not guarantee kernels will be portable to all known
333 systems. Selecting any of the options guarded by NONPORTABLE will
334 result in kernel binaries that are unlikely to be portable between
335 systems.
336
337 If unsure, say N.
338
fbe934d6
PD
339choice
340 prompt "Base ISA"
341 default ARCH_RV64I
342 help
86cca81a 343 This selects the base ISA that this kernel will target and must match
fbe934d6
PD
344 the target platform.
345
346config ARCH_RV32I
347 bool "RV32I"
44c1e84a 348 depends on NONPORTABLE
fbe934d6 349 select 32BIT
e3d59805
MR
350 select GENERIC_LIB_ASHLDI3
351 select GENERIC_LIB_ASHRDI3
352 select GENERIC_LIB_LSHRDI3
8f79125d 353 select GENERIC_LIB_UCMPDI2
fbe934d6
PD
354
355config ARCH_RV64I
356 bool "RV64I"
fbe934d6 357 select 64BIT
d2075895 358 select ARCH_SUPPORTS_INT128 if CC_HAS_INT128
6bd33e1e 359 select SWIOTLB if MMU
fbe934d6
PD
360
361endchoice
362
363# We must be able to map all physical memory into the kernel, but the compiler
364# is still a bit more efficient when generating code if it's setup in a manner
365# such that it can only map 2GiB of memory.
366choice
367 prompt "Kernel Code Model"
368 default CMODEL_MEDLOW if 32BIT
369 default CMODEL_MEDANY if 64BIT
370
371 config CMODEL_MEDLOW
372 bool "medium low code model"
373 config CMODEL_MEDANY
374 bool "medium any code model"
375endchoice
376
ab1ef68e
ZL
377config MODULE_SECTIONS
378 bool
379 select HAVE_MOD_ARCH_SPECIFIC
380
fbe934d6
PD
381config SMP
382 bool "Symmetric Multi-Processing"
383 help
384 This enables support for systems with more than one CPU. If
385 you say N here, the kernel will run on single and
386 multiprocessor machines, but will use only one CPU of a
387 multiprocessor machine. If you say Y here, the kernel will run
388 on many, but not all, single processor machines. On a single
389 processor machine, the kernel will run faster if you say N
390 here.
391
392 If you don't know what to do here, say N.
393
8bf7b3b6
SS
394config SCHED_MC
395 bool "Multi-core scheduler support"
396 depends on SMP
397 help
398 Multi-core scheduler support improves the CPU scheduler's decision
399 making when dealing with multi-core CPU chips at a cost of slightly
400 increased overhead in some places. If unsure say N here.
401
fbe934d6 402config NR_CPUS
e623715f 403 int "Maximum number of CPUs (2-512)"
fbe934d6 404 depends on SMP
1d6b5ed4
SH
405 range 2 512 if !RISCV_SBI_V01
406 range 2 32 if RISCV_SBI_V01 && 32BIT
407 range 2 64 if RISCV_SBI_V01 && 64BIT
e623715f
AP
408 default "32" if 32BIT
409 default "64" if 64BIT
fbe934d6 410
f1e58583
AP
411config HOTPLUG_CPU
412 bool "Support for hot-pluggable CPUs"
413 depends on SMP
414 select GENERIC_IRQ_MIGRATION
415 help
416
417 Say Y here to experiment with turning CPUs off and on. CPUs
418 can be controlled through /sys/devices/system/cpu.
419
420 Say N if you want to disable CPU hotplug.
421
fbe934d6
PD
422choice
423 prompt "CPU Tuning"
424 default TUNE_GENERIC
425
426config TUNE_GENERIC
427 bool "generic"
428
429endchoice
430
4f0e8eef
AP
431# Common NUMA Features
432config NUMA
433 bool "NUMA Memory Allocation and Scheduler Support"
1adbc294 434 depends on SMP && MMU
5f365c13 435 select ARCH_SUPPORTS_NUMA_BALANCING
4f0e8eef 436 select GENERIC_ARCH_NUMA
6b9f29b8 437 select HAVE_SETUP_PER_CPU_AREA
5f365c13 438 select NEED_PER_CPU_EMBED_FIRST_CHUNK
6b9f29b8 439 select NEED_PER_CPU_PAGE_FIRST_CHUNK
4f0e8eef 440 select OF_NUMA
7ecd19cf 441 select USE_PERCPU_NUMA_NODE_ID
4f0e8eef
AP
442 help
443 Enable NUMA (Non-Uniform Memory Access) support.
444
445 The kernel will try to allocate memory used by a CPU on the
446 local memory of the CPU and add some more NUMA awareness to the kernel.
447
448config NODES_SHIFT
449 int "Maximum NUMA Nodes (as a power of 2)"
450 range 1 10
451 default "2"
a9ee6cf5 452 depends on NUMA
4f0e8eef
AP
453 help
454 Specify the maximum number of NUMA Nodes available on the target
455 system. Increases memory reserved to accommodate various tables.
456
e64f737a
HS
457config RISCV_ALTERNATIVE
458 bool
459 depends on !XIP_KERNEL
460 help
461 This Kconfig allows the kernel to automatically patch the
ff19a8de
AJ
462 erratum or cpufeature required by the execution platform at run
463 time. The code patching overhead is minimal, as it's only done
464 once at boot and once on each module load.
e64f737a 465
a35707c3
HS
466config RISCV_ALTERNATIVE_EARLY
467 bool
468 depends on RISCV_ALTERNATIVE
469 help
470 Allows early patching of the kernel for special errata
471
fbe934d6
PD
472config RISCV_ISA_C
473 bool "Emit compressed instructions when building Linux"
474 default y
475 help
2f66a3d0
JH
476 Adds "C" to the ISA subsets that the toolchain is allowed to emit
477 when building Linux, which results in compressed instructions in the
478 Linux binary.
fbe934d6 479
2f66a3d0 480 If you don't know what to do here, say Y.
fbe934d6 481
23ad288a 482config RISCV_ISA_SVNAPOT
5464912c 483 bool "Svnapot extension support for supervisor mode NAPOT pages"
23ad288a 484 depends on 64BIT && MMU
d34a6b71 485 depends on RISCV_ALTERNATIVE
23ad288a 486 default y
23ad288a 487 help
5464912c 488 Allow kernel to detect the Svnapot ISA-extension dynamically at boot
23ad288a
QP
489 time and enable its usage.
490
5464912c 491 The Svnapot extension is used to mark contiguous PTEs as a range
23ad288a
QP
492 of contiguous virtual-to-physical translations for a naturally
493 aligned power-of-2 (NAPOT) granularity larger than the base 4KB page
494 size. When HUGETLBFS is also selected this option unconditionally
495 allocates some memory for each NAPOT page size supported by the kernel.
496 When optimizing for low memory consumption and for platforms without
5464912c 497 the Svnapot extension, it may be better to say N here.
23ad288a
QP
498
499 If you don't know what to do here, say Y.
500
ff689fd2 501config RISCV_ISA_SVPBMT
5464912c 502 bool "Svpbmt extension support for supervisor mode page-based memory types"
ff689fd2 503 depends on 64BIT && MMU
1ee7fc3f 504 depends on RISCV_ALTERNATIVE
ff689fd2
HS
505 default y
506 help
5464912c 507 Adds support to dynamically detect the presence of the Svpbmt
924cbb8c
HS
508 ISA-extension (Supervisor-mode: page-based memory types) and
509 enable its usage.
510
511 The memory type for a page contains a combination of attributes
512 that indicate the cacheability, idempotency, and ordering
513 properties for access to that page.
ff689fd2 514
5464912c 515 The Svpbmt extension is only available on 64-bit cpus.
ff689fd2
HS
516
517 If you don't know what to do here, say Y.
518
fa8e7cce
GR
519config TOOLCHAIN_HAS_V
520 bool
521 default y
522 depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64iv)
523 depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32iv)
524 depends on LLD_VERSION >= 140000 || LD_VERSION >= 23800
525 depends on AS_HAS_OPTION_ARCH
526
527config RISCV_ISA_V
528 bool "VECTOR extension support"
529 depends on TOOLCHAIN_HAS_V
530 depends on FPU
531 select DYNAMIC_SIGFRAME
532 default y
533 help
534 Say N here if you want to disable all vector related procedure
535 in the kernel.
536
537 If you don't know what to do here, say Y.
538
539config RISCV_ISA_V_DEFAULT_ENABLE
540 bool "Enable userspace Vector by default"
541 depends on RISCV_ISA_V
542 default y
543 help
544 Say Y here if you want to enable Vector in userspace by default.
545 Otherwise, userspace has to make explicit prctl() call to enable
546 Vector, or enable it via the sysctl interface.
547
548 If you don't know what to do here, say Y.
549
c2a658d4
AC
550config RISCV_ISA_V_UCOPY_THRESHOLD
551 int "Threshold size for vectorized user copies"
552 depends on RISCV_ISA_V
553 default 768
554 help
555 Prefer using vectorized copy_to_user()/copy_from_user() when the
556 workload size exceeds this value.
557
2080ff94
AC
558config RISCV_ISA_V_PREEMPTIVE
559 bool "Run kernel-mode Vector with kernel preemption"
560 depends on PREEMPTION
561 depends on RISCV_ISA_V
562 default y
563 help
564 Usually, in-kernel SIMD routines are run with preemption disabled.
565 Functions which envoke long running SIMD thus must yield core's
566 vector unit to prevent blocking other tasks for too long.
567
568 This config allows kernel to run SIMD without explicitly disable
569 preemption. Enabling this config will result in higher memory
570 consumption due to the allocation of per-task's kernel Vector context.
571
b6fcdb19 572config TOOLCHAIN_HAS_ZBB
1631ba12 573 bool
b8c86872 574 default y
b6fcdb19
HS
575 depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64ima_zbb)
576 depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32ima_zbb)
577 depends on LLD_VERSION >= 150000 || LD_VERSION >= 23900
e4bb020f 578 depends on AS_HAS_OPTION_ARCH
b6fcdb19
HS
579
580config RISCV_ISA_ZBB
581 bool "Zbb extension support for bit manipulation instructions"
582 depends on TOOLCHAIN_HAS_ZBB
1ee7fc3f
CD
583 depends on MMU
584 depends on RISCV_ALTERNATIVE
b6fcdb19
HS
585 default y
586 help
587 Adds support to dynamically detect the presence of the ZBB
588 extension (basic bit manipulation) and enable its usage.
589
590 The Zbb extension provides instructions to accelerate a number
591 of bit-specific operations (count bit population, sign extending,
592 bitrotation, etc).
593
594 If you don't know what to do here, say Y.
1631ba12
HS
595
596config RISCV_ISA_ZICBOM
597 bool "Zicbom extension support for non-coherent DMA operation"
1ee7fc3f
CD
598 depends on MMU
599 depends on RISCV_ALTERNATIVE
1631ba12 600 default y
5f365c13 601 select RISCV_DMA_NONCOHERENT
381cae16 602 select DMA_DIRECT_REMAP
1631ba12
HS
603 help
604 Adds support to dynamically detect the presence of the ZICBOM
605 extension (Cache Block Management Operations) and enable its
606 usage.
607
608 The Zicbom extension can be used to handle for example
609 non-coherent DMA support on devices that need it.
610
611 If you don't know what to do here, say Y.
612
ab0f7746
AJ
613config RISCV_ISA_ZICBOZ
614 bool "Zicboz extension support for faster zeroing of memory"
d34a6b71
CD
615 depends on MMU
616 depends on RISCV_ALTERNATIVE
ab0f7746
AJ
617 default y
618 help
5464912c 619 Enable the use of the Zicboz extension (cbo.zero instruction)
ab0f7746
AJ
620 when available.
621
622 The Zicboz extension is used for faster zeroing of memory.
623
624 If you don't know what to do here, say Y.
625
aae538cd
CD
626config TOOLCHAIN_HAS_ZIHINTPAUSE
627 bool
628 default y
629 depends on !64BIT || $(cc-option,-mabi=lp64 -march=rv64ima_zihintpause)
630 depends on !32BIT || $(cc-option,-mabi=ilp32 -march=rv32ima_zihintpause)
631 depends on LLD_VERSION >= 150000 || LD_VERSION >= 23600
632
e89c2e81
NC
633config TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI
634 def_bool y
635 # https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=aed44286efa8ae8717a77d94b51ac3614e2ca6dc
ca09f772
MX
636 # https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=98416dbb0a62579d4a7a4a76bab51b5b52fec2cd
637 depends on AS_IS_GNU && AS_VERSION >= 23600
e89c2e81 638 help
ca09f772
MX
639 Binutils-2.38 and GCC-12.1.0 bumped the default ISA spec to the newer
640 20191213 version, which moves some instructions from the I extension to
641 the Zicsr and Zifencei extensions. This requires explicitly specifying
642 Zicsr and Zifencei when binutils >= 2.38 or GCC >= 12.1.0. Zicsr
643 and Zifencei are supported in binutils from version 2.36 onwards.
644 To make life easier, and avoid forcing toolchains that default to a
645 newer ISA spec to version 2.2, relax the check to binutils >= 2.36.
ef21fa7c
MX
646 For clang < 17 or GCC < 11.3.0, for which this is not possible or need
647 special treatment, this is dealt with in TOOLCHAIN_NEEDS_OLD_ISA_SPEC.
e89c2e81
NC
648
649config TOOLCHAIN_NEEDS_OLD_ISA_SPEC
650 def_bool y
651 depends on TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI
652 # https://github.com/llvm/llvm-project/commit/22e199e6afb1263c943c0c0d4498694e15bf8a16
ef21fa7c
MX
653 # https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=d29f5d6ab513c52fd872f532c492e35ae9fd6671
654 depends on (CC_IS_CLANG && CLANG_VERSION < 170000) || (CC_IS_GCC && GCC_VERSION < 110300)
e89c2e81 655 help
ca09f772
MX
656 Certain versions of clang and GCC do not support zicsr and zifencei via
657 -march. This option causes an older ISA spec compatible with these older
658 versions of clang and GCC to be passed to GAS, which has the same result
659 as passing zicsr and zifencei to -march.
e89c2e81 660
9671f706
AK
661config FPU
662 bool "FPU support"
663 default y
664 help
665 Say N here if you want to disable all floating-point related procedure
666 in the kernel.
667
668 If you don't know what to do here, say Y.
669
163e76cc 670config IRQ_STACKS
dd69d07a 671 bool "Independent irq & softirq stacks" if EXPERT
163e76cc
GR
672 default y
673 select HAVE_IRQ_EXIT_ON_IRQ_STACK
dd69d07a 674 select HAVE_SOFTIRQ_ON_OWN_STACK
163e76cc 675 help
dd69d07a
GR
676 Add independent irq & softirq stacks for percpu to prevent kernel stack
677 overflows. We may save some memory footprint by disabling IRQ_STACKS.
163e76cc 678
a7555f6b
GR
679config THREAD_SIZE_ORDER
680 int "Kernel stack size (in power-of-two numbers of page size)" if VMAP_STACK && EXPERT
681 range 0 4
682 default 1 if 32BIT && !KASAN
683 default 3 if 64BIT && KASAN
684 default 2
685 help
686 Specify the Pages of thread stack size (from 4KB to 64KB), which also
687 affects irq stack size, which is equal to thread stack size.
688
7c832321
CL
689config RISCV_MISALIGNED
690 bool "Support misaligned load/store traps for kernel and userspace"
bc38f613 691 select SYSCTL_ARCH_UNALIGN_ALLOW
7c832321
CL
692 default y
693 help
694 Say Y here if you want the kernel to embed support for misaligned
695 load/store for both kernel and userspace. When disable, misaligned
696 accesses will generate SIGBUS in userspace and panic in kernel.
697
b6da6cbe
JZ
698config RISCV_EFFICIENT_UNALIGNED_ACCESS
699 bool "Assume the CPU supports fast unaligned memory accesses"
700 depends on NONPORTABLE
d0fdc20b 701 select DCACHE_WORD_ACCESS if MMU
b6da6cbe
JZ
702 select HAVE_EFFICIENT_UNALIGNED_ACCESS
703 help
704 Say Y here if you want the kernel to assume that the CPU supports
705 efficient unaligned memory accesses. When enabled, this option
706 improves the performance of the kernel on such CPUs. However, the
707 kernel will run much more slowly, or will not be able to run at all,
708 on CPUs that do not support efficient unaligned memory accesses.
709
710 If unsure what to do here, say N.
711
2f66a3d0 712endmenu # "Platform type"
fbe934d6 713
aef53f97 714menu "Kernel features"
fbe934d6 715
fbe934d6
PD
716source "kernel/Kconfig.hz"
717
efca1398
AP
718config RISCV_SBI_V01
719 bool "SBI v0.1 support"
efca1398
AP
720 depends on RISCV_SBI
721 help
722 This config allows kernel to use SBI v0.1 APIs. This will be
723 deprecated in future once legacy M-mode software are no longer in use.
fba8a867 724
2ffc48fc
AP
725config RISCV_BOOT_SPINWAIT
726 bool "Spinwait booting method"
727 depends on SMP
77d707a3 728 default y if RISCV_SBI_V01 || RISCV_M_MODE
2ffc48fc
AP
729 help
730 This enables support for booting Linux via spinwait method. In the
731 spinwait method, all cores randomly jump to Linux. One of the cores
732 gets chosen via lottery and all other keep spinning on a percpu
733 variable. This method cannot support CPU hotplug and sparse hartid
734 scheme. It should be only enabled for M-mode Linux or platforms relying
735 on older firmware without SBI HSM extension. All other platforms should
736 rely on ordered booting via SBI HSM extension which gets chosen
737 dynamically at runtime if the firmware supports it.
738
77d707a3
PD
739 Since spinwait is incompatible with sparse hart IDs, it requires
740 NR_CPUS be large enough to contain the physical hart ID of the first
741 hart to enter Linux.
742
743 If unsure what to do here, say N.
744
1f0d6efe 745config ARCH_SUPPORTS_KEXEC
c41bd251 746 def_bool y
1f0d6efe
ED
747
748config ARCH_SELECTS_KEXEC
749 def_bool y
750 depends on KEXEC
5f365c13 751 select HOTPLUG_CPU if SMP
fba8a867 752
1f0d6efe 753config ARCH_SUPPORTS_KEXEC_FILE
c41bd251 754 def_bool 64BIT
fba8a867 755
1f0d6efe
ED
756config ARCH_SELECTS_KEXEC_FILE
757 def_bool y
758 depends on KEXEC_FILE
5f365c13 759 select HAVE_IMA_KEXEC if IMA
6261586e 760 select KEXEC_ELF
6261586e 761
e6265fe7 762config ARCH_SUPPORTS_KEXEC_PURGATORY
c1ad12ee 763 def_bool ARCH_SUPPORTS_KEXEC_FILE
736e30af 764
1f0d6efe
ED
765config ARCH_SUPPORTS_CRASH_DUMP
766 def_bool y
fba8a867 767
39365395
BH
768config ARCH_HAS_GENERIC_CRASHKERNEL_RESERVATION
769 def_bool CRASH_CORE
770
9be84592
GR
771config COMPAT
772 bool "Kernel support for 32-bit U-mode"
773 default 64BIT
774 depends on 64BIT && MMU
775 help
776 This option enables support for a 32-bit U-mode running under a 64-bit
777 kernel at S-mode. riscv32-specific components such as system calls,
778 the user helper functions (vdso), signal rt_frame functions and the
779 ptrace interface are handled appropriately by the kernel.
780
781 If you want to execute 32-bit userspace applications, say Y.
782
fdf68acc
AJ
783config PARAVIRT
784 bool "Enable paravirtualization code"
785 depends on RISCV_SBI
786 help
787 This changes the kernel so it can modify itself when it is run
788 under a hypervisor, potentially improving performance significantly
789 over full virtualization.
790
791config PARAVIRT_TIME_ACCOUNTING
792 bool "Paravirtual steal time accounting"
793 depends on PARAVIRT
794 help
795 Select this option to enable fine granularity task steal time
796 accounting. Time spent executing other tasks in parallel with
797 the current vCPU is discounted from the vCPU power. To account for
798 that, there can be a small performance impact.
799
800 If in doubt, say N here.
801
39b33072
AG
802config RELOCATABLE
803 bool "Build a relocatable kernel"
804 depends on MMU && 64BIT && !XIP_KERNEL
805 help
806 This builds a kernel as a Position Independent Executable (PIE),
807 which retains all relocation metadata required to relocate the
808 kernel binary at runtime to a different virtual address than the
809 address it was linked at.
810 Since RISCV uses the RELA relocation format, this requires a
811 relocation pass at runtime even if the kernel is loaded at the
812 same address it was linked at.
813
814 If unsure, say N.
815
84fe419d
AG
816config RANDOMIZE_BASE
817 bool "Randomize the address of the kernel image"
818 select RELOCATABLE
819 depends on MMU && 64BIT && !XIP_KERNEL
820 help
821 Randomizes the virtual address at which the kernel image is
822 loaded, as a security feature that deters exploit attempts
823 relying on knowledge of the location of kernel internals.
824
825 It is the bootloader's job to provide entropy, by passing a
826 random u64 value in /chosen/kaslr-seed at kernel entry.
827
828 When booting via the UEFI stub, it will invoke the firmware's
829 EFI_RNG_PROTOCOL implementation (if available) to supply entropy
830 to the kernel proper. In addition, it will randomise the physical
831 location of the kernel Image as well.
832
833 If unsure, say N.
834
2f66a3d0 835endmenu # "Kernel features"
fbe934d6 836
aef53f97
NK
837menu "Boot options"
838
3aed8c43
NK
839config CMDLINE
840 string "Built-in kernel command line"
aef53f97 841 help
3aed8c43
NK
842 For most platforms, the arguments for the kernel's command line
843 are provided at run-time, during boot. However, there are cases
844 where either no arguments are being provided or the provided
845 arguments are insufficient or even invalid.
aef53f97 846
3aed8c43
NK
847 When that occurs, it is possible to define a built-in command
848 line here and choose how the kernel should use it later on.
aef53f97 849
3aed8c43
NK
850choice
851 prompt "Built-in command line usage" if CMDLINE != ""
852 default CMDLINE_FALLBACK
853 help
854 Choose how the kernel will handle the provided built-in command
855 line.
aef53f97 856
3aed8c43
NK
857config CMDLINE_FALLBACK
858 bool "Use bootloader kernel arguments if available"
aef53f97 859 help
3aed8c43
NK
860 Use the built-in command line as fallback in case we get nothing
861 during boot. This is the default behaviour.
862
863config CMDLINE_EXTEND
864 bool "Extend bootloader kernel arguments"
865 help
866 The command-line arguments provided during boot will be
867 appended to the built-in command line. This is useful in
868 cases where the provided arguments are insufficient and
869 you don't want to or cannot modify them.
870
aef53f97 871config CMDLINE_FORCE
3aed8c43 872 bool "Always use the default kernel command string"
aef53f97 873 help
3aed8c43
NK
874 Always use the built-in command line, even if we get one during
875 boot. This is useful in case you need to override the provided
876 command line on systems where you don't have or want control
877 over it.
aef53f97 878
3aed8c43 879endchoice
aef53f97 880
d7071743
AP
881config EFI_STUB
882 bool
883
884config EFI
885 bool "UEFI runtime support"
44c92257 886 depends on OF && !XIP_KERNEL
5f365c13
CD
887 depends on MMU
888 default y
a91a9ffb 889 select ARCH_SUPPORTS_ACPI if 64BIT
d7071743 890 select EFI_GENERIC_STUB
5f365c13 891 select EFI_PARAMS_FROM_FDT
b91540d5 892 select EFI_RUNTIME_WRAPPERS
5f365c13
CD
893 select EFI_STUB
894 select LIBFDT
d7071743 895 select RISCV_ISA_C
5f365c13 896 select UCS2_STRING
d7071743
AP
897 help
898 This option provides support for runtime services provided
899 by UEFI firmware (such as non-volatile variables, realtime
900 clock, and platform reset). A UEFI stub is also provided to
901 allow the kernel to be booted as an EFI application. This
902 is only useful on systems that have UEFI firmware.
903
fea2fed2
GR
904config CC_HAVE_STACKPROTECTOR_TLS
905 def_bool $(cc-option,-mstack-protector-guard=tls -mstack-protector-guard-reg=tp -mstack-protector-guard-offset=0)
906
907config STACKPROTECTOR_PER_TASK
908 def_bool y
595b893e 909 depends on !RANDSTRUCT
fea2fed2
GR
910 depends on STACKPROTECTOR && CC_HAVE_STACKPROTECTOR_TLS
911
867432be
AG
912config PHYS_RAM_BASE_FIXED
913 bool "Explicitly specified physical RAM address"
44c1e84a 914 depends on NONPORTABLE
867432be
AG
915 default n
916
44c92257
VW
917config PHYS_RAM_BASE
918 hex "Platform Physical RAM address"
867432be 919 depends on PHYS_RAM_BASE_FIXED
44c92257
VW
920 default "0x80000000"
921 help
922 This is the physical address of RAM in the system. It has to be
923 explicitly specified to run early relocations of read-write data
924 from flash to RAM.
925
926config XIP_KERNEL
927 bool "Kernel Execute-In-Place from ROM"
44c1e84a 928 depends on MMU && SPARSEMEM && NONPORTABLE
44c92257
VW
929 # This prevents XIP from being enabled by all{yes,mod}config, which
930 # fail to build since XIP doesn't support large kernels.
931 depends on !COMPILE_TEST
867432be 932 select PHYS_RAM_BASE_FIXED
44c92257
VW
933 help
934 Execute-In-Place allows the kernel to run from non-volatile storage
935 directly addressable by the CPU, such as NOR flash. This saves RAM
936 space since the text section of the kernel is not loaded from flash
937 to RAM. Read-write sections, such as the data section and stack,
938 are still copied to RAM. The XIP kernel is not compressed since
939 it has to run directly from flash, so it will take more space to
940 store it. The flash address used to link the kernel object files,
941 and for storing it, is configuration dependent. Therefore, if you
942 say Y here, you must know the proper physical address where to
943 store the kernel image depending on your own flash memory usage.
944
945 Also note that the make target becomes "make xipImage" rather than
946 "make zImage" or "make Image". The final kernel binary to put in
947 ROM memory will be arch/riscv/boot/xipImage.
948
949 SPARSEMEM is required because the kernel text and rodata that are
950 flash resident are not backed by memmap, then any attempt to get
951 a struct page on those regions will trigger a fault.
952
953 If unsure, say N.
954
955config XIP_PHYS_ADDR
956 hex "XIP Kernel Physical Location"
957 depends on XIP_KERNEL
958 default "0x21000000"
959 help
960 This is the physical address in your flash memory the kernel will
961 be linked for and stored to. This address is dependent on your
962 own flash usage.
963
496ea826
CD
964config RISCV_ISA_FALLBACK
965 bool "Permit falling back to parsing riscv,isa for extension support by default"
966 default y
967 help
968 Parsing the "riscv,isa" devicetree property has been deprecated and
969 replaced by a list of explicitly defined strings. For compatibility
970 with existing platforms, the kernel will fall back to parsing the
971 "riscv,isa" property if the replacements are not found.
972
973 Selecting N here will result in a kernel that does not use the
974 fallback, unless the commandline "riscv_isa_fallback" parameter is
975 present.
976
977 Please see the dt-binding, located at
978 Documentation/devicetree/bindings/riscv/extensions.yaml for details
979 on the replacement properties, "riscv,isa-base" and
980 "riscv,isa-extensions".
981
2d268251 982config BUILTIN_DTB
6c4a2f63 983 bool "Built-in device tree"
44c1e84a 984 depends on OF && NONPORTABLE
44c92257 985 default y if XIP_KERNEL
2d268251 986
6c4a2f63
FH
987endmenu # "Boot options"
988
44c1e84a
PD
989config PORTABLE
990 bool
991 default !NONPORTABLE
992 select EFI
44c1e84a 993 select MMU
5f365c13 994 select OF
44c1e84a 995
e0c0a7c3
AS
996config ARCH_PROC_KCORE_TEXT
997 def_bool y
998
fbe934d6
PD
999menu "Power management options"
1000
8636a1f9 1001source "kernel/power/Kconfig"
fbe934d6 1002
ed309ce5
CD
1003# Hibernation is only possible on systems where the SBI implementation has
1004# marked its reserved memory as not accessible from, or does not run
1005# from the same memory as, Linux
c0317210 1006config ARCH_HIBERNATION_POSSIBLE
ed309ce5 1007 def_bool NONPORTABLE
c0317210
SJH
1008
1009config ARCH_HIBERNATION_HEADER
1010 def_bool HIBERNATION
1011
c1f048a6
SS
1012config ARCH_SUSPEND_POSSIBLE
1013 def_bool y
1014
2f66a3d0 1015endmenu # "Power management options"
d7071743 1016
f6e64b66
AP
1017menu "CPU Power Management"
1018
1019source "drivers/cpuidle/Kconfig"
1020
effae0e3
LP
1021source "drivers/cpufreq/Kconfig"
1022
2f66a3d0 1023endmenu # "CPU Power Management"
f6e64b66 1024
99cdc6c1 1025source "arch/riscv/kvm/Kconfig"
a91a9ffb
S
1026
1027source "drivers/acpi/Kconfig"
This page took 0.593894 seconds and 4 git commands to generate.