Kconfig 42 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348
  1. # SPDX-License-Identifier: GPL-2.0
  2. source "arch/powerpc/platforms/Kconfig.cputype"
  3. config CC_HAS_ELFV2
  4. def_bool PPC64 && $(cc-option, -mabi=elfv2)
  5. config CC_HAS_PREFIXED
  6. def_bool PPC64 && $(cc-option, -mcpu=power10 -mprefixed)
  7. config CC_HAS_PCREL
  8. # Clang has a bug (https://github.com/llvm/llvm-project/issues/62372)
  9. # where pcrel code is not generated if -msoft-float, -mno-altivec, or
  10. # -mno-vsx options are also given. Without these options, fp/vec
  11. # instructions are generated from regular kernel code. So Clang can't
  12. # do pcrel yet.
  13. def_bool PPC64 && CC_IS_GCC && $(cc-option, -mcpu=power10 -mpcrel)
  14. config 32BIT
  15. bool
  16. default y if PPC32
  17. config 64BIT
  18. bool
  19. default y if PPC64
  20. config LIVEPATCH_64
  21. def_bool PPC64
  22. depends on LIVEPATCH
  23. config MMU
  24. bool
  25. default y
  26. config ARCH_MMAP_RND_BITS_MAX
  27. # On Book3S 64, the default virtual address space for 64-bit processes
  28. # is 2^47 (128TB). As a maximum, allow randomisation to consume up to
  29. # 32T of address space (2^45), which should ensure a reasonable gap
  30. # between bottom-up and top-down allocations for applications that
  31. # consume "normal" amounts of address space. Book3S 64 only supports 64K
  32. # and 4K page sizes.
  33. default 29 if PPC_BOOK3S_64 && PPC_64K_PAGES # 29 = 45 (32T) - 16 (64K)
  34. default 33 if PPC_BOOK3S_64 # 33 = 45 (32T) - 12 (4K)
  35. #
  36. # On all other 64-bit platforms (currently only Book3E), the virtual
  37. # address space is 2^46 (64TB). Allow randomisation to consume up to 16T
  38. # of address space (2^44). Only 4K page sizes are supported.
  39. default 32 if 64BIT # 32 = 44 (16T) - 12 (4K)
  40. #
  41. # For 32-bit, use the compat values, as they're the same.
  42. default ARCH_MMAP_RND_COMPAT_BITS_MAX
  43. config ARCH_MMAP_RND_BITS_MIN
  44. # Allow randomisation to consume up to 1GB of address space (2^30).
  45. default 14 if 64BIT && PPC_64K_PAGES # 14 = 30 (1GB) - 16 (64K)
  46. default 18 if 64BIT # 18 = 30 (1GB) - 12 (4K)
  47. #
  48. # For 32-bit, use the compat values, as they're the same.
  49. default ARCH_MMAP_RND_COMPAT_BITS_MIN
  50. config ARCH_MMAP_RND_COMPAT_BITS_MAX
  51. # Total virtual address space for 32-bit processes is 2^31 (2GB).
  52. # Allow randomisation to consume up to 512MB of address space (2^29).
  53. default 11 if PPC_256K_PAGES # 11 = 29 (512MB) - 18 (256K)
  54. default 13 if PPC_64K_PAGES # 13 = 29 (512MB) - 16 (64K)
  55. default 15 if PPC_16K_PAGES # 15 = 29 (512MB) - 14 (16K)
  56. default 17 # 17 = 29 (512MB) - 12 (4K)
  57. config ARCH_MMAP_RND_COMPAT_BITS_MIN
  58. # Total virtual address space for 32-bit processes is 2^31 (2GB).
  59. # Allow randomisation to consume up to 8MB of address space (2^23).
  60. default 5 if PPC_256K_PAGES # 5 = 23 (8MB) - 18 (256K)
  61. default 7 if PPC_64K_PAGES # 7 = 23 (8MB) - 16 (64K)
  62. default 9 if PPC_16K_PAGES # 9 = 23 (8MB) - 14 (16K)
  63. default 11 # 11 = 23 (8MB) - 12 (4K)
  64. config NR_IRQS
  65. int "Number of virtual interrupt numbers"
  66. range 32 1048576
  67. default "512"
  68. help
  69. This defines the number of virtual interrupt numbers the kernel
  70. can manage. Virtual interrupt numbers are what you see in
  71. /proc/interrupts. If you configure your system to have too few,
  72. drivers will fail to load or worse - handle with care.
  73. config NMI_IPI
  74. bool
  75. depends on SMP && (DEBUGGER || KEXEC_CORE || HARDLOCKUP_DETECTOR)
  76. default y
  77. config PPC_WATCHDOG
  78. bool
  79. depends on HARDLOCKUP_DETECTOR_ARCH
  80. default y
  81. help
  82. This is a placeholder when the powerpc hardlockup detector
  83. watchdog is selected (arch/powerpc/kernel/watchdog.c). It is
  84. selected via the generic lockup detector menu which is why we
  85. have no standalone config option for it here.
  86. config STACKTRACE_SUPPORT
  87. bool
  88. default y
  89. config LOCKDEP_SUPPORT
  90. bool
  91. default y
  92. config GENERIC_LOCKBREAK
  93. bool
  94. default y
  95. depends on SMP && PREEMPTION && !PPC_QUEUED_SPINLOCKS
  96. config GENERIC_HWEIGHT
  97. bool
  98. default y
  99. config PPC
  100. bool
  101. default y
  102. #
  103. # Please keep this list sorted alphabetically.
  104. #
  105. select ARCH_32BIT_OFF_T if PPC32
  106. select ARCH_NEEDS_DEFER_KASAN if PPC_RADIX_MMU
  107. select ARCH_DISABLE_KASAN_INLINE if PPC_RADIX_MMU
  108. select ARCH_DMA_DEFAULT_COHERENT if !NOT_COHERENT_CACHE
  109. select ARCH_ENABLE_MEMORY_HOTPLUG
  110. select ARCH_ENABLE_MEMORY_HOTREMOVE
  111. select ARCH_HAS_COPY_MC if PPC64
  112. select ARCH_HAS_CURRENT_STACK_POINTER
  113. select ARCH_HAS_DEBUG_VIRTUAL
  114. select ARCH_HAS_DEBUG_VM_PGTABLE
  115. select ARCH_HAS_DEBUG_WX if STRICT_KERNEL_RWX
  116. select ARCH_HAS_DEVMEM_IS_ALLOWED
  117. select ARCH_HAS_DMA_MAP_DIRECT if PPC_PSERIES
  118. select ARCH_HAS_DMA_OPS if PPC64
  119. select ARCH_HAS_FORTIFY_SOURCE
  120. select ARCH_HAS_GCOV_PROFILE_ALL
  121. select ARCH_HAS_GIGANTIC_PAGE if ARCH_SUPPORTS_HUGETLBFS
  122. select ARCH_HAS_KCOV
  123. select ARCH_HAS_KERNEL_FPU_SUPPORT if PPC64 && PPC_FPU
  124. select ARCH_HAS_MEMBARRIER_CALLBACKS
  125. select ARCH_HAS_MEMBARRIER_SYNC_CORE
  126. select ARCH_HAS_MEMREMAP_COMPAT_ALIGN if PPC_64S_HASH_MMU
  127. select ARCH_HAS_MMIOWB if PPC64
  128. select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
  129. select ARCH_HAS_PHYS_TO_DMA
  130. select ARCH_HAS_PMEM_API
  131. select ARCH_HAS_PREEMPT_LAZY
  132. select ARCH_HAS_PTDUMP
  133. select ARCH_HAS_PTE_SPECIAL
  134. select ARCH_HAS_SCALED_CPUTIME if VIRT_CPU_ACCOUNTING_NATIVE && PPC_BOOK3S_64
  135. select ARCH_HAS_SET_MEMORY
  136. select ARCH_HAS_STRICT_KERNEL_RWX if (PPC_BOOK3S || PPC_8xx) && !HIBERNATION
  137. select ARCH_HAS_STRICT_KERNEL_RWX if PPC_85xx && !HIBERNATION && !RANDOMIZE_BASE
  138. select ARCH_HAS_STRICT_MODULE_RWX if ARCH_HAS_STRICT_KERNEL_RWX
  139. select ARCH_HAS_SYSCALL_WRAPPER if !SPU_BASE && !COMPAT
  140. select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
  141. select ARCH_HAS_UACCESS_FLUSHCACHE
  142. select ARCH_HAS_UBSAN
  143. select ARCH_HAS_VDSO_ARCH_DATA
  144. select ARCH_HAVE_NMI_SAFE_CMPXCHG
  145. select ARCH_HAVE_EXTRA_ELF_NOTES if SPU_BASE
  146. select ARCH_KEEP_MEMBLOCK
  147. select ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE if PPC_RADIX_MMU
  148. select ARCH_MIGHT_HAVE_PC_PARPORT
  149. select ARCH_MIGHT_HAVE_PC_SERIO
  150. select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX
  151. select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT
  152. select ARCH_SPLIT_ARG64 if PPC32
  153. select ARCH_STACKWALK
  154. select ARCH_SUPPORTS_ATOMIC_RMW
  155. select ARCH_SUPPORTS_DEBUG_PAGEALLOC if PPC_BOOK3S || PPC_8xx
  156. select ARCH_SUPPORTS_PAGE_TABLE_CHECK if !HUGETLB_PAGE
  157. select ARCH_SUPPORTS_SCHED_MC if SMP
  158. select ARCH_SUPPORTS_SCHED_SMT if PPC64 && SMP
  159. select SCHED_MC if ARCH_SUPPORTS_SCHED_MC
  160. select ARCH_USE_BUILTIN_BSWAP
  161. select ARCH_USE_CMPXCHG_LOCKREF if PPC64
  162. select ARCH_USE_MEMTEST
  163. select ARCH_USE_QUEUED_RWLOCKS if PPC_QUEUED_SPINLOCKS
  164. select ARCH_WANT_DEFAULT_BPF_JIT
  165. select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT
  166. select ARCH_WANT_IPC_PARSE_VERSION
  167. select ARCH_WANT_IRQS_OFF_ACTIVATE_MM
  168. select ARCH_WANT_LD_ORPHAN_WARN
  169. select ARCH_WANT_OPTIMIZE_DAX_VMEMMAP if PPC_RADIX_MMU
  170. select ARCH_WANTS_MODULES_DATA_IN_VMALLOC if PPC_BOOK3S_32 || PPC_8xx
  171. select ARCH_WEAK_RELEASE_ACQUIRE
  172. select BINFMT_ELF
  173. select BUILDTIME_TABLE_SORT
  174. select CLONE_BACKWARDS
  175. select CPUMASK_OFFSTACK if NR_CPUS >= 8192
  176. select DCACHE_WORD_ACCESS if PPC64 && CPU_LITTLE_ENDIAN
  177. select DMA_OPS_BYPASS if PPC64
  178. select DYNAMIC_FTRACE if FUNCTION_TRACER
  179. select EDAC_ATOMIC_SCRUB
  180. select EDAC_SUPPORT
  181. select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY if ARCH_USING_PATCHABLE_FUNCTION_ENTRY
  182. select FUNCTION_ALIGNMENT_4B
  183. select GENERIC_ATOMIC64 if PPC32
  184. select GENERIC_CLOCKEVENTS_BROADCAST if SMP
  185. select GENERIC_CMOS_UPDATE
  186. select GENERIC_CPU_AUTOPROBE
  187. select GENERIC_CPU_VULNERABILITIES if PPC_BARRIER_NOSPEC
  188. select GENERIC_EARLY_IOREMAP
  189. select GENERIC_GETTIMEOFDAY
  190. select GENERIC_IDLE_POLL_SETUP
  191. select GENERIC_IOREMAP
  192. select GENERIC_IRQ_SHOW
  193. select GENERIC_IRQ_SHOW_LEVEL
  194. select GENERIC_PCI_IOMAP if PCI
  195. select GENERIC_SMP_IDLE_THREAD
  196. select GENERIC_TIME_VSYSCALL
  197. select HAS_IOPORT if PCI
  198. select HAVE_ARCH_AUDITSYSCALL
  199. select HAVE_ARCH_HUGE_VMALLOC if HAVE_ARCH_HUGE_VMAP
  200. select HAVE_ARCH_HUGE_VMAP if PPC_RADIX_MMU || PPC_8xx
  201. select HAVE_ARCH_JUMP_LABEL
  202. select HAVE_ARCH_JUMP_LABEL_RELATIVE
  203. select HAVE_ARCH_KASAN if PPC32 && PAGE_SHIFT <= 14
  204. select HAVE_ARCH_KASAN if PPC_RADIX_MMU
  205. select HAVE_ARCH_KASAN if PPC_BOOK3E_64
  206. select HAVE_ARCH_KASAN_VMALLOC if HAVE_ARCH_KASAN
  207. select HAVE_ARCH_KCSAN
  208. select HAVE_ARCH_KFENCE if ARCH_SUPPORTS_DEBUG_PAGEALLOC
  209. select HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET
  210. select HAVE_ARCH_WITHIN_STACK_FRAMES
  211. select HAVE_ARCH_KGDB
  212. select HAVE_ARCH_MMAP_RND_BITS
  213. select HAVE_ARCH_MMAP_RND_COMPAT_BITS if COMPAT
  214. select HAVE_ARCH_NVRAM_OPS
  215. select HAVE_ARCH_SECCOMP_FILTER
  216. select HAVE_ARCH_TRACEHOOK
  217. select HAVE_ASM_MODVERSIONS
  218. select HAVE_CONTEXT_TRACKING_USER
  219. select HAVE_C_RECORDMCOUNT
  220. select HAVE_DEBUG_KMEMLEAK
  221. select HAVE_DEBUG_STACKOVERFLOW
  222. select HAVE_DYNAMIC_FTRACE
  223. select HAVE_DYNAMIC_FTRACE_WITH_ARGS if ARCH_USING_PATCHABLE_FUNCTION_ENTRY || MPROFILE_KERNEL || PPC32
  224. select HAVE_DYNAMIC_FTRACE_WITH_CALL_OPS if PPC_FTRACE_OUT_OF_LINE || (PPC32 && ARCH_USING_PATCHABLE_FUNCTION_ENTRY)
  225. select HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS if HAVE_DYNAMIC_FTRACE_WITH_CALL_OPS
  226. select HAVE_DYNAMIC_FTRACE_WITH_REGS if ARCH_USING_PATCHABLE_FUNCTION_ENTRY || MPROFILE_KERNEL || PPC32
  227. select HAVE_EBPF_JIT
  228. select HAVE_EFFICIENT_UNALIGNED_ACCESS
  229. select HAVE_GUP_FAST
  230. select HAVE_FTRACE_GRAPH_FUNC
  231. select HAVE_FTRACE_REGS_HAVING_PT_REGS
  232. select HAVE_FUNCTION_ARG_ACCESS_API
  233. select HAVE_FUNCTION_DESCRIPTORS if PPC64_ELF_ABI_V1
  234. select HAVE_FUNCTION_ERROR_INJECTION
  235. select HAVE_FUNCTION_GRAPH_FREGS
  236. select HAVE_FUNCTION_GRAPH_TRACER
  237. select HAVE_FUNCTION_TRACER if !COMPILE_TEST && (PPC64 || (PPC32 && CC_IS_GCC))
  238. select HAVE_GCC_PLUGINS
  239. select HAVE_GENERIC_VDSO
  240. select HAVE_HARDLOCKUP_DETECTOR_ARCH if PPC_BOOK3S_64 && SMP
  241. select HAVE_HARDLOCKUP_DETECTOR_PERF if PERF_EVENTS && HAVE_PERF_EVENTS_NMI
  242. select HAVE_HW_BREAKPOINT if PERF_EVENTS && (PPC_BOOK3S || PPC_8xx)
  243. select HAVE_IOREMAP_PROT
  244. select HAVE_IRQ_TIME_ACCOUNTING
  245. select HAVE_KERNEL_GZIP
  246. select HAVE_KERNEL_LZMA if DEFAULT_UIMAGE
  247. select HAVE_KERNEL_LZO if DEFAULT_UIMAGE
  248. select HAVE_KERNEL_XZ if PPC_BOOK3S || 44x
  249. select HAVE_KPROBES
  250. select HAVE_KPROBES_ON_FTRACE
  251. select HAVE_KRETPROBES
  252. select HAVE_LD_DEAD_CODE_DATA_ELIMINATION if HAVE_OBJTOOL_MCOUNT && (!ARCH_USING_PATCHABLE_FUNCTION_ENTRY || (!CC_IS_GCC || GCC_VERSION >= 110100))
  253. select HAVE_LIVEPATCH if HAVE_DYNAMIC_FTRACE_WITH_REGS
  254. select HAVE_MOD_ARCH_SPECIFIC
  255. select HAVE_NMI if PERF_EVENTS || (PPC64 && PPC_BOOK3S)
  256. select HAVE_OPTPROBES
  257. select HAVE_OBJTOOL if ARCH_USING_PATCHABLE_FUNCTION_ENTRY || MPROFILE_KERNEL || PPC32
  258. select HAVE_OBJTOOL_MCOUNT if HAVE_OBJTOOL
  259. select HAVE_PERF_EVENTS
  260. select HAVE_PERF_EVENTS_NMI if PPC64
  261. select HAVE_PERF_REGS
  262. select HAVE_PERF_USER_STACK_DUMP
  263. select HAVE_PREEMPT_DYNAMIC_KEY
  264. select HAVE_RETHOOK if KPROBES
  265. select HAVE_REGS_AND_STACK_ACCESS_API
  266. select HAVE_RELIABLE_STACKTRACE
  267. select HAVE_RSEQ
  268. select HAVE_SAMPLE_FTRACE_DIRECT if HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS
  269. select HAVE_SAMPLE_FTRACE_DIRECT_MULTI if HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS
  270. select HAVE_SETUP_PER_CPU_AREA if PPC64
  271. select HAVE_SOFTIRQ_ON_OWN_STACK
  272. select HAVE_STACKPROTECTOR if PPC32 && $(cc-option,$(m32-flag) -mstack-protector-guard=tls -mstack-protector-guard-reg=r2 -mstack-protector-guard-offset=0)
  273. select HAVE_STACKPROTECTOR if PPC64 && $(cc-option,$(m64-flag) -mstack-protector-guard=tls -mstack-protector-guard-reg=r13 -mstack-protector-guard-offset=0)
  274. select HAVE_STATIC_CALL if PPC32
  275. select HAVE_STATIC_CALL_INLINE if PPC32
  276. select HAVE_SYSCALL_TRACEPOINTS
  277. select HAVE_VIRT_CPU_ACCOUNTING
  278. select HAVE_VIRT_CPU_ACCOUNTING_GEN
  279. select HOTPLUG_SMT if HOTPLUG_CPU
  280. select SMT_NUM_THREADS_DYNAMIC
  281. select HUGETLB_PAGE_SIZE_VARIABLE if PPC_BOOK3S_64 && HUGETLB_PAGE
  282. select IOMMU_HELPER if PPC64
  283. select IRQ_DOMAIN
  284. select IRQ_FORCED_THREADING
  285. select KASAN_VMALLOC if KASAN && EXECMEM
  286. select LOCK_MM_AND_FIND_VMA
  287. select MMU_GATHER_PAGE_SIZE
  288. select MMU_GATHER_RCU_TABLE_FREE
  289. select HAVE_ARCH_TLB_REMOVE_TABLE
  290. select MMU_GATHER_MERGE_VMAS
  291. select MMU_LAZY_TLB_SHOOTDOWN if PPC_BOOK3S_64
  292. select MODULES_USE_ELF_RELA
  293. select NEED_DMA_MAP_STATE if PPC64 || NOT_COHERENT_CACHE
  294. select NEED_PER_CPU_EMBED_FIRST_CHUNK if PPC64
  295. select NEED_PER_CPU_PAGE_FIRST_CHUNK if PPC64
  296. select NEED_SG_DMA_LENGTH
  297. select OF
  298. select OF_EARLY_FLATTREE
  299. select OLD_SIGACTION if PPC32
  300. select OLD_SIGSUSPEND
  301. select PCI_DOMAINS if PCI
  302. select PCI_MSI_ARCH_FALLBACKS if PCI_MSI
  303. select PCI_SYSCALL if PCI
  304. select PPC_DAWR if PPC64
  305. select RTC_LIB
  306. select SPARSE_IRQ
  307. select STRICT_KERNEL_RWX if STRICT_MODULE_RWX
  308. select SYSCTL_EXCEPTION_TRACE
  309. select THREAD_INFO_IN_TASK
  310. select TRACE_IRQFLAGS_SUPPORT
  311. select VDSO_GETRANDOM
  312. #
  313. # Please keep this list sorted alphabetically.
  314. #
  315. config PPC_BARRIER_NOSPEC
  316. bool
  317. default y
  318. depends on PPC_BOOK3S_64 || PPC_E500
  319. config PPC_HAS_LBARX_LHARX
  320. bool
  321. config EARLY_PRINTK
  322. bool
  323. default y
  324. config PANIC_TIMEOUT
  325. int
  326. default 180
  327. config COMPAT
  328. bool "Enable support for 32bit binaries"
  329. depends on PPC64
  330. default y if !CPU_LITTLE_ENDIAN
  331. select ARCH_WANT_OLD_COMPAT_IPC
  332. select COMPAT_OLD_SIGACTION
  333. config SCHED_OMIT_FRAME_POINTER
  334. bool
  335. default y
  336. config ARCH_MAY_HAVE_PC_FDC
  337. bool
  338. default PCI
  339. config PPC_UDBG_16550
  340. bool
  341. config GENERIC_TBSYNC
  342. bool
  343. default y if PPC32 && SMP
  344. config AUDIT_ARCH
  345. bool
  346. default y
  347. config GENERIC_BUG
  348. bool
  349. default y
  350. depends on BUG
  351. config GENERIC_BUG_RELATIVE_POINTERS
  352. def_bool y
  353. depends on GENERIC_BUG
  354. config SYS_SUPPORTS_APM_EMULATION
  355. default y if PMAC_APM_EMU
  356. bool
  357. config EPAPR_BOOT
  358. bool
  359. help
  360. Used to allow a board to specify it wants an ePAPR compliant wrapper.
  361. config DEFAULT_UIMAGE
  362. bool
  363. help
  364. Used to allow a board to specify it wants a uImage built by default
  365. config ARCH_HIBERNATION_POSSIBLE
  366. bool
  367. default y
  368. config ARCH_SUSPEND_POSSIBLE
  369. def_bool y
  370. depends on ADB_PMU || PPC_EFIKA || PPC_LITE5200 || PPC_83xx || \
  371. (PPC_85xx && !PPC_E500MC) || PPC_86xx || PPC_PSERIES \
  372. || 44x
  373. config ARCH_SUSPEND_NONZERO_CPU
  374. def_bool y
  375. depends on PPC_POWERNV || PPC_PSERIES
  376. config ARCH_HAS_ADD_PAGES
  377. def_bool y
  378. depends on ARCH_ENABLE_MEMORY_HOTPLUG
  379. config PPC_DCR_NATIVE
  380. bool
  381. config PPC_DCR
  382. bool
  383. depends on PPC_DCR_NATIVE
  384. default y
  385. config PPC_PCI_OF_BUS_MAP
  386. bool "Use pci_to_OF_bus_map (deprecated)"
  387. depends on PPC32
  388. depends on PPC_PMAC || PPC_CHRP
  389. help
  390. This option uses pci_to_OF_bus_map to map OF nodes to PCI devices, which
  391. restricts the system to only having 256 PCI buses. On CHRP it also causes
  392. the "pci-OF-bus-map" property to be created in the device tree.
  393. If unsure, say "N".
  394. config PPC_PCI_BUS_NUM_DOMAIN_DEPENDENT
  395. depends on PPC32
  396. depends on !PPC_PCI_OF_BUS_MAP
  397. bool "Assign PCI bus numbers from zero individually for each PCI domain"
  398. default y
  399. help
  400. By default on PPC32 were PCI bus numbers unique across all PCI domains.
  401. So system could have only 256 PCI buses independently of available
  402. PCI domains. When this option is enabled then PCI bus numbers are
  403. PCI domain dependent and each PCI controller on own domain can have
  404. 256 PCI buses, like it is on other Linux architectures.
  405. config ARCH_SUPPORTS_UPROBES
  406. def_bool y
  407. config PPC_ADV_DEBUG_REGS
  408. bool
  409. depends on BOOKE
  410. default y
  411. config PPC_ADV_DEBUG_IACS
  412. int
  413. depends on PPC_ADV_DEBUG_REGS
  414. default 4 if 44x
  415. default 2
  416. config PPC_ADV_DEBUG_DACS
  417. int
  418. depends on PPC_ADV_DEBUG_REGS
  419. default 2
  420. config PPC_ADV_DEBUG_DVCS
  421. int
  422. depends on PPC_ADV_DEBUG_REGS
  423. default 2 if 44x
  424. default 0
  425. config PPC_ADV_DEBUG_DAC_RANGE
  426. bool
  427. depends on PPC_ADV_DEBUG_REGS && 44x
  428. default y
  429. config PPC_DAWR
  430. bool
  431. config PGTABLE_LEVELS
  432. int
  433. default 2 if !PPC64
  434. default 4
  435. source "arch/powerpc/sysdev/Kconfig"
  436. source "arch/powerpc/platforms/Kconfig"
  437. menu "Kernel options"
  438. config HIGHMEM
  439. bool "High memory support"
  440. depends on PPC32
  441. select KMAP_LOCAL
  442. source "kernel/Kconfig.hz"
  443. config MATH_EMULATION
  444. bool "Math emulation"
  445. depends on 44x || PPC_8xx || PPC_MPC832x || BOOKE || PPC_MICROWATT
  446. select PPC_FPU_REGS
  447. help
  448. Some PowerPC chips designed for embedded applications do not have
  449. a floating-point unit and therefore do not implement the
  450. floating-point instructions in the PowerPC instruction set. If you
  451. say Y here, the kernel will include code to emulate a floating-point
  452. unit, which will allow programs that use floating-point
  453. instructions to run.
  454. This is also useful to emulate missing (optional) instructions
  455. such as fsqrt on cores that do have an FPU but do not implement
  456. them (such as Freescale BookE).
  457. choice
  458. prompt "Math emulation options"
  459. default MATH_EMULATION_FULL
  460. depends on MATH_EMULATION
  461. config MATH_EMULATION_FULL
  462. bool "Emulate all the floating point instructions"
  463. help
  464. Select this option will enable the kernel to support to emulate
  465. all the floating point instructions. If your SoC doesn't have
  466. a FPU, you should select this.
  467. config MATH_EMULATION_HW_UNIMPLEMENTED
  468. bool "Just emulate the FPU unimplemented instructions"
  469. help
  470. Select this if you know there does have a hardware FPU on your
  471. SoC, but some floating point instructions are not implemented by that.
  472. endchoice
  473. config PPC_TRANSACTIONAL_MEM
  474. bool "Transactional Memory support for POWERPC"
  475. depends on PPC_BOOK3S_64
  476. depends on SMP
  477. select ALTIVEC
  478. select VSX
  479. help
  480. Support user-mode Transactional Memory on POWERPC.
  481. config PPC_UV
  482. bool "Ultravisor support"
  483. depends on KVM_BOOK3S_HV_POSSIBLE
  484. depends on DEVICE_PRIVATE
  485. default n
  486. help
  487. This option paravirtualizes the kernel to run in POWER platforms that
  488. supports the Protected Execution Facility (PEF). On such platforms,
  489. the ultravisor firmware runs at a privilege level above the
  490. hypervisor.
  491. If unsure, say "N".
  492. config LD_HEAD_STUB_CATCH
  493. bool "Reserve 256 bytes to cope with linker stubs in HEAD text" if EXPERT
  494. depends on PPC64
  495. help
  496. Very large kernels can cause linker branch stubs to be generated by
  497. code in head_64.S, which moves the head text sections out of their
  498. specified location. This option can work around the problem.
  499. If unsure, say "N".
  500. config MPROFILE_KERNEL
  501. depends on PPC64_ELF_ABI_V2 && FUNCTION_TRACER
  502. def_bool $(success,$(srctree)/arch/powerpc/tools/gcc-check-mprofile-kernel.sh $(CC) -mlittle-endian) if CPU_LITTLE_ENDIAN
  503. def_bool $(success,$(srctree)/arch/powerpc/tools/gcc-check-mprofile-kernel.sh $(CC) -mbig-endian) if CPU_BIG_ENDIAN
  504. config ARCH_USING_PATCHABLE_FUNCTION_ENTRY
  505. depends on FUNCTION_TRACER && (PPC32 || PPC64_ELF_ABI_V2)
  506. depends on $(cc-option,-fpatchable-function-entry=2)
  507. def_bool y if PPC32
  508. def_bool $(success,$(srctree)/arch/powerpc/tools/check-fpatchable-function-entry.sh $(CC) $(CLANG_FLAGS) -mlittle-endian) if PPC64 && CPU_LITTLE_ENDIAN
  509. def_bool $(success,$(srctree)/arch/powerpc/tools/check-fpatchable-function-entry.sh $(CC) -mbig-endian) if PPC64 && CPU_BIG_ENDIAN
  510. config PPC_FTRACE_OUT_OF_LINE
  511. def_bool PPC64 && ARCH_USING_PATCHABLE_FUNCTION_ENTRY
  512. select ARCH_WANTS_PRE_LINK_VMLINUX
  513. config PPC_FTRACE_OUT_OF_LINE_NUM_RESERVE
  514. int "Number of ftrace out-of-line stubs to reserve within .text"
  515. depends on PPC_FTRACE_OUT_OF_LINE
  516. default 32768
  517. help
  518. Number of stubs to reserve for use by ftrace. This space is
  519. reserved within .text, and is distinct from any additional space
  520. added at the end of .text before the final vmlinux link. Set to
  521. zero to have stubs only be generated at the end of vmlinux (only
  522. if the size of vmlinux is less than 32MB). Set to a higher value
  523. if building vmlinux larger than 48MB.
  524. config HOTPLUG_CPU
  525. bool "Support for enabling/disabling CPUs"
  526. depends on SMP && (PPC_PSERIES || \
  527. PPC_PMAC || PPC_POWERNV || FSL_SOC_BOOKE)
  528. help
  529. Say Y here to be able to disable and re-enable individual
  530. CPUs at runtime on SMP machines.
  531. Say N if you are unsure.
  532. config INTERRUPT_SANITIZE_REGISTERS
  533. bool "Clear gprs on interrupt arrival"
  534. depends on PPC64 && ARCH_HAS_SYSCALL_WRAPPER
  535. default PPC_BOOK3E_64 || PPC_PSERIES || PPC_POWERNV
  536. help
  537. Reduce the influence of user register state on interrupt handlers and
  538. syscalls through clearing user state from registers before handling
  539. the exception.
  540. config PPC_QUEUED_SPINLOCKS
  541. bool "Queued spinlocks" if EXPERT
  542. depends on SMP
  543. default PPC_BOOK3S_64
  544. help
  545. Say Y here to use queued spinlocks which give better scalability and
  546. fairness on large SMP and NUMA systems without harming single threaded
  547. performance.
  548. config ARCH_CPU_PROBE_RELEASE
  549. def_bool y
  550. depends on HOTPLUG_CPU
  551. config PPC64_SUPPORTS_MEMORY_FAILURE
  552. bool "Add support for memory hwpoison"
  553. depends on PPC_BOOK3S_64
  554. default "y" if PPC_POWERNV
  555. select ARCH_SUPPORTS_MEMORY_FAILURE
  556. config ARCH_SUPPORTS_KEXEC
  557. def_bool PPC_BOOK3S || PPC_E500 || (44x && !SMP)
  558. config ARCH_SUPPORTS_KEXEC_FILE
  559. def_bool PPC64
  560. config ARCH_SUPPORTS_KEXEC_PURGATORY
  561. def_bool y
  562. config ARCH_SELECTS_KEXEC_FILE
  563. def_bool y
  564. depends on KEXEC_FILE
  565. select KEXEC_ELF
  566. select HAVE_IMA_KEXEC if IMA
  567. config PPC64_BIG_ENDIAN_ELF_ABI_V2
  568. # Option is available to BFD, but LLD does not support ELFv1 so this is
  569. # always true there.
  570. prompt "Build big-endian kernel using ELF ABI V2" if LD_IS_BFD && EXPERT
  571. def_bool y
  572. depends on PPC64 && CPU_BIG_ENDIAN
  573. depends on CC_HAS_ELFV2
  574. help
  575. This builds the kernel image using the "Power Architecture 64-Bit ELF
  576. V2 ABI Specification", which has a reduced stack overhead and faster
  577. function calls. This internal kernel ABI option does not affect
  578. userspace compatibility.
  579. The V2 ABI is standard for 64-bit little-endian, but for big-endian
  580. it is less well tested by kernel and toolchain. However some distros
  581. build userspace this way, and it can produce a functioning kernel.
  582. config RELOCATABLE
  583. bool "Build a relocatable kernel"
  584. depends on PPC64 || (FLATMEM && (44x || PPC_85xx))
  585. select NONSTATIC_KERNEL
  586. help
  587. This builds a kernel image that is capable of running at the
  588. location the kernel is loaded at. For ppc32, there is no any
  589. alignment restrictions, and this feature is a superset of
  590. DYNAMIC_MEMSTART and hence overrides it. For ppc64, we should use
  591. 16k-aligned base address. The kernel is linked as a
  592. position-independent executable (PIE) and contains dynamic relocations
  593. which are processed early in the bootup process.
  594. One use is for the kexec on panic case where the recovery kernel
  595. must live at a different physical address than the primary
  596. kernel.
  597. Note: If CONFIG_RELOCATABLE=y, then the kernel runs from the address
  598. it has been loaded at and the compile time physical addresses
  599. CONFIG_PHYSICAL_START is ignored. However CONFIG_PHYSICAL_START
  600. setting can still be useful to bootwrappers that need to know the
  601. load address of the kernel (eg. u-boot/mkimage).
  602. config RANDOMIZE_BASE
  603. bool "Randomize the address of the kernel image"
  604. depends on PPC_85xx && FLATMEM
  605. depends on RELOCATABLE
  606. help
  607. Randomizes the virtual address at which the kernel image is
  608. loaded, as a security feature that deters exploit attempts
  609. relying on knowledge of the location of kernel internals.
  610. If unsure, say Y.
  611. config RELOCATABLE_TEST
  612. bool "Test relocatable kernel"
  613. depends on (PPC64 && RELOCATABLE)
  614. help
  615. This runs the relocatable kernel at the address it was initially
  616. loaded at, which tends to be non-zero and therefore test the
  617. relocation code.
  618. config ARCH_SUPPORTS_CRASH_DUMP
  619. def_bool PPC64 || PPC_BOOK3S_32 || PPC_85xx || (44x && !SMP)
  620. config ARCH_DEFAULT_CRASH_DUMP
  621. bool
  622. default y if !PPC_BOOK3S_32
  623. config ARCH_SELECTS_CRASH_DUMP
  624. def_bool y
  625. depends on CRASH_DUMP
  626. select RELOCATABLE if PPC64 || 44x || PPC_85xx
  627. config ARCH_SUPPORTS_CRASH_HOTPLUG
  628. def_bool y
  629. depends on PPC64
  630. config ARCH_HAS_GENERIC_CRASHKERNEL_RESERVATION
  631. def_bool CRASH_RESERVE
  632. config FA_DUMP
  633. bool "Firmware-assisted dump"
  634. depends on CRASH_DUMP && PPC64 && (PPC_RTAS || PPC_POWERNV)
  635. help
  636. A robust mechanism to get reliable kernel crash dump with
  637. assistance from firmware. This approach does not use kexec,
  638. instead firmware assists in booting the capture kernel
  639. while preserving memory contents. Firmware-assisted dump
  640. is meant to be a kdump replacement offering robustness and
  641. speed not possible without system firmware assistance.
  642. If unsure, say "y". Only special kernels like petitboot may
  643. need to say "N" here.
  644. config PRESERVE_FA_DUMP
  645. bool "Preserve Firmware-assisted dump"
  646. depends on PPC64 && PPC_POWERNV && !FA_DUMP
  647. help
  648. On a kernel with FA_DUMP disabled, this option helps to preserve
  649. crash data from a previously crash'ed kernel. Useful when the next
  650. memory preserving kernel boot would process this crash data.
  651. Petitboot kernel is the typical usecase for this option.
  652. config OPAL_CORE
  653. bool "Export OPAL memory as /sys/firmware/opal/core"
  654. depends on PPC64 && PPC_POWERNV
  655. help
  656. This option uses the MPIPL support in firmware to provide an
  657. ELF core of OPAL memory after a crash. The ELF core is exported
  658. as /sys/firmware/opal/core file which is helpful in debugging
  659. OPAL crashes using GDB.
  660. config IRQ_ALL_CPUS
  661. bool "Distribute interrupts on all CPUs by default"
  662. depends on SMP
  663. help
  664. This option gives the kernel permission to distribute IRQs across
  665. multiple CPUs. Saying N here will route all IRQs to the first
  666. CPU. Generally saying Y is safe, although some problems have been
  667. reported with SMP Power Macintoshes with this option enabled.
  668. config NUMA
  669. bool "NUMA Memory Allocation and Scheduler Support"
  670. depends on PPC64 && SMP
  671. default y if PPC_PSERIES || PPC_POWERNV
  672. select USE_PERCPU_NUMA_NODE_ID
  673. help
  674. Enable NUMA (Non-Uniform Memory Access) support.
  675. The kernel will try to allocate memory used by a CPU on the
  676. local memory controller of the CPU and add some more
  677. NUMA awareness to the kernel.
  678. config NODES_SHIFT
  679. int
  680. default "8" if PPC64
  681. default "4"
  682. depends on NUMA
  683. config HAVE_MEMORYLESS_NODES
  684. def_bool y
  685. depends on NUMA
  686. config ARCH_SELECT_MEMORY_MODEL
  687. def_bool y
  688. depends on PPC64
  689. config ARCH_FLATMEM_ENABLE
  690. def_bool y
  691. depends on (PPC64 && !NUMA) || PPC32
  692. config ARCH_SPARSEMEM_ENABLE
  693. def_bool y
  694. depends on PPC64
  695. select SPARSEMEM_VMEMMAP_ENABLE
  696. config ARCH_SPARSEMEM_DEFAULT
  697. def_bool y
  698. depends on PPC_BOOK3S_64
  699. config ILLEGAL_POINTER_VALUE
  700. hex
  701. # This is roughly half way between the top of user space and the bottom
  702. # of kernel space, which seems about as good as we can get.
  703. default 0x5deadbeef0000000 if PPC64
  704. default 0
  705. config ARCH_MEMORY_PROBE
  706. def_bool y
  707. depends on MEMORY_HOTPLUG
  708. choice
  709. prompt "Page size"
  710. default PPC_64K_PAGES if PPC_BOOK3S_64
  711. default PPC_4K_PAGES
  712. help
  713. Select the kernel logical page size. Increasing the page size
  714. will reduce software overhead at each page boundary, allow
  715. hardware prefetch mechanisms to be more effective, and allow
  716. larger dma transfers increasing IO efficiency and reducing
  717. overhead. However the utilization of memory will increase.
  718. For example, each cached file will using a multiple of the
  719. page size to hold its contents and the difference between the
  720. end of file and the end of page is wasted.
  721. Some dedicated systems, such as software raid serving with
  722. accelerated calculations, have shown significant increases.
  723. If you configure a 64 bit kernel for 64k pages but the
  724. processor does not support them, then the kernel will simulate
  725. them with 4k pages, loading them on demand, but with the
  726. reduced software overhead and larger internal fragmentation.
  727. For the 32 bit kernel, a large page option will not be offered
  728. unless it is supported by the configured processor.
  729. If unsure, choose 4K_PAGES.
  730. config PPC_4K_PAGES
  731. bool "4k page size"
  732. select HAVE_ARCH_SOFT_DIRTY if PPC_BOOK3S_64
  733. select HAVE_PAGE_SIZE_4KB
  734. config PPC_16K_PAGES
  735. bool "16k page size"
  736. depends on 44x || PPC_8xx
  737. select HAVE_PAGE_SIZE_16KB
  738. config PPC_64K_PAGES
  739. bool "64k page size"
  740. depends on 44x || PPC_BOOK3S_64
  741. select HAVE_ARCH_SOFT_DIRTY if PPC_BOOK3S_64
  742. select HAVE_PAGE_SIZE_64KB
  743. config PPC_256K_PAGES
  744. bool "256k page size (Requires non-standard binutils settings)"
  745. depends on 44x && !PPC_47x
  746. select HAVE_PAGE_SIZE_256KB
  747. help
  748. Make the page size 256k.
  749. The kernel will only be able to run applications that have been
  750. compiled with '-zmax-page-size' set to 256K (the default is 64K) using
  751. binutils later than 2.17.50.0.3, or by patching the ELF_MAXPAGESIZE
  752. definition from 0x10000 to 0x40000 in older versions.
  753. endchoice
  754. config THREAD_SHIFT
  755. int "Thread shift" if EXPERT
  756. range 13 15
  757. default "15" if PPC_256K_PAGES
  758. default "15" if PPC_PSERIES || PPC_POWERNV
  759. default "14" if PPC64
  760. default "13"
  761. help
  762. Used to define the stack size. The default is almost always what you
  763. want. Only change this if you know what you are doing.
  764. config DATA_SHIFT_BOOL
  765. bool "Set custom data alignment"
  766. depends on ADVANCED_OPTIONS
  767. depends on STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE
  768. depends on (PPC_8xx && !PIN_TLB_DATA && (!STRICT_KERNEL_RWX || !PIN_TLB_TEXT)) || \
  769. PPC_BOOK3S_32 || PPC_85xx
  770. help
  771. This option allows you to set the kernel data alignment. When
  772. RAM is mapped by blocks, the alignment needs to fit the size and
  773. number of possible blocks. The default should be OK for most configs.
  774. Say N here unless you know what you are doing.
  775. config DATA_SHIFT
  776. int "Data shift" if DATA_SHIFT_BOOL
  777. default 24 if STRICT_KERNEL_RWX && PPC64
  778. range 17 28 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_BOOK3S_32
  779. range 14 23 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_8xx
  780. range 20 24 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_85xx
  781. default 22 if STRICT_KERNEL_RWX && PPC_BOOK3S_32
  782. default 18 if (DEBUG_PAGEALLOC || KFENCE) && PPC_BOOK3S_32
  783. default 23 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_8xx && \
  784. (PIN_TLB_DATA || PIN_TLB_TEXT)
  785. default 19 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_8xx
  786. default 24 if STRICT_KERNEL_RWX && PPC_85xx
  787. default PAGE_SHIFT
  788. help
  789. On Book3S 32 (603+), DBATs are used to map kernel text and rodata RO.
  790. Smaller is the alignment, greater is the number of necessary DBATs.
  791. On 8xx, large pages (16kb or 512kb or 8M) are used to map kernel
  792. linear memory. Aligning to 8M reduces TLB misses as only 8M pages
  793. are used in that case. If PIN_TLB is selected, it must be aligned
  794. to 8M as 8M pages will be pinned.
  795. config ARCH_FORCE_MAX_ORDER
  796. int "Order of maximal physically contiguous allocations"
  797. range 7 8 if PPC64 && PPC_64K_PAGES
  798. default "8" if PPC64 && PPC_64K_PAGES
  799. range 12 12 if PPC64 && !PPC_64K_PAGES
  800. default "12" if PPC64 && !PPC_64K_PAGES
  801. range 8 10 if PPC32 && PPC_16K_PAGES
  802. default "8" if PPC32 && PPC_16K_PAGES
  803. range 6 10 if PPC32 && PPC_64K_PAGES
  804. default "6" if PPC32 && PPC_64K_PAGES
  805. range 4 10 if PPC32 && PPC_256K_PAGES
  806. default "4" if PPC32 && PPC_256K_PAGES
  807. range 10 12
  808. default "10"
  809. help
  810. The kernel page allocator limits the size of maximal physically
  811. contiguous allocations. The limit is called MAX_PAGE_ORDER and it
  812. defines the maximal power of two of number of pages that can be
  813. allocated as a single contiguous block. This option allows
  814. overriding the default setting when ability to allocate very
  815. large blocks of physically contiguous memory is required.
  816. The page size is not necessarily 4KB. For example, on 64-bit
  817. systems, 64KB pages can be enabled via CONFIG_PPC_64K_PAGES. Keep
  818. this in mind when choosing a value for this option.
  819. Don't change if unsure.
  820. config PPC_SUBPAGE_PROT
  821. bool "Support setting protections for 4k subpages (subpage_prot syscall)"
  822. default n
  823. depends on PPC_64S_HASH_MMU && PPC_64K_PAGES
  824. help
  825. This option adds support for system call to allow user programs
  826. to set access permissions (read/write, readonly, or no access)
  827. on the 4k subpages of each 64k page.
  828. If unsure, say N here.
  829. config PPC_PROT_SAO_LPAR
  830. bool "Support PROT_SAO mappings in LPARs"
  831. depends on PPC_BOOK3S_64
  832. help
  833. This option adds support for PROT_SAO mappings from userspace
  834. inside LPARs on supported CPUs.
  835. This may cause issues when performing guest migration from
  836. a CPU that supports SAO to one that does not.
  837. If unsure, say N here.
  838. config PPC_COPRO_BASE
  839. bool
  840. config PPC_DENORMALISATION
  841. bool "PowerPC denormalisation exception handling"
  842. depends on PPC_BOOK3S_64
  843. default "y" if PPC_POWERNV
  844. help
  845. Add support for handling denormalisation of single precision
  846. values. Useful for bare metal only. If unsure say Y here.
  847. config CMDLINE
  848. string "Initial kernel command string"
  849. default ""
  850. help
  851. On some platforms, there is currently no way for the boot loader to
  852. pass arguments to the kernel. For these platforms, you can supply
  853. some command-line options at build time by entering them here. In
  854. most cases you will need to specify the root device here.
  855. choice
  856. prompt "Kernel command line type"
  857. depends on CMDLINE != ""
  858. default CMDLINE_FROM_BOOTLOADER
  859. config CMDLINE_FROM_BOOTLOADER
  860. bool "Use bootloader kernel arguments if available"
  861. help
  862. Uses the command-line options passed by the boot loader. If
  863. the boot loader doesn't provide any, the default kernel command
  864. string provided in CMDLINE will be used.
  865. config CMDLINE_EXTEND
  866. bool "Extend bootloader kernel arguments"
  867. help
  868. The command-line arguments provided by the boot loader will be
  869. appended to the default kernel command string.
  870. config CMDLINE_FORCE
  871. bool "Always use the default kernel command string"
  872. help
  873. Always use the default kernel command string, even if the boot
  874. loader passes other arguments to the kernel.
  875. This is useful if you cannot or don't want to change the
  876. command-line options your boot loader passes to the kernel.
  877. endchoice
  878. config EXTRA_TARGETS
  879. string "Additional default image types"
  880. help
  881. List additional targets to be built by the bootwrapper here (separated
  882. by spaces). This is useful for targets that depend of device tree
  883. files in the .dts directory.
  884. Targets in this list will be build as part of the default build
  885. target, or when the user does a 'make zImage' or a
  886. 'make zImage.initrd'.
  887. If unsure, leave blank
  888. config ARCH_WANTS_FREEZER_CONTROL
  889. def_bool y
  890. depends on ADB_PMU
  891. source "kernel/power/Kconfig"
  892. config PPC_MEM_KEYS
  893. prompt "PowerPC Memory Protection Keys"
  894. def_bool y
  895. depends on PPC_BOOK3S_64
  896. depends on PPC_64S_HASH_MMU
  897. select ARCH_USES_HIGH_VMA_FLAGS
  898. select ARCH_HAS_PKEYS
  899. help
  900. Memory Protection Keys provides a mechanism for enforcing
  901. page-based protections, but without requiring modification of the
  902. page tables when an application changes protection domains.
  903. For details, see Documentation/core-api/protection-keys.rst
  904. If unsure, say y.
  905. config ARCH_PKEY_BITS
  906. int
  907. default 5
  908. config PPC_SECURE_BOOT
  909. prompt "Enable secure boot support"
  910. bool
  911. depends on PPC_POWERNV || PPC_PSERIES
  912. depends on IMA_ARCH_POLICY
  913. imply IMA_SECURE_AND_OR_TRUSTED_BOOT
  914. select PSERIES_PLPKS if PPC_PSERIES
  915. help
  916. Systems with firmware secure boot enabled need to define security
  917. policies to extend secure boot to the OS. This config allows a user
  918. to enable OS secure boot on systems that have firmware support for
  919. it. If in doubt say N.
  920. config PPC_SECVAR_SYSFS
  921. bool "Enable sysfs interface for POWER secure variables"
  922. default y
  923. depends on PPC_SECURE_BOOT
  924. depends on SYSFS
  925. help
  926. POWER secure variables are managed and controlled by firmware.
  927. These variables are exposed to userspace via sysfs to enable
  928. read/write operations on these variables. Say Y if you have
  929. secure boot enabled and want to expose variables to userspace.
  930. endmenu
  931. config ISA_DMA_API
  932. bool
  933. default PCI
  934. menu "Bus options"
  935. config ISA
  936. bool "Support for ISA-bus hardware"
  937. depends on PPC_CHRP
  938. select PPC_I8259
  939. help
  940. Find out whether you have ISA slots on your motherboard. ISA is the
  941. name of a bus system, i.e. the way the CPU talks to the other stuff
  942. inside your box. If you have an Apple machine, say N here; if you
  943. have an IBM RS/6000 or pSeries machine, say Y. If you have an
  944. embedded board, consult your board documentation.
  945. config GENERIC_ISA_DMA
  946. bool
  947. depends on ISA_DMA_API
  948. default y
  949. config PPC_INDIRECT_PCI
  950. bool
  951. depends on PCI
  952. default y if 44x
  953. config SBUS
  954. bool
  955. config FSL_SOC
  956. bool
  957. config FSL_PCI
  958. bool
  959. select ARCH_HAS_DMA_SET_MASK
  960. select PPC_INDIRECT_PCI
  961. select PCI_QUIRKS
  962. config FSL_PMC
  963. bool
  964. default y
  965. depends on SUSPEND && (PPC_85xx || PPC_86xx)
  966. help
  967. Freescale MPC85xx/MPC86xx power management controller support
  968. (suspend/resume). For MPC83xx see platforms/83xx/suspend.c
  969. config PPC4xx_CPM
  970. bool
  971. default y
  972. depends on SUSPEND && 44x
  973. help
  974. PPC4xx Clock Power Management (CPM) support (suspend/resume).
  975. It also enables support for two different idle states (idle-wait
  976. and idle-doze).
  977. config FSL_LBC
  978. bool "Freescale Local Bus support"
  979. help
  980. Enables reporting of errors from the Freescale local bus
  981. controller. Also contains some common code used by
  982. drivers for specific local bus peripherals.
  983. config FSL_GTM
  984. bool
  985. depends on PPC_83xx || QUICC_ENGINE || CPM2
  986. help
  987. Freescale General-purpose Timers support
  988. config FSL_RIO
  989. bool "Freescale Embedded SRIO Controller support"
  990. depends on RAPIDIO = y && HAVE_RAPIDIO
  991. default "n"
  992. help
  993. Include support for RapidIO controller on Freescale embedded
  994. processors (MPC8548, MPC8641, etc).
  995. endmenu
  996. config NONSTATIC_KERNEL
  997. bool
  998. menu "Advanced setup"
  999. depends on PPC32
  1000. config ADVANCED_OPTIONS
  1001. bool "Prompt for advanced kernel configuration options"
  1002. help
  1003. This option will enable prompting for a variety of advanced kernel
  1004. configuration options. These options can cause the kernel to not
  1005. work if they are set incorrectly, but can be used to optimize certain
  1006. aspects of kernel memory management.
  1007. Unless you know what you are doing, say N here.
  1008. comment "Default settings for advanced configuration options are used"
  1009. depends on !ADVANCED_OPTIONS
  1010. config LOWMEM_SIZE_BOOL
  1011. bool "Set maximum low memory"
  1012. depends on ADVANCED_OPTIONS
  1013. help
  1014. This option allows you to set the maximum amount of memory which
  1015. will be used as "low memory", that is, memory which the kernel can
  1016. access directly, without having to set up a kernel virtual mapping.
  1017. This can be useful in optimizing the layout of kernel virtual
  1018. memory.
  1019. Say N here unless you know what you are doing.
  1020. config LOWMEM_SIZE
  1021. hex "Maximum low memory size (in bytes)" if LOWMEM_SIZE_BOOL
  1022. default "0x30000000"
  1023. config LOWMEM_CAM_NUM_BOOL
  1024. bool "Set number of CAMs to use to map low memory"
  1025. depends on ADVANCED_OPTIONS && PPC_85xx
  1026. help
  1027. This option allows you to set the maximum number of CAM slots that
  1028. will be used to map low memory. There are a limited number of slots
  1029. available and even more limited number that will fit in the L1 MMU.
  1030. However, using more entries will allow mapping more low memory. This
  1031. can be useful in optimizing the layout of kernel virtual memory.
  1032. Say N here unless you know what you are doing.
  1033. config LOWMEM_CAM_NUM
  1034. depends on PPC_85xx
  1035. int "Number of CAMs to use to map low memory" if LOWMEM_CAM_NUM_BOOL
  1036. default 3 if !STRICT_KERNEL_RWX
  1037. default 9 if DATA_SHIFT >= 24
  1038. default 12 if DATA_SHIFT >= 22
  1039. default 15
  1040. config DYNAMIC_MEMSTART
  1041. bool "Enable page aligned dynamic load address for kernel"
  1042. depends on ADVANCED_OPTIONS && FLATMEM && (PPC_85xx || 44x)
  1043. select NONSTATIC_KERNEL
  1044. help
  1045. This option enables the kernel to be loaded at any page aligned
  1046. physical address. The kernel creates a mapping from KERNELBASE to
  1047. the address where the kernel is loaded. The page size here implies
  1048. the TLB page size of the mapping for kernel on the particular platform.
  1049. Please refer to the init code for finding the TLB page size.
  1050. DYNAMIC_MEMSTART is an easy way of implementing pseudo-RELOCATABLE
  1051. kernel image, where the only restriction is the page aligned kernel
  1052. load address. When this option is enabled, the compile time physical
  1053. address CONFIG_PHYSICAL_START is ignored.
  1054. This option is overridden by CONFIG_RELOCATABLE
  1055. config PAGE_OFFSET_BOOL
  1056. bool "Set custom page offset address"
  1057. depends on ADVANCED_OPTIONS
  1058. help
  1059. This option allows you to set the kernel virtual address at which
  1060. the kernel will map low memory. This can be useful in optimizing
  1061. the virtual memory layout of the system.
  1062. Say N here unless you know what you are doing.
  1063. config PAGE_OFFSET
  1064. hex "Virtual address of memory base" if PAGE_OFFSET_BOOL
  1065. default "0xc0000000"
  1066. config KERNEL_START_BOOL
  1067. bool "Set custom kernel base address"
  1068. depends on ADVANCED_OPTIONS
  1069. help
  1070. This option allows you to set the kernel virtual address at which
  1071. the kernel will be loaded. Normally this should match PAGE_OFFSET
  1072. however there are times (like kdump) that one might not want them
  1073. to be the same.
  1074. Say N here unless you know what you are doing.
  1075. config KERNEL_START
  1076. hex "Virtual address of kernel base" if KERNEL_START_BOOL
  1077. default PAGE_OFFSET if PAGE_OFFSET_BOOL
  1078. default "0xc2000000" if CRASH_DUMP && !NONSTATIC_KERNEL
  1079. default "0xc0000000"
  1080. config PHYSICAL_START_BOOL
  1081. bool "Set physical address where the kernel is loaded"
  1082. depends on ADVANCED_OPTIONS && FLATMEM && PPC_85xx
  1083. help
  1084. This gives the physical address where the kernel is loaded.
  1085. Say N here unless you know what you are doing.
  1086. config PHYSICAL_START
  1087. hex "Physical address where the kernel is loaded" if PHYSICAL_START_BOOL
  1088. default "0x02000000" if PPC_BOOK3S && CRASH_DUMP && !NONSTATIC_KERNEL
  1089. default "0x00000000"
  1090. config PHYSICAL_ALIGN
  1091. hex
  1092. default "0x04000000" if PPC_85xx
  1093. help
  1094. This value puts the alignment restrictions on physical address
  1095. where kernel is loaded and run from. Kernel is compiled for an
  1096. address which meets above alignment restriction.
  1097. config TASK_SIZE_BOOL
  1098. bool "Set custom user task size"
  1099. depends on ADVANCED_OPTIONS
  1100. help
  1101. This option allows you to set the amount of virtual address space
  1102. allocated to user tasks. This can be useful in optimizing the
  1103. virtual memory layout of the system.
  1104. Say N here unless you know what you are doing.
  1105. config TASK_SIZE
  1106. hex "Size of maximum user task space" if TASK_SIZE_BOOL
  1107. default "0x80000000" if PPC_8xx
  1108. default "0xc0000000"
  1109. config MODULES_SIZE_BOOL
  1110. bool "Set custom size for modules/execmem area"
  1111. depends on EXECMEM && ADVANCED_OPTIONS
  1112. help
  1113. This option allows you to set the size of kernel virtual address
  1114. space dedicated for modules/execmem.
  1115. For the time being it is only for 8xx and book3s/32. Other
  1116. platform share it with vmalloc space.
  1117. Say N here unless you know what you are doing.
  1118. config MODULES_SIZE
  1119. int "Size of modules/execmem area (In Mbytes)" if MODULES_SIZE_BOOL
  1120. range 1 256 if EXECMEM
  1121. default 64 if EXECMEM && PPC_BOOK3S_32
  1122. default 32 if EXECMEM && PPC_8xx
  1123. default 0
  1124. endmenu
  1125. config PPC64_PROC_SYSTEMCFG
  1126. def_bool y
  1127. depends on PPC64 && PROC_FS
  1128. help
  1129. This option enables the presence of /proc/ppc64/systemcfg through
  1130. which the systemcfg page can be accessed.
  1131. This interface only exists for backwards-compatibility.
  1132. if PPC64
  1133. # This value must have zeroes in the bottom 60 bits otherwise lots will break
  1134. config PAGE_OFFSET
  1135. hex
  1136. default "0xc000000000000000"
  1137. config KERNEL_START
  1138. hex
  1139. default "0xc000000000000000"
  1140. config PHYSICAL_START
  1141. hex
  1142. default "0x00000000"
  1143. endif
  1144. config PPC_LIB_RHEAP
  1145. bool
  1146. source "arch/powerpc/kvm/Kconfig"
  1147. source "kernel/livepatch/Kconfig"