Kconfig 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522
  1. # SPDX-License-Identifier: GPL-2.0
  2. config LOONGARCH
  3. bool
  4. default y
  5. select ACPI
  6. select ACPI_GENERIC_GSI if ACPI
  7. select ACPI_MCFG if ACPI
  8. select ACPI_SYSTEM_POWER_STATES_SUPPORT if ACPI
  9. select ARCH_BINFMT_ELF_STATE
  10. select ARCH_ENABLE_MEMORY_HOTPLUG
  11. select ARCH_ENABLE_MEMORY_HOTREMOVE
  12. select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI
  13. select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
  14. select ARCH_HAS_PTE_SPECIAL
  15. select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
  16. select ARCH_INLINE_READ_LOCK if !PREEMPTION
  17. select ARCH_INLINE_READ_LOCK_BH if !PREEMPTION
  18. select ARCH_INLINE_READ_LOCK_IRQ if !PREEMPTION
  19. select ARCH_INLINE_READ_LOCK_IRQSAVE if !PREEMPTION
  20. select ARCH_INLINE_READ_UNLOCK if !PREEMPTION
  21. select ARCH_INLINE_READ_UNLOCK_BH if !PREEMPTION
  22. select ARCH_INLINE_READ_UNLOCK_IRQ if !PREEMPTION
  23. select ARCH_INLINE_READ_UNLOCK_IRQRESTORE if !PREEMPTION
  24. select ARCH_INLINE_WRITE_LOCK if !PREEMPTION
  25. select ARCH_INLINE_WRITE_LOCK_BH if !PREEMPTION
  26. select ARCH_INLINE_WRITE_LOCK_IRQ if !PREEMPTION
  27. select ARCH_INLINE_WRITE_LOCK_IRQSAVE if !PREEMPTION
  28. select ARCH_INLINE_WRITE_UNLOCK if !PREEMPTION
  29. select ARCH_INLINE_WRITE_UNLOCK_BH if !PREEMPTION
  30. select ARCH_INLINE_WRITE_UNLOCK_IRQ if !PREEMPTION
  31. select ARCH_INLINE_WRITE_UNLOCK_IRQRESTORE if !PREEMPTION
  32. select ARCH_INLINE_SPIN_TRYLOCK if !PREEMPTION
  33. select ARCH_INLINE_SPIN_TRYLOCK_BH if !PREEMPTION
  34. select ARCH_INLINE_SPIN_LOCK if !PREEMPTION
  35. select ARCH_INLINE_SPIN_LOCK_BH if !PREEMPTION
  36. select ARCH_INLINE_SPIN_LOCK_IRQ if !PREEMPTION
  37. select ARCH_INLINE_SPIN_LOCK_IRQSAVE if !PREEMPTION
  38. select ARCH_INLINE_SPIN_UNLOCK if !PREEMPTION
  39. select ARCH_INLINE_SPIN_UNLOCK_BH if !PREEMPTION
  40. select ARCH_INLINE_SPIN_UNLOCK_IRQ if !PREEMPTION
  41. select ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE if !PREEMPTION
  42. select ARCH_KEEP_MEMBLOCK
  43. select ARCH_MIGHT_HAVE_PC_PARPORT
  44. select ARCH_MIGHT_HAVE_PC_SERIO
  45. select ARCH_SPARSEMEM_ENABLE
  46. select ARCH_STACKWALK
  47. select ARCH_SUPPORTS_ACPI
  48. select ARCH_SUPPORTS_ATOMIC_RMW
  49. select ARCH_SUPPORTS_HUGETLBFS
  50. select ARCH_SUPPORTS_NUMA_BALANCING
  51. select ARCH_USE_BUILTIN_BSWAP
  52. select ARCH_USE_CMPXCHG_LOCKREF
  53. select ARCH_USE_QUEUED_RWLOCKS
  54. select ARCH_USE_QUEUED_SPINLOCKS
  55. select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT
  56. select ARCH_WANT_LD_ORPHAN_WARN
  57. select ARCH_WANTS_NO_INSTR
  58. select BUILDTIME_TABLE_SORT
  59. select COMMON_CLK
  60. select EFI
  61. select GENERIC_CLOCKEVENTS
  62. select GENERIC_CMOS_UPDATE
  63. select GENERIC_CPU_AUTOPROBE
  64. select GENERIC_ENTRY
  65. select GENERIC_GETTIMEOFDAY
  66. select GENERIC_IOREMAP if !ARCH_IOREMAP
  67. select GENERIC_IRQ_MULTI_HANDLER
  68. select GENERIC_IRQ_PROBE
  69. select GENERIC_IRQ_SHOW
  70. select GENERIC_LIB_ASHLDI3
  71. select GENERIC_LIB_ASHRDI3
  72. select GENERIC_LIB_CMPDI2
  73. select GENERIC_LIB_LSHRDI3
  74. select GENERIC_LIB_UCMPDI2
  75. select GENERIC_LIB_DEVMEM_IS_ALLOWED
  76. select GENERIC_PCI_IOMAP
  77. select GENERIC_SCHED_CLOCK
  78. select GENERIC_SMP_IDLE_THREAD
  79. select GENERIC_TIME_VSYSCALL
  80. select GPIOLIB
  81. select HAVE_ARCH_AUDITSYSCALL
  82. select HAVE_ARCH_MMAP_RND_BITS if MMU
  83. select HAVE_ARCH_SECCOMP_FILTER
  84. select HAVE_ARCH_TRACEHOOK
  85. select HAVE_ARCH_TRANSPARENT_HUGEPAGE
  86. select HAVE_ASM_MODVERSIONS
  87. select HAVE_CONTEXT_TRACKING_USER
  88. select HAVE_DEBUG_STACKOVERFLOW
  89. select HAVE_DMA_CONTIGUOUS
  90. select HAVE_EBPF_JIT
  91. select HAVE_EXIT_THREAD
  92. select HAVE_FAST_GUP
  93. select HAVE_GENERIC_VDSO
  94. select HAVE_IOREMAP_PROT
  95. select HAVE_IRQ_EXIT_ON_IRQ_STACK
  96. select HAVE_IRQ_TIME_ACCOUNTING
  97. select HAVE_MOD_ARCH_SPECIFIC
  98. select HAVE_NMI
  99. select HAVE_PCI
  100. select HAVE_PERF_EVENTS
  101. select HAVE_PERF_REGS
  102. select HAVE_PERF_USER_STACK_DUMP
  103. select HAVE_REGS_AND_STACK_ACCESS_API
  104. select HAVE_RSEQ
  105. select HAVE_SETUP_PER_CPU_AREA if NUMA
  106. select HAVE_SYSCALL_TRACEPOINTS
  107. select HAVE_TIF_NOHZ
  108. select HAVE_VIRT_CPU_ACCOUNTING_GEN if !SMP
  109. select IRQ_FORCED_THREADING
  110. select IRQ_LOONGARCH_CPU
  111. select LOCK_MM_AND_FIND_VMA
  112. select MMU_GATHER_MERGE_VMAS if MMU
  113. select MODULES_USE_ELF_RELA if MODULES
  114. select NEED_PER_CPU_EMBED_FIRST_CHUNK
  115. select NEED_PER_CPU_PAGE_FIRST_CHUNK
  116. select PCI
  117. select PCI_DOMAINS_GENERIC
  118. select PCI_ECAM if ACPI
  119. select PCI_LOONGSON
  120. select PCI_MSI_ARCH_FALLBACKS
  121. select PCI_QUIRKS
  122. select PERF_USE_VMALLOC
  123. select RTC_LIB
  124. select SMP
  125. select SPARSE_IRQ
  126. select SYSCTL_EXCEPTION_TRACE
  127. select SWIOTLB
  128. select TRACE_IRQFLAGS_SUPPORT
  129. select USE_PERCPU_NUMA_NODE_ID
  130. select USER_STACKTRACE_SUPPORT
  131. select ZONE_DMA32
  132. config 32BIT
  133. bool
  134. config 64BIT
  135. def_bool y
  136. config CPU_HAS_FPU
  137. bool
  138. default y
  139. config CPU_HAS_PREFETCH
  140. bool
  141. default y
  142. config GENERIC_BUG
  143. def_bool y
  144. depends on BUG
  145. config GENERIC_BUG_RELATIVE_POINTERS
  146. def_bool y
  147. depends on GENERIC_BUG
  148. config GENERIC_CALIBRATE_DELAY
  149. def_bool y
  150. config GENERIC_CSUM
  151. def_bool y
  152. config GENERIC_HWEIGHT
  153. def_bool y
  154. config L1_CACHE_SHIFT
  155. int
  156. default "6"
  157. config LOCKDEP_SUPPORT
  158. bool
  159. default y
  160. config STACKTRACE_SUPPORT
  161. bool
  162. default y
  163. # MACH_LOONGSON32 and MACH_LOONGSON64 are deliberately carried over from the
  164. # MIPS Loongson code, to preserve Loongson-specific code paths in drivers that
  165. # are shared between architectures, and specifically expecting the symbols.
  166. config MACH_LOONGSON32
  167. def_bool 32BIT
  168. config MACH_LOONGSON64
  169. def_bool 64BIT
  170. config FIX_EARLYCON_MEM
  171. def_bool y
  172. config PAGE_SIZE_4KB
  173. bool
  174. config PAGE_SIZE_16KB
  175. bool
  176. config PAGE_SIZE_64KB
  177. bool
  178. config PGTABLE_2LEVEL
  179. bool
  180. config PGTABLE_3LEVEL
  181. bool
  182. config PGTABLE_4LEVEL
  183. bool
  184. config PGTABLE_LEVELS
  185. int
  186. default 2 if PGTABLE_2LEVEL
  187. default 3 if PGTABLE_3LEVEL
  188. default 4 if PGTABLE_4LEVEL
  189. config SCHED_OMIT_FRAME_POINTER
  190. bool
  191. default y
  192. config AS_HAS_EXPLICIT_RELOCS
  193. def_bool $(as-instr,x:pcalau12i \$t0$(comma)%pc_hi20(x))
  194. menu "Kernel type and options"
  195. source "kernel/Kconfig.hz"
  196. choice
  197. prompt "Page Table Layout"
  198. default 16KB_2LEVEL if 32BIT
  199. default 16KB_3LEVEL if 64BIT
  200. help
  201. Allows choosing the page table layout, which is a combination
  202. of page size and page table levels. The size of virtual memory
  203. address space are determined by the page table layout.
  204. config 4KB_3LEVEL
  205. bool "4KB with 3 levels"
  206. select PAGE_SIZE_4KB
  207. select PGTABLE_3LEVEL
  208. help
  209. This option selects 4KB page size with 3 level page tables, which
  210. support a maximum of 39 bits of application virtual memory.
  211. config 4KB_4LEVEL
  212. bool "4KB with 4 levels"
  213. select PAGE_SIZE_4KB
  214. select PGTABLE_4LEVEL
  215. help
  216. This option selects 4KB page size with 4 level page tables, which
  217. support a maximum of 48 bits of application virtual memory.
  218. config 16KB_2LEVEL
  219. bool "16KB with 2 levels"
  220. select PAGE_SIZE_16KB
  221. select PGTABLE_2LEVEL
  222. help
  223. This option selects 16KB page size with 2 level page tables, which
  224. support a maximum of 36 bits of application virtual memory.
  225. config 16KB_3LEVEL
  226. bool "16KB with 3 levels"
  227. select PAGE_SIZE_16KB
  228. select PGTABLE_3LEVEL
  229. help
  230. This option selects 16KB page size with 3 level page tables, which
  231. support a maximum of 47 bits of application virtual memory.
  232. config 64KB_2LEVEL
  233. bool "64KB with 2 levels"
  234. select PAGE_SIZE_64KB
  235. select PGTABLE_2LEVEL
  236. help
  237. This option selects 64KB page size with 2 level page tables, which
  238. support a maximum of 42 bits of application virtual memory.
  239. config 64KB_3LEVEL
  240. bool "64KB with 3 levels"
  241. select PAGE_SIZE_64KB
  242. select PGTABLE_3LEVEL
  243. help
  244. This option selects 64KB page size with 3 level page tables, which
  245. support a maximum of 55 bits of application virtual memory.
  246. endchoice
  247. config CMDLINE
  248. string "Built-in kernel command line"
  249. help
  250. For most platforms, the arguments for the kernel's command line
  251. are provided at run-time, during boot. However, there are cases
  252. where either no arguments are being provided or the provided
  253. arguments are insufficient or even invalid.
  254. When that occurs, it is possible to define a built-in command
  255. line here and choose how the kernel should use it later on.
  256. choice
  257. prompt "Kernel command line type"
  258. default CMDLINE_BOOTLOADER
  259. help
  260. Choose how the kernel will handle the provided built-in command
  261. line.
  262. config CMDLINE_BOOTLOADER
  263. bool "Use bootloader kernel arguments if available"
  264. help
  265. Prefer the command-line passed by the boot loader if available.
  266. Use the built-in command line as fallback in case we get nothing
  267. during boot. This is the default behaviour.
  268. config CMDLINE_EXTEND
  269. bool "Use built-in to extend bootloader kernel arguments"
  270. help
  271. The command-line arguments provided during boot will be
  272. appended to the built-in command line. This is useful in
  273. cases where the provided arguments are insufficient and
  274. you don't want to or cannot modify them.
  275. config CMDLINE_FORCE
  276. bool "Always use the built-in kernel command string"
  277. help
  278. Always use the built-in command line, even if we get one during
  279. boot. This is useful in case you need to override the provided
  280. command line on systems where you don't have or want control
  281. over it.
  282. endchoice
  283. config DMI
  284. bool "Enable DMI scanning"
  285. select DMI_SCAN_MACHINE_NON_EFI_FALLBACK
  286. default y
  287. help
  288. This enables SMBIOS/DMI feature for systems, and scanning of
  289. DMI to identify machine quirks.
  290. config EFI
  291. bool "EFI runtime service support"
  292. select UCS2_STRING
  293. select EFI_RUNTIME_WRAPPERS
  294. help
  295. This enables the kernel to use EFI runtime services that are
  296. available (such as the EFI variable services).
  297. config EFI_STUB
  298. bool "EFI boot stub support"
  299. default y
  300. depends on EFI
  301. select EFI_GENERIC_STUB
  302. help
  303. This kernel feature allows the kernel to be loaded directly by
  304. EFI firmware without the use of a bootloader.
  305. config SMP
  306. bool "Multi-Processing support"
  307. help
  308. This enables support for systems with more than one CPU. If you have
  309. a system with only one CPU, say N. If you have a system with more
  310. than one CPU, say Y.
  311. If you say N here, the kernel will run on uni- and multiprocessor
  312. machines, but will use only one CPU of a multiprocessor machine. If
  313. you say Y here, the kernel will run on many, but not all,
  314. uniprocessor machines. On a uniprocessor machine, the kernel
  315. will run faster if you say N here.
  316. See also the SMP-HOWTO available at <http://www.tldp.org/docs.html#howto>.
  317. If you don't know what to do here, say N.
  318. config HOTPLUG_CPU
  319. bool "Support for hot-pluggable CPUs"
  320. depends on SMP
  321. select GENERIC_IRQ_MIGRATION
  322. help
  323. Say Y here to allow turning CPUs off and on. CPUs can be
  324. controlled through /sys/devices/system/cpu.
  325. (Note: power management support will enable this option
  326. automatically on SMP systems. )
  327. Say N if you want to disable CPU hotplug.
  328. config NR_CPUS
  329. int "Maximum number of CPUs (2-256)"
  330. range 2 256
  331. depends on SMP
  332. default "64"
  333. help
  334. This allows you to specify the maximum number of CPUs which this
  335. kernel will support.
  336. config NUMA
  337. bool "NUMA Support"
  338. select SMP
  339. select ACPI_NUMA if ACPI
  340. help
  341. Say Y to compile the kernel with NUMA (Non-Uniform Memory Access)
  342. support. This option improves performance on systems with more
  343. than one NUMA node; on single node systems it is generally better
  344. to leave it disabled.
  345. config NODES_SHIFT
  346. int
  347. default "6"
  348. depends on NUMA
  349. config ARCH_FORCE_MAX_ORDER
  350. int "Maximum zone order"
  351. range 14 64 if PAGE_SIZE_64KB
  352. default "14" if PAGE_SIZE_64KB
  353. range 12 64 if PAGE_SIZE_16KB
  354. default "12" if PAGE_SIZE_16KB
  355. range 11 64
  356. default "11"
  357. help
  358. The kernel memory allocator divides physically contiguous memory
  359. blocks into "zones", where each zone is a power of two number of
  360. pages. This option selects the largest power of two that the kernel
  361. keeps in the memory allocator. If you need to allocate very large
  362. blocks of physically contiguous memory, then you may need to
  363. increase this value.
  364. This config option is actually maximum order plus one. For example,
  365. a value of 11 means that the largest free memory block is 2^10 pages.
  366. The page size is not necessarily 4KB. Keep this in mind
  367. when choosing a value for this option.
  368. config ARCH_IOREMAP
  369. bool "Enable LoongArch DMW-based ioremap()"
  370. help
  371. We use generic TLB-based ioremap() by default since it has page
  372. protection support. However, you can enable LoongArch DMW-based
  373. ioremap() for better performance.
  374. config KEXEC
  375. bool "Kexec system call"
  376. select KEXEC_CORE
  377. help
  378. kexec is a system call that implements the ability to shutdown your
  379. current kernel, and to start another kernel. It is like a reboot
  380. but it is independent of the system firmware. And like a reboot
  381. you can start any kernel with it, not just Linux.
  382. The name comes from the similarity to the exec system call.
  383. config CRASH_DUMP
  384. bool "Build kdump crash kernel"
  385. help
  386. Generate crash dump after being started by kexec. This should
  387. be normally only set in special crash dump kernels which are
  388. loaded in the main kernel with kexec-tools into a specially
  389. reserved region and then later executed after a crash by
  390. kdump/kexec.
  391. For more details see Documentation/admin-guide/kdump/kdump.rst
  392. config PHYSICAL_START
  393. hex "Physical address where the kernel is loaded"
  394. default "0x90000000a0000000"
  395. depends on CRASH_DUMP
  396. help
  397. This gives the XKPRANGE address where the kernel is loaded.
  398. If you plan to use kernel for capturing the crash dump change
  399. this value to start of the reserved region (the "X" value as
  400. specified in the "crashkernel=YM@XM" command line boot parameter
  401. passed to the panic-ed kernel).
  402. config SECCOMP
  403. bool "Enable seccomp to safely compute untrusted bytecode"
  404. depends on PROC_FS
  405. default y
  406. help
  407. This kernel feature is useful for number crunching applications
  408. that may need to compute untrusted bytecode during their
  409. execution. By using pipes or other transports made available to
  410. the process as file descriptors supporting the read/write
  411. syscalls, it's possible to isolate those applications in
  412. their own address space using seccomp. Once seccomp is
  413. enabled via /proc/<pid>/seccomp, it cannot be disabled
  414. and the task is only allowed to execute a few safe syscalls
  415. defined by each seccomp mode.
  416. If unsure, say Y. Only embedded should say N here.
  417. endmenu
  418. config ARCH_SELECT_MEMORY_MODEL
  419. def_bool y
  420. config ARCH_FLATMEM_ENABLE
  421. def_bool y
  422. depends on !NUMA
  423. config ARCH_SPARSEMEM_ENABLE
  424. def_bool y
  425. help
  426. Say Y to support efficient handling of sparse physical memory,
  427. for architectures which are either NUMA (Non-Uniform Memory Access)
  428. or have huge holes in the physical address space for other reasons.
  429. See <file:Documentation/mm/numa.rst> for more.
  430. config ARCH_ENABLE_THP_MIGRATION
  431. def_bool y
  432. depends on TRANSPARENT_HUGEPAGE
  433. config ARCH_MEMORY_PROBE
  434. def_bool y
  435. depends on MEMORY_HOTPLUG
  436. config MMU
  437. bool
  438. default y
  439. config ARCH_MMAP_RND_BITS_MIN
  440. default 12
  441. config ARCH_MMAP_RND_BITS_MAX
  442. default 18
  443. menu "Power management options"
  444. source "drivers/acpi/Kconfig"
  445. endmenu
  446. source "drivers/firmware/Kconfig"