Kconfig 33 KB

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