Kconfig 34 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231
  1. # SPDX-License-Identifier: GPL-2.0
  2. source "arch/powerpc/platforms/Kconfig.cputype"
  3. config PPC32
  4. bool
  5. default y if !PPC64
  6. config 32BIT
  7. bool
  8. default y if PPC32
  9. config 64BIT
  10. bool
  11. default y if PPC64
  12. config MMU
  13. bool
  14. default y
  15. config ARCH_MMAP_RND_BITS_MAX
  16. # On Book3S 64, the default virtual address space for 64-bit processes
  17. # is 2^47 (128TB). As a maximum, allow randomisation to consume up to
  18. # 32T of address space (2^45), which should ensure a reasonable gap
  19. # between bottom-up and top-down allocations for applications that
  20. # consume "normal" amounts of address space. Book3S 64 only supports 64K
  21. # and 4K page sizes.
  22. default 29 if PPC_BOOK3S_64 && PPC_64K_PAGES # 29 = 45 (32T) - 16 (64K)
  23. default 33 if PPC_BOOK3S_64 # 33 = 45 (32T) - 12 (4K)
  24. #
  25. # On all other 64-bit platforms (currently only Book3E), the virtual
  26. # address space is 2^46 (64TB). Allow randomisation to consume up to 16T
  27. # of address space (2^44). Only 4K page sizes are supported.
  28. default 32 if 64BIT # 32 = 44 (16T) - 12 (4K)
  29. #
  30. # For 32-bit, use the compat values, as they're the same.
  31. default ARCH_MMAP_RND_COMPAT_BITS_MAX
  32. config ARCH_MMAP_RND_BITS_MIN
  33. # Allow randomisation to consume up to 1GB of address space (2^30).
  34. default 14 if 64BIT && PPC_64K_PAGES # 14 = 30 (1GB) - 16 (64K)
  35. default 18 if 64BIT # 18 = 30 (1GB) - 12 (4K)
  36. #
  37. # For 32-bit, use the compat values, as they're the same.
  38. default ARCH_MMAP_RND_COMPAT_BITS_MIN
  39. config ARCH_MMAP_RND_COMPAT_BITS_MAX
  40. # Total virtual address space for 32-bit processes is 2^31 (2GB).
  41. # Allow randomisation to consume up to 512MB of address space (2^29).
  42. default 11 if PPC_256K_PAGES # 11 = 29 (512MB) - 18 (256K)
  43. default 13 if PPC_64K_PAGES # 13 = 29 (512MB) - 16 (64K)
  44. default 15 if PPC_16K_PAGES # 15 = 29 (512MB) - 14 (16K)
  45. default 17 # 17 = 29 (512MB) - 12 (4K)
  46. config ARCH_MMAP_RND_COMPAT_BITS_MIN
  47. # Total virtual address space for 32-bit processes is 2^31 (2GB).
  48. # Allow randomisation to consume up to 8MB of address space (2^23).
  49. default 5 if PPC_256K_PAGES # 5 = 23 (8MB) - 18 (256K)
  50. default 7 if PPC_64K_PAGES # 7 = 23 (8MB) - 16 (64K)
  51. default 9 if PPC_16K_PAGES # 9 = 23 (8MB) - 14 (16K)
  52. default 11 # 11 = 23 (8MB) - 12 (4K)
  53. config HAVE_SETUP_PER_CPU_AREA
  54. def_bool PPC64
  55. config NEED_PER_CPU_EMBED_FIRST_CHUNK
  56. def_bool PPC64
  57. config NR_IRQS
  58. int "Number of virtual interrupt numbers"
  59. range 32 32768
  60. default "512"
  61. help
  62. This defines the number of virtual interrupt numbers the kernel
  63. can manage. Virtual interrupt numbers are what you see in
  64. /proc/interrupts. If you configure your system to have too few,
  65. drivers will fail to load or worse - handle with care.
  66. config NMI_IPI
  67. bool
  68. depends on SMP && (DEBUGGER || KEXEC_CORE || HARDLOCKUP_DETECTOR)
  69. default y
  70. config PPC_WATCHDOG
  71. bool
  72. depends on HARDLOCKUP_DETECTOR
  73. depends on HAVE_HARDLOCKUP_DETECTOR_ARCH
  74. default y
  75. help
  76. This is a placeholder when the powerpc hardlockup detector
  77. watchdog is selected (arch/powerpc/kernel/watchdog.c). It is
  78. seleted via the generic lockup detector menu which is why we
  79. have no standalone config option for it here.
  80. config STACKTRACE_SUPPORT
  81. bool
  82. default y
  83. config TRACE_IRQFLAGS_SUPPORT
  84. bool
  85. default y
  86. config LOCKDEP_SUPPORT
  87. bool
  88. default y
  89. config RWSEM_GENERIC_SPINLOCK
  90. bool
  91. config RWSEM_XCHGADD_ALGORITHM
  92. bool
  93. default y
  94. config GENERIC_LOCKBREAK
  95. bool
  96. default y
  97. depends on SMP && PREEMPT
  98. config GENERIC_HWEIGHT
  99. bool
  100. default y
  101. config ARCH_HAS_DMA_SET_COHERENT_MASK
  102. bool
  103. config PPC
  104. bool
  105. default y
  106. #
  107. # Please keep this list sorted alphabetically.
  108. #
  109. select ARCH_HAS_DEVMEM_IS_ALLOWED
  110. select ARCH_HAS_DMA_SET_COHERENT_MASK
  111. select ARCH_HAS_ELF_RANDOMIZE
  112. select ARCH_HAS_FORTIFY_SOURCE
  113. select ARCH_HAS_GCOV_PROFILE_ALL
  114. select ARCH_HAS_PHYS_TO_DMA
  115. select ARCH_HAS_PMEM_API if PPC64
  116. select ARCH_HAS_MEMBARRIER_CALLBACKS
  117. select ARCH_HAS_SCALED_CPUTIME if VIRT_CPU_ACCOUNTING_NATIVE
  118. select ARCH_HAS_SG_CHAIN
  119. select ARCH_HAS_STRICT_KERNEL_RWX if ((PPC_BOOK3S_64 || PPC32) && !RELOCATABLE && !HIBERNATION)
  120. select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
  121. select ARCH_HAS_UACCESS_FLUSHCACHE if PPC64
  122. select ARCH_HAS_UBSAN_SANITIZE_ALL
  123. select ARCH_HAS_ZONE_DEVICE if PPC_BOOK3S_64
  124. select ARCH_HAVE_NMI_SAFE_CMPXCHG
  125. select ARCH_MIGHT_HAVE_PC_PARPORT
  126. select ARCH_MIGHT_HAVE_PC_SERIO
  127. select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX
  128. select ARCH_SUPPORTS_ATOMIC_RMW
  129. select ARCH_USE_BUILTIN_BSWAP
  130. select ARCH_USE_CMPXCHG_LOCKREF if PPC64
  131. select ARCH_WANT_IPC_PARSE_VERSION
  132. select ARCH_WEAK_RELEASE_ACQUIRE
  133. select BINFMT_ELF
  134. select BUILDTIME_EXTABLE_SORT
  135. select CLONE_BACKWARDS
  136. select DCACHE_WORD_ACCESS if PPC64 && CPU_LITTLE_ENDIAN
  137. select EDAC_ATOMIC_SCRUB
  138. select EDAC_SUPPORT
  139. select GENERIC_ATOMIC64 if PPC32
  140. select GENERIC_CLOCKEVENTS
  141. select GENERIC_CLOCKEVENTS_BROADCAST if SMP
  142. select GENERIC_CMOS_UPDATE
  143. select GENERIC_CPU_AUTOPROBE
  144. select GENERIC_CPU_VULNERABILITIES if PPC_BOOK3S_64
  145. select GENERIC_IRQ_SHOW
  146. select GENERIC_IRQ_SHOW_LEVEL
  147. select GENERIC_SMP_IDLE_THREAD
  148. select GENERIC_STRNCPY_FROM_USER
  149. select GENERIC_STRNLEN_USER
  150. select GENERIC_TIME_VSYSCALL
  151. select HAVE_ARCH_AUDITSYSCALL
  152. select HAVE_ARCH_JUMP_LABEL
  153. select HAVE_ARCH_KGDB
  154. select HAVE_ARCH_MMAP_RND_BITS
  155. select HAVE_ARCH_MMAP_RND_COMPAT_BITS if COMPAT
  156. select HAVE_ARCH_SECCOMP_FILTER
  157. select HAVE_ARCH_TRACEHOOK
  158. select HAVE_CBPF_JIT if !PPC64
  159. select HAVE_CONTEXT_TRACKING if PPC64
  160. select HAVE_DEBUG_KMEMLEAK
  161. select HAVE_DEBUG_STACKOVERFLOW
  162. select HAVE_DYNAMIC_FTRACE
  163. select HAVE_DYNAMIC_FTRACE_WITH_REGS if MPROFILE_KERNEL
  164. select HAVE_EBPF_JIT if PPC64
  165. select HAVE_EFFICIENT_UNALIGNED_ACCESS if !(CPU_LITTLE_ENDIAN && POWER7_CPU)
  166. select HAVE_FTRACE_MCOUNT_RECORD
  167. select HAVE_FUNCTION_GRAPH_TRACER
  168. select HAVE_FUNCTION_TRACER
  169. select HAVE_GCC_PLUGINS
  170. select HAVE_GENERIC_GUP
  171. select HAVE_HW_BREAKPOINT if PERF_EVENTS && (PPC_BOOK3S || PPC_8xx)
  172. select HAVE_IDE
  173. select HAVE_IOREMAP_PROT
  174. select HAVE_IRQ_EXIT_ON_IRQ_STACK
  175. select HAVE_KERNEL_GZIP
  176. select HAVE_KPROBES
  177. select HAVE_KPROBES_ON_FTRACE
  178. select HAVE_KRETPROBES
  179. select HAVE_LIVEPATCH if HAVE_DYNAMIC_FTRACE_WITH_REGS
  180. select HAVE_MEMBLOCK
  181. select HAVE_MEMBLOCK_NODE_MAP
  182. select HAVE_MOD_ARCH_SPECIFIC
  183. select HAVE_NMI if PERF_EVENTS || (PPC64 && PPC_BOOK3S)
  184. select HAVE_HARDLOCKUP_DETECTOR_ARCH if (PPC64 && PPC_BOOK3S)
  185. select HAVE_OPROFILE
  186. select HAVE_OPTPROBES if PPC64
  187. select HAVE_PERF_EVENTS
  188. select HAVE_PERF_EVENTS_NMI if PPC64
  189. select HAVE_HARDLOCKUP_DETECTOR_PERF if PERF_EVENTS && HAVE_PERF_EVENTS_NMI && !HAVE_HARDLOCKUP_DETECTOR_ARCH
  190. select HAVE_PERF_REGS
  191. select HAVE_PERF_USER_STACK_DUMP
  192. select HAVE_RCU_TABLE_FREE if SMP
  193. select HAVE_REGS_AND_STACK_ACCESS_API
  194. select HAVE_SYSCALL_TRACEPOINTS
  195. select HAVE_VIRT_CPU_ACCOUNTING
  196. select HAVE_IRQ_TIME_ACCOUNTING
  197. select IOMMU_HELPER if PPC64
  198. select IRQ_DOMAIN
  199. select IRQ_FORCED_THREADING
  200. select MODULES_USE_ELF_RELA
  201. select NEED_SG_DMA_LENGTH
  202. select NO_BOOTMEM
  203. select OF
  204. select OF_EARLY_FLATTREE
  205. select OF_RESERVED_MEM
  206. select OLD_SIGACTION if PPC32
  207. select OLD_SIGSUSPEND
  208. select SPARSE_IRQ
  209. select SYSCTL_EXCEPTION_TRACE
  210. select VIRT_TO_BUS if !PPC64
  211. #
  212. # Please keep this list sorted alphabetically.
  213. #
  214. config GENERIC_CSUM
  215. def_bool n
  216. config EARLY_PRINTK
  217. bool
  218. default y
  219. config PANIC_TIMEOUT
  220. int
  221. default 180
  222. config COMPAT
  223. bool
  224. default y if PPC64
  225. select COMPAT_BINFMT_ELF
  226. select ARCH_WANT_OLD_COMPAT_IPC
  227. select COMPAT_OLD_SIGACTION
  228. config SYSVIPC_COMPAT
  229. bool
  230. depends on COMPAT && SYSVIPC
  231. default y
  232. # All PPC32s use generic nvram driver through ppc_md
  233. config GENERIC_NVRAM
  234. bool
  235. default y if PPC32
  236. config SCHED_OMIT_FRAME_POINTER
  237. bool
  238. default y
  239. config ARCH_MAY_HAVE_PC_FDC
  240. bool
  241. default PCI
  242. config PPC_UDBG_16550
  243. bool
  244. default n
  245. config GENERIC_TBSYNC
  246. bool
  247. default y if PPC32 && SMP
  248. default n
  249. config AUDIT_ARCH
  250. bool
  251. default y
  252. config GENERIC_BUG
  253. bool
  254. default y
  255. depends on BUG
  256. config SYS_SUPPORTS_APM_EMULATION
  257. default y if PMAC_APM_EMU
  258. bool
  259. config EPAPR_BOOT
  260. bool
  261. help
  262. Used to allow a board to specify it wants an ePAPR compliant wrapper.
  263. default n
  264. config DEFAULT_UIMAGE
  265. bool
  266. help
  267. Used to allow a board to specify it wants a uImage built by default
  268. default n
  269. config ARCH_HIBERNATION_POSSIBLE
  270. bool
  271. default y
  272. config ARCH_SUSPEND_POSSIBLE
  273. def_bool y
  274. depends on ADB_PMU || PPC_EFIKA || PPC_LITE5200 || PPC_83xx || \
  275. (PPC_85xx && !PPC_E500MC) || PPC_86xx || PPC_PSERIES \
  276. || 44x || 40x
  277. config PPC_DCR_NATIVE
  278. bool
  279. default n
  280. config PPC_DCR_MMIO
  281. bool
  282. default n
  283. config PPC_DCR
  284. bool
  285. depends on PPC_DCR_NATIVE || PPC_DCR_MMIO
  286. default y
  287. config PPC_OF_PLATFORM_PCI
  288. bool
  289. depends on PCI
  290. depends on PPC64 # not supported on 32 bits yet
  291. default n
  292. config ARCH_SUPPORTS_DEBUG_PAGEALLOC
  293. depends on PPC32 || PPC_BOOK3S_64
  294. def_bool y
  295. config ARCH_SUPPORTS_UPROBES
  296. def_bool y
  297. config PPC_ADV_DEBUG_REGS
  298. bool
  299. depends on 40x || BOOKE
  300. default y
  301. config PPC_ADV_DEBUG_IACS
  302. int
  303. depends on PPC_ADV_DEBUG_REGS
  304. default 4 if 44x
  305. default 2
  306. config PPC_ADV_DEBUG_DACS
  307. int
  308. depends on PPC_ADV_DEBUG_REGS
  309. default 2
  310. config PPC_ADV_DEBUG_DVCS
  311. int
  312. depends on PPC_ADV_DEBUG_REGS
  313. default 2 if 44x
  314. default 0
  315. config PPC_ADV_DEBUG_DAC_RANGE
  316. bool
  317. depends on PPC_ADV_DEBUG_REGS && 44x
  318. default y
  319. config ZONE_DMA32
  320. bool
  321. default y if PPC64
  322. config PGTABLE_LEVELS
  323. int
  324. default 2 if !PPC64
  325. default 3 if PPC_64K_PAGES && !PPC_BOOK3S_64
  326. default 4
  327. source "init/Kconfig"
  328. source "kernel/Kconfig.freezer"
  329. source "arch/powerpc/sysdev/Kconfig"
  330. source "arch/powerpc/platforms/Kconfig"
  331. menu "Kernel options"
  332. config HIGHMEM
  333. bool "High memory support"
  334. depends on PPC32
  335. source kernel/Kconfig.hz
  336. source kernel/Kconfig.preempt
  337. source "fs/Kconfig.binfmt"
  338. config HUGETLB_PAGE_SIZE_VARIABLE
  339. bool
  340. depends on HUGETLB_PAGE
  341. default y
  342. config MATH_EMULATION
  343. bool "Math emulation"
  344. depends on 4xx || PPC_8xx || PPC_MPC832x || BOOKE
  345. ---help---
  346. Some PowerPC chips designed for embedded applications do not have
  347. a floating-point unit and therefore do not implement the
  348. floating-point instructions in the PowerPC instruction set. If you
  349. say Y here, the kernel will include code to emulate a floating-point
  350. unit, which will allow programs that use floating-point
  351. instructions to run.
  352. This is also useful to emulate missing (optional) instructions
  353. such as fsqrt on cores that do have an FPU but do not implement
  354. them (such as Freescale BookE).
  355. choice
  356. prompt "Math emulation options"
  357. default MATH_EMULATION_FULL
  358. depends on MATH_EMULATION
  359. config MATH_EMULATION_FULL
  360. bool "Emulate all the floating point instructions"
  361. ---help---
  362. Select this option will enable the kernel to support to emulate
  363. all the floating point instructions. If your SoC doesn't have
  364. a FPU, you should select this.
  365. config MATH_EMULATION_HW_UNIMPLEMENTED
  366. bool "Just emulate the FPU unimplemented instructions"
  367. ---help---
  368. Select this if you know there does have a hardware FPU on your
  369. SoC, but some floating point instructions are not implemented by that.
  370. endchoice
  371. config PPC_TRANSACTIONAL_MEM
  372. bool "Transactional Memory support for POWERPC"
  373. depends on PPC_BOOK3S_64
  374. depends on SMP
  375. select ALTIVEC
  376. select VSX
  377. default n
  378. ---help---
  379. Support user-mode Transactional Memory on POWERPC.
  380. config LD_HEAD_STUB_CATCH
  381. bool "Reserve 256 bytes to cope with linker stubs in HEAD text" if EXPERT
  382. depends on PPC64
  383. default n
  384. help
  385. Very large kernels can cause linker branch stubs to be generated by
  386. code in head_64.S, which moves the head text sections out of their
  387. specified location. This option can work around the problem.
  388. If unsure, say "N".
  389. config DISABLE_MPROFILE_KERNEL
  390. bool "Disable use of mprofile-kernel for kernel tracing"
  391. depends on PPC64 && CPU_LITTLE_ENDIAN
  392. default y
  393. help
  394. Selecting this options disables use of the mprofile-kernel ABI for
  395. kernel tracing. That will cause options such as live patching
  396. (CONFIG_LIVEPATCH) which depend on CONFIG_DYNAMIC_FTRACE_WITH_REGS to
  397. be disabled also.
  398. If you have a toolchain which supports mprofile-kernel, then you can
  399. disable this. Otherwise leave it enabled. If you're not sure, say
  400. "Y".
  401. config MPROFILE_KERNEL
  402. depends on PPC64 && CPU_LITTLE_ENDIAN
  403. def_bool !DISABLE_MPROFILE_KERNEL
  404. config HOTPLUG_CPU
  405. bool "Support for enabling/disabling CPUs"
  406. depends on SMP && (PPC_PSERIES || \
  407. PPC_PMAC || PPC_POWERNV || FSL_SOC_BOOKE)
  408. ---help---
  409. Say Y here to be able to disable and re-enable individual
  410. CPUs at runtime on SMP machines.
  411. Say N if you are unsure.
  412. config ARCH_CPU_PROBE_RELEASE
  413. def_bool y
  414. depends on HOTPLUG_CPU
  415. config ARCH_ENABLE_MEMORY_HOTPLUG
  416. def_bool y
  417. config ARCH_HAS_WALK_MEMORY
  418. def_bool y
  419. config ARCH_ENABLE_MEMORY_HOTREMOVE
  420. def_bool y
  421. config PPC64_SUPPORTS_MEMORY_FAILURE
  422. bool "Add support for memory hwpoison"
  423. depends on PPC_BOOK3S_64
  424. default "y" if PPC_POWERNV
  425. select ARCH_SUPPORTS_MEMORY_FAILURE
  426. config KEXEC
  427. bool "kexec system call"
  428. depends on (PPC_BOOK3S || FSL_BOOKE || (44x && !SMP)) || PPC_BOOK3E
  429. select KEXEC_CORE
  430. help
  431. kexec is a system call that implements the ability to shutdown your
  432. current kernel, and to start another kernel. It is like a reboot
  433. but it is independent of the system firmware. And like a reboot
  434. you can start any kernel with it, not just Linux.
  435. The name comes from the similarity to the exec system call.
  436. It is an ongoing process to be certain the hardware in a machine
  437. is properly shutdown, so do not be surprised if this code does not
  438. initially work for you. As of this writing the exact hardware
  439. interface is strongly in flux, so no good recommendation can be
  440. made.
  441. config KEXEC_FILE
  442. bool "kexec file based system call"
  443. select KEXEC_CORE
  444. select HAVE_IMA_KEXEC
  445. select BUILD_BIN2C
  446. depends on PPC64
  447. depends on CRYPTO=y
  448. depends on CRYPTO_SHA256=y
  449. help
  450. This is a new version of the kexec system call. This call is
  451. file based and takes in file descriptors as system call arguments
  452. for kernel and initramfs as opposed to a list of segments as is the
  453. case for the older kexec call.
  454. config ARCH_HAS_KEXEC_PURGATORY
  455. def_bool KEXEC_FILE
  456. config RELOCATABLE
  457. bool "Build a relocatable kernel"
  458. depends on PPC64 || (FLATMEM && (44x || FSL_BOOKE))
  459. select NONSTATIC_KERNEL
  460. select MODULE_REL_CRCS if MODVERSIONS
  461. help
  462. This builds a kernel image that is capable of running at the
  463. location the kernel is loaded at. For ppc32, there is no any
  464. alignment restrictions, and this feature is a superset of
  465. DYNAMIC_MEMSTART and hence overrides it. For ppc64, we should use
  466. 16k-aligned base address. The kernel is linked as a
  467. position-independent executable (PIE) and contains dynamic relocations
  468. which are processed early in the bootup process.
  469. One use is for the kexec on panic case where the recovery kernel
  470. must live at a different physical address than the primary
  471. kernel.
  472. Note: If CONFIG_RELOCATABLE=y, then the kernel runs from the address
  473. it has been loaded at and the compile time physical addresses
  474. CONFIG_PHYSICAL_START is ignored. However CONFIG_PHYSICAL_START
  475. setting can still be useful to bootwrappers that need to know the
  476. load address of the kernel (eg. u-boot/mkimage).
  477. config RELOCATABLE_TEST
  478. bool "Test relocatable kernel"
  479. depends on (PPC64 && RELOCATABLE)
  480. default n
  481. help
  482. This runs the relocatable kernel at the address it was initially
  483. loaded at, which tends to be non-zero and therefore test the
  484. relocation code.
  485. config CRASH_DUMP
  486. bool "Build a dump capture kernel"
  487. depends on PPC64 || 6xx || FSL_BOOKE || (44x && !SMP)
  488. select RELOCATABLE if PPC64 || 44x || FSL_BOOKE
  489. help
  490. Build a kernel suitable for use as a dump capture kernel.
  491. The same kernel binary can be used as production kernel and dump
  492. capture kernel.
  493. config FA_DUMP
  494. bool "Firmware-assisted dump"
  495. depends on PPC64 && PPC_RTAS
  496. select CRASH_CORE
  497. select CRASH_DUMP
  498. help
  499. A robust mechanism to get reliable kernel crash dump with
  500. assistance from firmware. This approach does not use kexec,
  501. instead firmware assists in booting the capture kernel
  502. while preserving memory contents. Firmware-assisted dump
  503. is meant to be a kdump replacement offering robustness and
  504. speed not possible without system firmware assistance.
  505. If unsure, say "N"
  506. config IRQ_ALL_CPUS
  507. bool "Distribute interrupts on all CPUs by default"
  508. depends on SMP
  509. help
  510. This option gives the kernel permission to distribute IRQs across
  511. multiple CPUs. Saying N here will route all IRQs to the first
  512. CPU. Generally saying Y is safe, although some problems have been
  513. reported with SMP Power Macintoshes with this option enabled.
  514. config NUMA
  515. bool "NUMA support"
  516. depends on PPC64
  517. default y if SMP && PPC_PSERIES
  518. config NODES_SHIFT
  519. int
  520. default "8" if PPC64
  521. default "4"
  522. depends on NEED_MULTIPLE_NODES
  523. config USE_PERCPU_NUMA_NODE_ID
  524. def_bool y
  525. depends on NUMA
  526. config HAVE_MEMORYLESS_NODES
  527. def_bool y
  528. depends on NUMA
  529. config ARCH_SELECT_MEMORY_MODEL
  530. def_bool y
  531. depends on PPC64
  532. config ARCH_FLATMEM_ENABLE
  533. def_bool y
  534. depends on (PPC64 && !NUMA) || PPC32
  535. config ARCH_SPARSEMEM_ENABLE
  536. def_bool y
  537. depends on PPC64
  538. select SPARSEMEM_VMEMMAP_ENABLE
  539. config ARCH_SPARSEMEM_DEFAULT
  540. def_bool y
  541. depends on PPC_BOOK3S_64
  542. config SYS_SUPPORTS_HUGETLBFS
  543. bool
  544. config ILLEGAL_POINTER_VALUE
  545. hex
  546. # This is roughly half way between the top of user space and the bottom
  547. # of kernel space, which seems about as good as we can get.
  548. default 0x5deadbeef0000000 if PPC64
  549. default 0
  550. source "mm/Kconfig"
  551. config ARCH_MEMORY_PROBE
  552. def_bool y
  553. depends on MEMORY_HOTPLUG
  554. # Some NUMA nodes have memory ranges that span
  555. # other nodes. Even though a pfn is valid and
  556. # between a node's start and end pfns, it may not
  557. # reside on that node. See memmap_init_zone()
  558. # for details.
  559. config NODES_SPAN_OTHER_NODES
  560. def_bool y
  561. depends on NEED_MULTIPLE_NODES
  562. config STDBINUTILS
  563. bool "Using standard binutils settings"
  564. depends on 44x
  565. default y
  566. help
  567. Turning this option off allows you to select 256KB PAGE_SIZE on 44x.
  568. Note, that kernel will be able to run only those applications,
  569. which had been compiled using binutils later than 2.17.50.0.3 with
  570. '-zmax-page-size' set to 256K (the default is 64K). Or, if using
  571. the older binutils, you can patch them with a trivial patch, which
  572. changes the ELF_MAXPAGESIZE definition from 0x10000 to 0x40000.
  573. choice
  574. prompt "Page size"
  575. default PPC_4K_PAGES
  576. help
  577. Select the kernel logical page size. Increasing the page size
  578. will reduce software overhead at each page boundary, allow
  579. hardware prefetch mechanisms to be more effective, and allow
  580. larger dma transfers increasing IO efficiency and reducing
  581. overhead. However the utilization of memory will increase.
  582. For example, each cached file will using a multiple of the
  583. page size to hold its contents and the difference between the
  584. end of file and the end of page is wasted.
  585. Some dedicated systems, such as software raid serving with
  586. accelerated calculations, have shown significant increases.
  587. If you configure a 64 bit kernel for 64k pages but the
  588. processor does not support them, then the kernel will simulate
  589. them with 4k pages, loading them on demand, but with the
  590. reduced software overhead and larger internal fragmentation.
  591. For the 32 bit kernel, a large page option will not be offered
  592. unless it is supported by the configured processor.
  593. If unsure, choose 4K_PAGES.
  594. config PPC_4K_PAGES
  595. bool "4k page size"
  596. select HAVE_ARCH_SOFT_DIRTY if PPC_BOOK3S_64
  597. config PPC_16K_PAGES
  598. bool "16k page size"
  599. depends on 44x || PPC_8xx
  600. config PPC_64K_PAGES
  601. bool "64k page size"
  602. depends on !PPC_FSL_BOOK3E && (44x || PPC_BOOK3S_64 || PPC_BOOK3E_64)
  603. select HAVE_ARCH_SOFT_DIRTY if PPC_BOOK3S_64
  604. config PPC_256K_PAGES
  605. bool "256k page size"
  606. depends on 44x && !STDBINUTILS
  607. help
  608. Make the page size 256k.
  609. As the ELF standard only requires alignment to support page
  610. sizes up to 64k, you will need to compile all of your user
  611. space applications with a non-standard binutils settings
  612. (see the STDBINUTILS description for details).
  613. Say N unless you know what you are doing.
  614. endchoice
  615. config THREAD_SHIFT
  616. int "Thread shift" if EXPERT
  617. range 13 15
  618. default "15" if PPC_256K_PAGES
  619. default "14" if PPC64
  620. default "13"
  621. help
  622. Used to define the stack size. The default is almost always what you
  623. want. Only change this if you know what you are doing.
  624. config FORCE_MAX_ZONEORDER
  625. int "Maximum zone order"
  626. range 8 9 if PPC64 && PPC_64K_PAGES
  627. default "9" if PPC64 && PPC_64K_PAGES
  628. range 13 13 if PPC64 && !PPC_64K_PAGES
  629. default "13" if PPC64 && !PPC_64K_PAGES
  630. range 9 64 if PPC32 && PPC_16K_PAGES
  631. default "9" if PPC32 && PPC_16K_PAGES
  632. range 7 64 if PPC32 && PPC_64K_PAGES
  633. default "7" if PPC32 && PPC_64K_PAGES
  634. range 5 64 if PPC32 && PPC_256K_PAGES
  635. default "5" if PPC32 && PPC_256K_PAGES
  636. range 11 64
  637. default "11"
  638. help
  639. The kernel memory allocator divides physically contiguous memory
  640. blocks into "zones", where each zone is a power of two number of
  641. pages. This option selects the largest power of two that the kernel
  642. keeps in the memory allocator. If you need to allocate very large
  643. blocks of physically contiguous memory, then you may need to
  644. increase this value.
  645. This config option is actually maximum order plus one. For example,
  646. a value of 11 means that the largest free memory block is 2^10 pages.
  647. The page size is not necessarily 4KB. For example, on 64-bit
  648. systems, 64KB pages can be enabled via CONFIG_PPC_64K_PAGES. Keep
  649. this in mind when choosing a value for this option.
  650. config PPC_SUBPAGE_PROT
  651. bool "Support setting protections for 4k subpages"
  652. depends on PPC_BOOK3S_64 && PPC_64K_PAGES
  653. help
  654. This option adds support for a system call to allow user programs
  655. to set access permissions (read/write, readonly, or no access)
  656. on the 4k subpages of each 64k page.
  657. config PPC_COPRO_BASE
  658. bool
  659. default n
  660. config SCHED_SMT
  661. bool "SMT (Hyperthreading) scheduler support"
  662. depends on PPC64 && SMP
  663. help
  664. SMT scheduler support improves the CPU scheduler's decision making
  665. when dealing with POWER5 cpus at a cost of slightly increased
  666. overhead in some places. If unsure say N here.
  667. config PPC_DENORMALISATION
  668. bool "PowerPC denormalisation exception handling"
  669. depends on PPC_BOOK3S_64
  670. default "y" if PPC_POWERNV
  671. ---help---
  672. Add support for handling denormalisation of single precision
  673. values. Useful for bare metal only. If unsure say Y here.
  674. config CMDLINE_BOOL
  675. bool "Default bootloader kernel arguments"
  676. config CMDLINE
  677. string "Initial kernel command string"
  678. depends on CMDLINE_BOOL
  679. default "console=ttyS0,9600 console=tty0 root=/dev/sda2"
  680. help
  681. On some platforms, there is currently no way for the boot loader to
  682. pass arguments to the kernel. For these platforms, you can supply
  683. some command-line options at build time by entering them here. In
  684. most cases you will need to specify the root device here.
  685. config CMDLINE_FORCE
  686. bool "Always use the default kernel command string"
  687. depends on CMDLINE_BOOL
  688. help
  689. Always use the default kernel command string, even if the boot
  690. loader passes other arguments to the kernel.
  691. This is useful if you cannot or don't want to change the
  692. command-line options your boot loader passes to the kernel.
  693. config EXTRA_TARGETS
  694. string "Additional default image types"
  695. help
  696. List additional targets to be built by the bootwrapper here (separated
  697. by spaces). This is useful for targets that depend of device tree
  698. files in the .dts directory.
  699. Targets in this list will be build as part of the default build
  700. target, or when the user does a 'make zImage' or a
  701. 'make zImage.initrd'.
  702. If unsure, leave blank
  703. config ARCH_WANTS_FREEZER_CONTROL
  704. def_bool y
  705. depends on ADB_PMU
  706. source kernel/power/Kconfig
  707. config SECCOMP
  708. bool "Enable seccomp to safely compute untrusted bytecode"
  709. depends on PROC_FS
  710. default y
  711. help
  712. This kernel feature is useful for number crunching applications
  713. that may need to compute untrusted bytecode during their
  714. execution. By using pipes or other transports made available to
  715. the process as file descriptors supporting the read/write
  716. syscalls, it's possible to isolate those applications in
  717. their own address space using seccomp. Once seccomp is
  718. enabled via /proc/<pid>/seccomp, it cannot be disabled
  719. and the task is only allowed to execute a few safe syscalls
  720. defined by each seccomp mode.
  721. If unsure, say Y. Only embedded should say N here.
  722. config PPC_MEM_KEYS
  723. prompt "PowerPC Memory Protection Keys"
  724. def_bool y
  725. depends on PPC_BOOK3S_64
  726. select ARCH_USES_HIGH_VMA_FLAGS
  727. select ARCH_HAS_PKEYS
  728. help
  729. Memory Protection Keys provides a mechanism for enforcing
  730. page-based protections, but without requiring modification of the
  731. page tables when an application changes protection domains.
  732. For details, see Documentation/vm/protection-keys.txt
  733. If unsure, say y.
  734. endmenu
  735. config ISA_DMA_API
  736. bool
  737. default PCI
  738. menu "Bus options"
  739. config ISA
  740. bool "Support for ISA-bus hardware"
  741. depends on PPC_CHRP
  742. select PPC_I8259
  743. help
  744. Find out whether you have ISA slots on your motherboard. ISA is the
  745. name of a bus system, i.e. the way the CPU talks to the other stuff
  746. inside your box. If you have an Apple machine, say N here; if you
  747. have an IBM RS/6000 or pSeries machine, say Y. If you have an
  748. embedded board, consult your board documentation.
  749. config ZONE_DMA
  750. bool
  751. default y
  752. config NEED_DMA_MAP_STATE
  753. def_bool (PPC64 || NOT_COHERENT_CACHE)
  754. config GENERIC_ISA_DMA
  755. bool
  756. depends on ISA_DMA_API
  757. default y
  758. config PPC_INDIRECT_PCI
  759. bool
  760. depends on PCI
  761. default y if 40x || 44x
  762. default n
  763. config EISA
  764. bool
  765. config SBUS
  766. bool
  767. config FSL_SOC
  768. bool
  769. config FSL_PCI
  770. bool
  771. select PPC_INDIRECT_PCI
  772. select PCI_QUIRKS
  773. config FSL_PMC
  774. bool
  775. default y
  776. depends on SUSPEND && (PPC_85xx || PPC_86xx)
  777. help
  778. Freescale MPC85xx/MPC86xx power management controller support
  779. (suspend/resume). For MPC83xx see platforms/83xx/suspend.c
  780. config PPC4xx_CPM
  781. bool
  782. default y
  783. depends on SUSPEND && (44x || 40x)
  784. help
  785. PPC4xx Clock Power Management (CPM) support (suspend/resume).
  786. It also enables support for two different idle states (idle-wait
  787. and idle-doze).
  788. config 4xx_SOC
  789. bool
  790. config FSL_LBC
  791. bool "Freescale Local Bus support"
  792. help
  793. Enables reporting of errors from the Freescale local bus
  794. controller. Also contains some common code used by
  795. drivers for specific local bus peripherals.
  796. config FSL_GTM
  797. bool
  798. depends on PPC_83xx || QUICC_ENGINE || CPM2
  799. help
  800. Freescale General-purpose Timers support
  801. # Yes MCA RS/6000s exist but Linux-PPC does not currently support any
  802. config MCA
  803. bool
  804. # Platforms that what PCI turned unconditionally just do select PCI
  805. # in their config node. Platforms that want to choose at config
  806. # time should select PPC_PCI_CHOICE
  807. config PPC_PCI_CHOICE
  808. bool
  809. config PCI
  810. bool "PCI support" if PPC_PCI_CHOICE
  811. default y if !40x && !CPM2 && !PPC_8xx && !PPC_83xx \
  812. && !PPC_85xx && !PPC_86xx && !GAMECUBE_COMMON
  813. default PCI_QSPAN if PPC_8xx
  814. select GENERIC_PCI_IOMAP
  815. help
  816. Find out whether your system includes a PCI bus. PCI is the name of
  817. a bus system, i.e. the way the CPU talks to the other stuff inside
  818. your box. If you say Y here, the kernel will include drivers and
  819. infrastructure code to support PCI bus devices.
  820. config PCI_DOMAINS
  821. def_bool PCI
  822. config PCI_SYSCALL
  823. def_bool PCI
  824. config PCI_QSPAN
  825. bool "QSpan PCI"
  826. depends on PPC_8xx
  827. select PPC_I8259
  828. help
  829. Say Y here if you have a system based on a Motorola 8xx-series
  830. embedded processor with a QSPAN PCI interface, otherwise say N.
  831. config PCI_8260
  832. bool
  833. depends on PCI && 8260
  834. select PPC_INDIRECT_PCI
  835. default y
  836. source "drivers/pci/Kconfig"
  837. source "drivers/pcmcia/Kconfig"
  838. config HAS_RAPIDIO
  839. bool
  840. default n
  841. config RAPIDIO
  842. tristate "RapidIO support"
  843. depends on HAS_RAPIDIO || PCI
  844. help
  845. If you say Y here, the kernel will include drivers and
  846. infrastructure code to support RapidIO interconnect devices.
  847. config FSL_RIO
  848. bool "Freescale Embedded SRIO Controller support"
  849. depends on RAPIDIO = y && HAS_RAPIDIO
  850. default "n"
  851. ---help---
  852. Include support for RapidIO controller on Freescale embedded
  853. processors (MPC8548, MPC8641, etc).
  854. source "drivers/rapidio/Kconfig"
  855. endmenu
  856. config NONSTATIC_KERNEL
  857. bool
  858. default n
  859. menu "Advanced setup"
  860. depends on PPC32
  861. config ADVANCED_OPTIONS
  862. bool "Prompt for advanced kernel configuration options"
  863. help
  864. This option will enable prompting for a variety of advanced kernel
  865. configuration options. These options can cause the kernel to not
  866. work if they are set incorrectly, but can be used to optimize certain
  867. aspects of kernel memory management.
  868. Unless you know what you are doing, say N here.
  869. comment "Default settings for advanced configuration options are used"
  870. depends on !ADVANCED_OPTIONS
  871. config LOWMEM_SIZE_BOOL
  872. bool "Set maximum low memory"
  873. depends on ADVANCED_OPTIONS
  874. help
  875. This option allows you to set the maximum amount of memory which
  876. will be used as "low memory", that is, memory which the kernel can
  877. access directly, without having to set up a kernel virtual mapping.
  878. This can be useful in optimizing the layout of kernel virtual
  879. memory.
  880. Say N here unless you know what you are doing.
  881. config LOWMEM_SIZE
  882. hex "Maximum low memory size (in bytes)" if LOWMEM_SIZE_BOOL
  883. default "0x30000000"
  884. config LOWMEM_CAM_NUM_BOOL
  885. bool "Set number of CAMs to use to map low memory"
  886. depends on ADVANCED_OPTIONS && FSL_BOOKE
  887. help
  888. This option allows you to set the maximum number of CAM slots that
  889. will be used to map low memory. There are a limited number of slots
  890. available and even more limited number that will fit in the L1 MMU.
  891. However, using more entries will allow mapping more low memory. This
  892. can be useful in optimizing the layout of kernel virtual memory.
  893. Say N here unless you know what you are doing.
  894. config LOWMEM_CAM_NUM
  895. depends on FSL_BOOKE
  896. int "Number of CAMs to use to map low memory" if LOWMEM_CAM_NUM_BOOL
  897. default 3
  898. config DYNAMIC_MEMSTART
  899. bool "Enable page aligned dynamic load address for kernel"
  900. depends on ADVANCED_OPTIONS && FLATMEM && (FSL_BOOKE || 44x)
  901. select NONSTATIC_KERNEL
  902. help
  903. This option enables the kernel to be loaded at any page aligned
  904. physical address. The kernel creates a mapping from KERNELBASE to
  905. the address where the kernel is loaded. The page size here implies
  906. the TLB page size of the mapping for kernel on the particular platform.
  907. Please refer to the init code for finding the TLB page size.
  908. DYNAMIC_MEMSTART is an easy way of implementing pseudo-RELOCATABLE
  909. kernel image, where the only restriction is the page aligned kernel
  910. load address. When this option is enabled, the compile time physical
  911. address CONFIG_PHYSICAL_START is ignored.
  912. This option is overridden by CONFIG_RELOCATABLE
  913. config PAGE_OFFSET_BOOL
  914. bool "Set custom page offset address"
  915. depends on ADVANCED_OPTIONS
  916. help
  917. This option allows you to set the kernel virtual address at which
  918. the kernel will map low memory. This can be useful in optimizing
  919. the virtual memory layout of the system.
  920. Say N here unless you know what you are doing.
  921. config PAGE_OFFSET
  922. hex "Virtual address of memory base" if PAGE_OFFSET_BOOL
  923. default "0xc0000000"
  924. config KERNEL_START_BOOL
  925. bool "Set custom kernel base address"
  926. depends on ADVANCED_OPTIONS
  927. help
  928. This option allows you to set the kernel virtual address at which
  929. the kernel will be loaded. Normally this should match PAGE_OFFSET
  930. however there are times (like kdump) that one might not want them
  931. to be the same.
  932. Say N here unless you know what you are doing.
  933. config KERNEL_START
  934. hex "Virtual address of kernel base" if KERNEL_START_BOOL
  935. default PAGE_OFFSET if PAGE_OFFSET_BOOL
  936. default "0xc2000000" if CRASH_DUMP && !NONSTATIC_KERNEL
  937. default "0xc0000000"
  938. config PHYSICAL_START_BOOL
  939. bool "Set physical address where the kernel is loaded"
  940. depends on ADVANCED_OPTIONS && FLATMEM && FSL_BOOKE
  941. help
  942. This gives the physical address where the kernel is loaded.
  943. Say N here unless you know what you are doing.
  944. config PHYSICAL_START
  945. hex "Physical address where the kernel is loaded" if PHYSICAL_START_BOOL
  946. default "0x02000000" if PPC_STD_MMU && CRASH_DUMP && !NONSTATIC_KERNEL
  947. default "0x00000000"
  948. config PHYSICAL_ALIGN
  949. hex
  950. default "0x04000000" if FSL_BOOKE
  951. help
  952. This value puts the alignment restrictions on physical address
  953. where kernel is loaded and run from. Kernel is compiled for an
  954. address which meets above alignment restriction.
  955. config TASK_SIZE_BOOL
  956. bool "Set custom user task size"
  957. depends on ADVANCED_OPTIONS
  958. help
  959. This option allows you to set the amount of virtual address space
  960. allocated to user tasks. This can be useful in optimizing the
  961. virtual memory layout of the system.
  962. Say N here unless you know what you are doing.
  963. config TASK_SIZE
  964. hex "Size of user task space" if TASK_SIZE_BOOL
  965. default "0x80000000" if PPC_8xx
  966. default "0xc0000000"
  967. config CONSISTENT_SIZE_BOOL
  968. bool "Set custom consistent memory pool size"
  969. depends on ADVANCED_OPTIONS && NOT_COHERENT_CACHE
  970. help
  971. This option allows you to set the size of the
  972. consistent memory pool. This pool of virtual memory
  973. is used to make consistent memory allocations.
  974. config CONSISTENT_SIZE
  975. hex "Size of consistent memory pool" if CONSISTENT_SIZE_BOOL
  976. default "0x00200000" if NOT_COHERENT_CACHE
  977. config PIN_TLB
  978. bool "Pinned Kernel TLBs (860 ONLY)"
  979. depends on ADVANCED_OPTIONS && PPC_8xx && \
  980. !DEBUG_PAGEALLOC && !STRICT_KERNEL_RWX
  981. config PIN_TLB_DATA
  982. bool "Pinned TLB for DATA"
  983. depends on PIN_TLB
  984. default y
  985. config PIN_TLB_IMMR
  986. bool "Pinned TLB for IMMR"
  987. depends on PIN_TLB
  988. default y
  989. config PIN_TLB_TEXT
  990. bool "Pinned TLB for TEXT"
  991. depends on PIN_TLB
  992. default y
  993. endmenu
  994. if PPC64
  995. # This value must have zeroes in the bottom 60 bits otherwise lots will break
  996. config PAGE_OFFSET
  997. hex
  998. default "0xc000000000000000"
  999. config KERNEL_START
  1000. hex
  1001. default "0xc000000000000000"
  1002. config PHYSICAL_START
  1003. hex
  1004. default "0x00000000"
  1005. endif
  1006. config ARCH_RANDOM
  1007. def_bool n
  1008. source "net/Kconfig"
  1009. source "drivers/Kconfig"
  1010. source "fs/Kconfig"
  1011. source "lib/Kconfig"
  1012. source "arch/powerpc/Kconfig.debug"
  1013. source "security/Kconfig"
  1014. source "crypto/Kconfig"
  1015. config PPC_LIB_RHEAP
  1016. bool
  1017. source "arch/powerpc/kvm/Kconfig"
  1018. source "kernel/livepatch/Kconfig"