Kconfig 33 KB

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