Kconfig 34 KB

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