blob: dea74d7717c0d4bd4aa9ee05f734f83c7907b6f2 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001# SPDX-License-Identifier: GPL-2.0
Arnd Bergmanna0ae9c72007-06-13 02:30:17 +10002source "arch/powerpc/platforms/Kconfig.cputype"
Johannes Berg17e638b2007-03-19 11:53:53 +01003
kerstin jonsson234a71a2010-10-22 00:17:55 +00004config 32BIT
5 bool
6 default y if PPC32
7
Paul Mackerras14cf11a2005-09-26 16:04:21 +10008config 64BIT
9 bool
10 default y if PPC64
11
Paul Mackerras14cf11a2005-09-26 16:04:21 +100012config MMU
13 bool
14 default y
15
Michael Ellerman9fea59b2017-04-21 00:36:20 +100016config ARCH_MMAP_RND_BITS_MAX
17 # On Book3S 64, the default virtual address space for 64-bit processes
18 # is 2^47 (128TB). As a maximum, allow randomisation to consume up to
19 # 32T of address space (2^45), which should ensure a reasonable gap
20 # between bottom-up and top-down allocations for applications that
21 # consume "normal" amounts of address space. Book3S 64 only supports 64K
22 # and 4K page sizes.
23 default 29 if PPC_BOOK3S_64 && PPC_64K_PAGES # 29 = 45 (32T) - 16 (64K)
24 default 33 if PPC_BOOK3S_64 # 33 = 45 (32T) - 12 (4K)
25 #
26 # On all other 64-bit platforms (currently only Book3E), the virtual
27 # address space is 2^46 (64TB). Allow randomisation to consume up to 16T
28 # of address space (2^44). Only 4K page sizes are supported.
29 default 32 if 64BIT # 32 = 44 (16T) - 12 (4K)
30 #
31 # For 32-bit, use the compat values, as they're the same.
32 default ARCH_MMAP_RND_COMPAT_BITS_MAX
33
34config ARCH_MMAP_RND_BITS_MIN
35 # Allow randomisation to consume up to 1GB of address space (2^30).
36 default 14 if 64BIT && PPC_64K_PAGES # 14 = 30 (1GB) - 16 (64K)
37 default 18 if 64BIT # 18 = 30 (1GB) - 12 (4K)
38 #
39 # For 32-bit, use the compat values, as they're the same.
40 default ARCH_MMAP_RND_COMPAT_BITS_MIN
41
42config ARCH_MMAP_RND_COMPAT_BITS_MAX
43 # Total virtual address space for 32-bit processes is 2^31 (2GB).
44 # Allow randomisation to consume up to 512MB of address space (2^29).
45 default 11 if PPC_256K_PAGES # 11 = 29 (512MB) - 18 (256K)
46 default 13 if PPC_64K_PAGES # 13 = 29 (512MB) - 16 (64K)
Enrico Weigelt, metux IT consult4f44e8a2019-07-03 18:04:13 +020047 default 15 if PPC_16K_PAGES # 15 = 29 (512MB) - 14 (16K)
Michael Ellerman9fea59b2017-04-21 00:36:20 +100048 default 17 # 17 = 29 (512MB) - 12 (4K)
49
50config ARCH_MMAP_RND_COMPAT_BITS_MIN
51 # Total virtual address space for 32-bit processes is 2^31 (2GB).
52 # Allow randomisation to consume up to 8MB of address space (2^23).
53 default 5 if PPC_256K_PAGES # 5 = 23 (8MB) - 18 (256K)
54 default 7 if PPC_64K_PAGES # 7 = 23 (8MB) - 16 (64K)
55 default 9 if PPC_16K_PAGES # 9 = 23 (8MB) - 14 (16K)
56 default 11 # 11 = 23 (8MB) - 12 (4K)
57
Tejun Heoc2a7e812009-08-14 15:00:53 +090058config HAVE_SETUP_PER_CPU_AREA
Tejun Heoe74e3962009-03-30 19:07:44 +090059 def_bool PPC64
60
Tejun Heoc2a7e812009-08-14 15:00:53 +090061config NEED_PER_CPU_EMBED_FIRST_CHUNK
Aneesh Kumar K.Veb553f12020-06-08 12:39:02 +053062 def_bool y if PPC64
63
64config NEED_PER_CPU_PAGE_FIRST_CHUNK
65 def_bool y if PPC64
travis@sgi.comb32ef632008-01-30 13:32:51 +010066
Michael Ellerman551b81f2009-10-13 19:44:44 +000067config NR_IRQS
68 int "Number of virtual interrupt numbers"
Cédric Le Goater7b3b3de2020-12-10 18:14:44 +010069 range 32 1048576
Michael Ellerman551b81f2009-10-13 19:44:44 +000070 default "512"
71 help
72 This defines the number of virtual interrupt numbers the kernel
73 can manage. Virtual interrupt numbers are what you see in
74 /proc/interrupts. If you configure your system to have too few,
75 drivers will fail to load or worse - handle with care.
76
Nicholas Pigginddd703c2016-12-20 04:30:08 +100077config NMI_IPI
78 bool
Nicholas Piggin21041802017-07-12 14:35:52 -070079 depends on SMP && (DEBUGGER || KEXEC_CORE || HARDLOCKUP_DETECTOR)
Nicholas Pigginddd703c2016-12-20 04:30:08 +100080 default y
81
Nicholas Piggin75eb7672017-08-01 22:00:52 +100082config PPC_WATCHDOG
83 bool
84 depends on HARDLOCKUP_DETECTOR
85 depends on HAVE_HARDLOCKUP_DETECTOR_ARCH
86 default y
87 help
88 This is a placeholder when the powerpc hardlockup detector
89 watchdog is selected (arch/powerpc/kernel/watchdog.c). It is
Colin Ian Kingf8a4b272020-12-07 15:54:20 +000090 selected via the generic lockup detector menu which is why we
Nicholas Piggin75eb7672017-08-01 22:00:52 +100091 have no standalone config option for it here.
92
Christoph Hellwigfd3e0bb2008-04-17 14:35:00 +100093config STACKTRACE_SUPPORT
94 bool
95 default y
96
Benjamin Herrenschmidt945feb12008-04-17 14:35:01 +100097config LOCKDEP_SUPPORT
98 bool
99 default y
100
Nick Piggin95c354f2008-01-30 13:31:20 +0100101config GENERIC_LOCKBREAK
102 bool
103 default y
Thomas Gleixnerfdc5569e2019-10-24 18:04:58 +0200104 depends on SMP && PREEMPTION
Nick Piggin95c354f2008-01-30 13:31:20 +0100105
Akinobu Mitae779b2f2006-03-26 01:39:33 -0800106config GENERIC_HWEIGHT
107 bool
108 default y
109
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000110config PPC
111 bool
112 default y
Michael Ellermana7d24752017-03-06 22:53:59 +1100113 #
114 # Please keep this list sorted alphabetically.
115 #
Yury Norov942fa982018-05-16 11:18:49 +0300116 select ARCH_32BIT_OFF_T if PPC32
Anshuman Khandual91024b32021-05-04 18:38:17 -0700117 select ARCH_ENABLE_MEMORY_HOTPLUG
118 select ARCH_ENABLE_MEMORY_HOTREMOVE
Christophe Leroyc6b05f42021-04-21 17:06:42 +0000119 select ARCH_HAS_COPY_MC if PPC64
Christophe Leroy6bf752d2018-12-19 07:09:39 +0000120 select ARCH_HAS_DEBUG_VIRTUAL
Aneesh Kumar K.V937c49d2021-03-18 09:18:55 +0530121 select ARCH_HAS_DEBUG_VM_PGTABLE
Christophe Leroye0847282021-07-08 16:49:43 +0000122 select ARCH_HAS_DEBUG_WX if STRICT_KERNEL_RWX
Michael Ellermana7d24752017-03-06 22:53:59 +1100123 select ARCH_HAS_DEVMEM_IS_ALLOWED
Christophe Leroyc6b05f42021-04-21 17:06:42 +0000124 select ARCH_HAS_DMA_MAP_DIRECT if PPC_PSERIES
Michael Ellermana7d24752017-03-06 22:53:59 +1100125 select ARCH_HAS_ELF_RANDOMIZE
Daniel Micay6974f0c2017-07-12 14:36:10 -0700126 select ARCH_HAS_FORTIFY_SOURCE
Michael Ellermana7d24752017-03-06 22:53:59 +1100127 select ARCH_HAS_GCOV_PROFILE_ALL
Christoph Hellwigcbd34da2019-07-11 20:57:28 -0700128 select ARCH_HAS_HUGEPD if HUGETLB_PAGE
Christophe Leroyc6b05f42021-04-21 17:06:42 +0000129 select ARCH_HAS_KCOV
Mathieu Desnoyers3ccfebe2018-01-29 15:20:11 -0500130 select ARCH_HAS_MEMBARRIER_CALLBACKS
Nicholas Piggin2384b362020-07-16 11:35:22 +1000131 select ARCH_HAS_MEMBARRIER_SYNC_CORE
Christophe Leroyc6b05f42021-04-21 17:06:42 +0000132 select ARCH_HAS_MEMREMAP_COMPAT_ALIGN
133 select ARCH_HAS_MMIOWB if PPC64
134 select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
135 select ARCH_HAS_PHYS_TO_DMA
136 select ARCH_HAS_PMEM_API
137 select ARCH_HAS_PTE_DEVMAP if PPC_BOOK3S_64
138 select ARCH_HAS_PTE_SPECIAL
Christophe Leroyb4645ff2019-08-22 16:44:05 +0000139 select ARCH_HAS_SCALED_CPUTIME if VIRT_CPU_ACCOUNTING_NATIVE && PPC_BOOK3S_64
Russell Currey1f9ad212021-06-09 11:34:23 +1000140 select ARCH_HAS_SET_MEMORY
Christophe Leroy68b44f92021-10-15 12:02:42 +0200141 select ARCH_HAS_STRICT_KERNEL_RWX if (PPC_BOOK3S || PPC_8xx || 40x) && !HIBERNATION
Christophe Leroy49e3d8e2021-10-15 12:02:49 +0200142 select ARCH_HAS_STRICT_KERNEL_RWX if FSL_BOOKE && !HIBERNATION && !RANDOMIZE_BASE
Russell Curreyc35717c2021-06-09 11:34:29 +1000143 select ARCH_HAS_STRICT_MODULE_RWX if ARCH_HAS_STRICT_KERNEL_RWX && !PPC_BOOK3S_32
Michael Ellermana7d24752017-03-06 22:53:59 +1100144 select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
Christophe Leroy461cef22019-07-31 06:31:41 +0000145 select ARCH_HAS_UACCESS_FLUSHCACHE
Michael Ellermana7d24752017-03-06 22:53:59 +1100146 select ARCH_HAS_UBSAN_SANITIZE_ALL
147 select ARCH_HAVE_NMI_SAFE_CMPXCHG
Mike Rapoport350e88b2019-05-13 17:22:59 -0700148 select ARCH_KEEP_MEMBLOCK
Mark Salterb7e7c372013-10-07 22:15:32 -0400149 select ARCH_MIGHT_HAVE_PC_PARPORT
Mark Salterc74e6d32014-01-01 11:32:26 -0800150 select ARCH_MIGHT_HAVE_PC_SERIO
Christophe Leroy4ec591e2018-01-04 16:35:25 +0100151 select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX
Christophe Leroyfdacae82021-09-24 19:13:53 +0200152 select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT
Christophe Leroya1cdef02021-03-16 07:57:15 +0000153 select ARCH_STACKWALK
Michael Ellermana7d24752017-03-06 22:53:59 +1100154 select ARCH_SUPPORTS_ATOMIC_RMW
Christophe Leroy68b44f92021-10-15 12:02:42 +0200155 select ARCH_SUPPORTS_DEBUG_PAGEALLOC if PPC_BOOK3S || PPC_8xx || 40x
Michael Ellermana7d24752017-03-06 22:53:59 +1100156 select ARCH_USE_BUILTIN_BSWAP
157 select ARCH_USE_CMPXCHG_LOCKREF if PPC64
Anshuman Khandualdce44562021-04-29 22:55:15 -0700158 select ARCH_USE_MEMTEST
Nicholas Pigginaa65ff62020-07-24 23:14:20 +1000159 select ARCH_USE_QUEUED_RWLOCKS if PPC_QUEUED_SPINLOCKS
160 select ARCH_USE_QUEUED_SPINLOCKS if PPC_QUEUED_SPINLOCKS
Michael Ellermana7d24752017-03-06 22:53:59 +1100161 select ARCH_WANT_IPC_PARSE_VERSION
Nicholas Piggin66acd462020-09-14 14:52:17 +1000162 select ARCH_WANT_IRQS_OFF_ACTIVATE_MM
Nathan Chancellor59612b22020-11-19 13:46:56 -0700163 select ARCH_WANT_LD_ORPHAN_WARN
Paul E. McKenney77e58492017-01-14 13:32:50 -0800164 select ARCH_WEAK_RELEASE_ACQUIRE
Stephen Rothwelld812c0e12013-03-06 18:11:51 +0000165 select BINFMT_ELF
Shile Zhang10916702019-12-04 08:46:31 +0800166 select BUILDTIME_TABLE_SORT
Michael Ellermana7d24752017-03-06 22:53:59 +1100167 select CLONE_BACKWARDS
168 select DCACHE_WORD_ACCESS if PPC64 && CPU_LITTLE_ENDIAN
Christoph Hellwigf1565c22020-07-08 12:22:47 +0200169 select DMA_OPS_BYPASS if PPC64
Christophe Leroyc6b05f42021-04-21 17:06:42 +0000170 select DMA_OPS if PPC64
Michael Ellerman0c0c52302018-03-27 15:29:06 +1100171 select DYNAMIC_FTRACE if FUNCTION_TRACER
Michael Ellermana7d24752017-03-06 22:53:59 +1100172 select EDAC_ATOMIC_SCRUB
173 select EDAC_SUPPORT
174 select GENERIC_ATOMIC64 if PPC32
Michael Ellermana7d24752017-03-06 22:53:59 +1100175 select GENERIC_CLOCKEVENTS_BROADCAST if SMP
176 select GENERIC_CMOS_UPDATE
177 select GENERIC_CPU_AUTOPROBE
Michael Ellerman179ab1c2018-07-28 09:06:34 +1000178 select GENERIC_CPU_VULNERABILITIES if PPC_BARRIER_NOSPEC
Christophe Leroy265c3492019-09-12 13:49:43 +0000179 select GENERIC_EARLY_IOREMAP
Christophe Leroy74205b32021-03-31 16:48:47 +0000180 select GENERIC_GETTIMEOFDAY
Michael Ellermana7d24752017-03-06 22:53:59 +1100181 select GENERIC_IRQ_SHOW
182 select GENERIC_IRQ_SHOW_LEVEL
Christoph Hellwigeb01d422018-11-15 20:05:32 +0100183 select GENERIC_PCI_IOMAP if PCI
Christophe Leroye0847282021-07-08 16:49:43 +0000184 select GENERIC_PTDUMP
Michael Ellermana7d24752017-03-06 22:53:59 +1100185 select GENERIC_SMP_IDLE_THREAD
Paul Mackerrasd4cfb112017-05-27 18:04:52 +1000186 select GENERIC_TIME_VSYSCALL
Christophe Leroy74205b32021-03-31 16:48:47 +0000187 select GENERIC_VDSO_TIME_NS
Michael Ellermana7d24752017-03-06 22:53:59 +1100188 select HAVE_ARCH_AUDITSYSCALL
Nicholas Piggin8abddd92021-05-03 19:17:55 +1000189 select HAVE_ARCH_HUGE_VMALLOC if HAVE_ARCH_HUGE_VMAP
Christophe Leroya6a8f7c2021-06-30 18:48:12 -0700190 select HAVE_ARCH_HUGE_VMAP if PPC_RADIX_MMU || PPC_8xx
Michael Ellermana7d24752017-03-06 22:53:59 +1100191 select HAVE_ARCH_JUMP_LABEL
Christophe Leroyb0b3b2c72021-03-23 15:47:59 +0000192 select HAVE_ARCH_JUMP_LABEL_RELATIVE
Christophe Leroy888468c2020-05-28 10:17:04 +0000193 select HAVE_ARCH_KASAN if PPC32 && PPC_PAGE_SHIFT <= 14
194 select HAVE_ARCH_KASAN_VMALLOC if PPC32 && PPC_PAGE_SHIFT <= 14
Christophe Leroy68b44f92021-10-15 12:02:42 +0200195 select HAVE_ARCH_KFENCE if PPC_BOOK3S_32 || PPC_8xx || 40x
Christophe Leroyc6b05f42021-04-21 17:06:42 +0000196 select HAVE_ARCH_KGDB
Michael Ellerman9fea59b2017-04-21 00:36:20 +1000197 select HAVE_ARCH_MMAP_RND_BITS
198 select HAVE_ARCH_MMAP_RND_COMPAT_BITS if COMPAT
Finn Thain20e07af2019-01-15 15:18:56 +1100199 select HAVE_ARCH_NVRAM_OPS
Michael Ellermana7d24752017-03-06 22:53:59 +1100200 select HAVE_ARCH_SECCOMP_FILTER
201 select HAVE_ARCH_TRACEHOOK
Masahiro Yamada2ff2b7e2019-08-19 14:54:20 +0900202 select HAVE_ASM_MODVERSIONS
Michael Ellermana7d24752017-03-06 22:53:59 +1100203 select HAVE_CONTEXT_TRACKING if PPC64
Christophe Leroyc6b05f42021-04-21 17:06:42 +0000204 select HAVE_C_RECORDMCOUNT
Michael Ellermana7d24752017-03-06 22:53:59 +1100205 select HAVE_DEBUG_KMEMLEAK
206 select HAVE_DEBUG_STACKOVERFLOW
Michael Ellermana7d24752017-03-06 22:53:59 +1100207 select HAVE_DYNAMIC_FTRACE
208 select HAVE_DYNAMIC_FTRACE_WITH_REGS if MPROFILE_KERNEL
Christophe Leroy51c66ad2021-03-22 16:37:52 +0000209 select HAVE_EBPF_JIT
Michael Ellermana7d24752017-03-06 22:53:59 +1100210 select HAVE_EFFICIENT_UNALIGNED_ACCESS if !(CPU_LITTLE_ENDIAN && POWER7_CPU)
Christoph Hellwig67a929e2019-07-11 20:57:14 -0700211 select HAVE_FAST_GUP
Michael Ellermana7d24752017-03-06 22:53:59 +1100212 select HAVE_FTRACE_MCOUNT_RECORD
Naveen N. Rao7cd01b02018-06-07 15:22:02 +0530213 select HAVE_FUNCTION_ERROR_INJECTION
Michael Ellermana7d24752017-03-06 22:53:59 +1100214 select HAVE_FUNCTION_GRAPH_TRACER
215 select HAVE_FUNCTION_TRACER
Masahiro Yamada8034c2f2018-05-28 18:22:05 +0900216 select HAVE_GCC_PLUGINS if GCC_VERSION >= 50200 # plugin support on gcc <= 5.1 is buggy on PPC
Christophe Leroyab037dd2020-11-27 00:10:05 +1100217 select HAVE_GENERIC_VDSO
Christophe Leroyc6b05f42021-04-21 17:06:42 +0000218 select HAVE_HARDLOCKUP_DETECTOR_ARCH if PPC_BOOK3S_64 && SMP
219 select HAVE_HARDLOCKUP_DETECTOR_PERF if PERF_EVENTS && HAVE_PERF_EVENTS_NMI && !HAVE_HARDLOCKUP_DETECTOR_ARCH
Michael Ellermana7d24752017-03-06 22:53:59 +1100220 select HAVE_HW_BREAKPOINT if PERF_EVENTS && (PPC_BOOK3S || PPC_8xx)
Michael Ellermana7d24752017-03-06 22:53:59 +1100221 select HAVE_IOREMAP_PROT
222 select HAVE_IRQ_EXIT_ON_IRQ_STACK
Christophe Leroyc6b05f42021-04-21 17:06:42 +0000223 select HAVE_IRQ_TIME_ACCOUNTING
Michael Ellermana7d24752017-03-06 22:53:59 +1100224 select HAVE_KERNEL_GZIP
Christophe Leroy1cc9a212019-06-14 10:16:24 +0000225 select HAVE_KERNEL_LZMA if DEFAULT_UIMAGE
Christophe Leroy264bffa2019-06-14 10:16:25 +0000226 select HAVE_KERNEL_LZO if DEFAULT_UIMAGE
Christian Lamparter423bfc62019-01-31 21:59:04 +0100227 select HAVE_KERNEL_XZ if PPC_BOOK3S || 44x
Michael Ellermana7d24752017-03-06 22:53:59 +1100228 select HAVE_KPROBES
Naveen N. Raoead514d2017-04-19 18:22:26 +0530229 select HAVE_KPROBES_ON_FTRACE
Michael Ellermana7d24752017-03-06 22:53:59 +1100230 select HAVE_KRETPROBES
Nicholas Piggin4c1d9bb2018-05-09 23:00:01 +1000231 select HAVE_LD_DEAD_CODE_DATA_ELIMINATION
Michael Ellermana7d24752017-03-06 22:53:59 +1100232 select HAVE_LIVEPATCH if HAVE_DYNAMIC_FTRACE_WITH_REGS
Michael Ellermana7d24752017-03-06 22:53:59 +1100233 select HAVE_MOD_ARCH_SPECIFIC
Nicholas Piggin21041802017-07-12 14:35:52 -0700234 select HAVE_NMI if PERF_EVENTS || (PPC64 && PPC_BOOK3S)
Christophe Leroyeacf4c02021-04-20 14:02:07 +0000235 select HAVE_OPTPROBES
Michael Ellermana7d24752017-03-06 22:53:59 +1100236 select HAVE_PERF_EVENTS
237 select HAVE_PERF_EVENTS_NMI if PPC64
238 select HAVE_PERF_REGS
239 select HAVE_PERF_USER_STACK_DUMP
Michael Ellermana7d24752017-03-06 22:53:59 +1100240 select HAVE_REGS_AND_STACK_ACCESS_API
Christophe Leroyaccdd092021-03-16 07:57:13 +0000241 select HAVE_RELIABLE_STACKTRACE
Christophe Leroyc6b05f42021-04-21 17:06:42 +0000242 select HAVE_RSEQ
Thomas Gleixnercd1a41c2021-02-10 00:40:52 +0100243 select HAVE_SOFTIRQ_ON_OWN_STACK
Christophe Leroyc6b05f42021-04-21 17:06:42 +0000244 select HAVE_STACKPROTECTOR if PPC32 && $(cc-option,-mstack-protector-guard=tls -mstack-protector-guard-reg=r2)
245 select HAVE_STACKPROTECTOR if PPC64 && $(cc-option,-mstack-protector-guard=tls -mstack-protector-guard-reg=r13)
Christophe Leroy5c810ce2021-09-01 08:30:21 +0000246 select HAVE_STATIC_CALL if PPC32
Michael Ellermana7d24752017-03-06 22:53:59 +1100247 select HAVE_SYSCALL_TRACEPOINTS
248 select HAVE_VIRT_CPU_ACCOUNTING
Michael Ellermanf96271c2021-05-08 21:12:55 +1000249 select HUGETLB_PAGE_SIZE_VARIABLE if PPC_BOOK3S_64 && HUGETLB_PAGE
Christoph Hellwiga4ce5a42018-04-03 15:47:59 +0200250 select IOMMU_HELPER if PPC64
Michael Ellermana7d24752017-03-06 22:53:59 +1100251 select IRQ_DOMAIN
252 select IRQ_FORCED_THREADING
Christophe Leroyc6b05f42021-04-21 17:06:42 +0000253 select MMU_GATHER_PAGE_SIZE
254 select MMU_GATHER_RCU_TABLE_FREE
Michael Ellermana7d24752017-03-06 22:53:59 +1100255 select MODULES_USE_ELF_RELA
Christoph Hellwig06832fc2018-07-30 09:37:21 +0200256 select NEED_DMA_MAP_STATE if PPC64 || NOT_COHERENT_CACHE
Christoph Hellwig86596f02018-04-05 09:44:52 +0200257 select NEED_SG_DMA_LENGTH
Stephen Rothwell10f85f42010-06-29 12:43:34 +1000258 select OF
Michael Ellermandabf6b32020-01-26 22:52:47 +1100259 select OF_DMA_DEFAULT_COHERENT if !NOT_COHERENT_CACHE
Stephen Neuendorffere6ce1322010-11-18 15:54:56 -0800260 select OF_EARLY_FLATTREE
Michael Ellermana7d24752017-03-06 22:53:59 +1100261 select OLD_SIGACTION if PPC32
Al Viro0980cae2012-12-25 16:23:09 -0500262 select OLD_SIGSUSPEND
Christoph Hellwig2eac9c22018-11-15 20:05:33 +0100263 select PCI_DOMAINS if PCI
Thomas Gleixner981aa1d2020-09-28 12:13:07 +0200264 select PCI_MSI_ARCH_FALLBACKS if PCI_MSI
Christoph Hellwig20f1b792018-11-15 20:05:34 +0100265 select PCI_SYSCALL if PCI
Michael Neulinga278e7e2019-06-04 13:00:37 +1000266 select PPC_DAWR if PPC64
Arnd Bergmann6e8cef32018-04-23 10:36:38 +0200267 select RTC_LIB
Michael Ellermana7d24752017-03-06 22:53:59 +1100268 select SPARSE_IRQ
Russell Curreyc35717c2021-06-09 11:34:29 +1000269 select STRICT_KERNEL_RWX if STRICT_MODULE_RWX
Michael Ellermana7d24752017-03-06 22:53:59 +1100270 select SYSCTL_EXCEPTION_TRACE
Christophe Leroyed1cd6d2019-01-31 10:08:58 +0000271 select THREAD_INFO_IN_TASK
Masahiro Yamada4aae6832021-07-31 14:22:32 +0900272 select TRACE_IRQFLAGS_SUPPORT
Michael Ellermana7d24752017-03-06 22:53:59 +1100273 select VIRT_TO_BUS if !PPC64
274 #
275 # Please keep this list sorted alphabetically.
276 #
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000277
Michael Ellerman179ab1c2018-07-28 09:06:34 +1000278config PPC_BARRIER_NOSPEC
Enrico Weigelt, metux IT consult4f44e8a2019-07-03 18:04:13 +0200279 bool
280 default y
281 depends on PPC_BOOK3S_64 || PPC_FSL_BOOK3E
Michael Ellerman179ab1c2018-07-28 09:06:34 +1000282
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000283config EARLY_PRINTK
284 bool
Benjamin Herrenschmidt51d30822005-11-23 17:57:25 +1100285 default y
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000286
Jason Baronb71d47c2013-11-25 23:23:11 +0000287config PANIC_TIMEOUT
288 int
289 default 180
290
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000291config COMPAT
Michal Suchanek6e944ae2020-03-20 11:20:17 +0100292 bool "Enable support for 32bit binaries"
293 depends on PPC64
Nick Desaulniers6fcb5742021-05-18 13:58:57 -0700294 depends on !CC_IS_CLANG || CLANG_VERSION >= 120000
Michal Suchanek6e944ae2020-03-20 11:20:17 +0100295 default y if !CPU_LITTLE_ENDIAN
Chris Metcalf48b25c42012-03-15 13:13:38 -0400296 select ARCH_WANT_OLD_COMPAT_IPC
Al Viro09a4d5d2012-12-25 19:27:42 -0500297 select COMPAT_OLD_SIGACTION
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000298
299config SYSVIPC_COMPAT
300 bool
301 depends on COMPAT && SYSVIPC
302 default y
303
Ingo Molnarae1e9132008-11-11 09:05:16 +0100304config SCHED_OMIT_FRAME_POINTER
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000305 bool
306 default y
307
308config ARCH_MAY_HAVE_PC_FDC
309 bool
Pranith Kumar3484a312014-08-18 17:13:41 -0400310 default PCI
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000311
Kumar Gala08264cb2006-01-10 21:43:56 -0600312config PPC_UDBG_16550
313 bool
Kumar Gala08264cb2006-01-10 21:43:56 -0600314
Kumar Gala08264cb2006-01-10 21:43:56 -0600315config GENERIC_TBSYNC
316 bool
317 default y if PPC32 && SMP
Kumar Gala08264cb2006-01-10 21:43:56 -0600318
Michael Ellermanb7472e12021-10-27 22:29:31 +1100319config AUDIT_ARCH
320 bool
321 default y
322
Jeremy Fitzhardinge73c9cea2006-12-08 03:30:41 -0800323config GENERIC_BUG
324 bool
325 default y
326 depends on BUG
327
Jordan Niethe1baa1f72020-12-01 11:52:03 +1100328config GENERIC_BUG_RELATIVE_POINTERS
329 def_bool y
330 depends on GENERIC_BUG
331
Johannes Bergb3028872007-03-20 05:18:02 +1100332config SYS_SUPPORTS_APM_EMULATION
Kumar Gala58da10b2007-05-23 09:51:46 -0500333 default y if PMAC_APM_EMU
Johannes Bergb3028872007-03-20 05:18:02 +1100334 bool
335
David Gibson6c5b59b2011-04-14 18:29:16 +0000336config EPAPR_BOOT
337 bool
338 help
339 Used to allow a board to specify it wants an ePAPR compliant wrapper.
David Gibson6c5b59b2011-04-14 18:29:16 +0000340
Kumar Galaf4fc4a52006-01-16 10:53:22 -0600341config DEFAULT_UIMAGE
342 bool
343 help
344 Used to allow a board to specify it wants a uImage built by default
Kumar Galaf4fc4a52006-01-16 10:53:22 -0600345
Johannes Berg801e4062007-12-08 02:12:39 +0100346config ARCH_HIBERNATION_POSSIBLE
347 bool
Johannes Berg543b9fd2007-05-03 22:31:38 +1000348 default y
349
Johannes Bergf4cb5702007-12-08 02:14:00 +0100350config ARCH_SUSPEND_POSSIBLE
351 def_bool y
Anton Vorontsov4ffd6952009-09-16 01:43:57 +0400352 depends on ADB_PMU || PPC_EFIKA || PPC_LITE5200 || PPC_83xx || \
Zhao Chenhuid0832a72012-07-20 20:42:36 +0800353 (PPC_85xx && !PPC_E500MC) || PPC_86xx || PPC_PSERIES \
354 || 44x || 40x
Johannes Bergf4cb5702007-12-08 02:14:00 +0100355
Nicholas Piggin9ca12ac2019-04-11 13:34:46 +1000356config ARCH_SUSPEND_NONZERO_CPU
357 def_bool y
358 depends on PPC_POWERNV || PPC_PSERIES
359
Benjamin Herrenschmidt4c75a6f2006-11-11 17:24:53 +1100360config PPC_DCR_NATIVE
361 bool
Benjamin Herrenschmidt4c75a6f2006-11-11 17:24:53 +1100362
363config PPC_DCR_MMIO
364 bool
Benjamin Herrenschmidt4c75a6f2006-11-11 17:24:53 +1100365
366config PPC_DCR
367 bool
368 depends on PPC_DCR_NATIVE || PPC_DCR_MMIO
369 default y
370
Benjamin Herrenschmidt4c9d2802006-11-11 17:25:08 +1100371config PPC_OF_PLATFORM_PCI
372 bool
Stephen Rothwell373a6da2007-12-21 15:37:07 +1100373 depends on PCI
Benjamin Herrenschmidt4c9d2802006-11-11 17:25:08 +1100374 depends on PPC64 # not supported on 32 bits yet
Benjamin Herrenschmidt4c9d2802006-11-11 17:25:08 +1100375
Ananth N Mavinakayanahalli8b7b80b2012-08-23 21:31:32 +0000376config ARCH_SUPPORTS_UPROBES
377 def_bool y
378
Dave Kleikamp172ae2e2010-02-08 11:50:57 +0000379config PPC_ADV_DEBUG_REGS
380 bool
381 depends on 40x || BOOKE
382 default y
383
384config PPC_ADV_DEBUG_IACS
385 int
386 depends on PPC_ADV_DEBUG_REGS
387 default 4 if 44x
388 default 2
389
390config PPC_ADV_DEBUG_DACS
391 int
392 depends on PPC_ADV_DEBUG_REGS
393 default 2
394
395config PPC_ADV_DEBUG_DVCS
396 int
397 depends on PPC_ADV_DEBUG_REGS
398 default 2 if 44x
399 default 0
400
401config PPC_ADV_DEBUG_DAC_RANGE
402 bool
403 depends on PPC_ADV_DEBUG_REGS && 44x
404 default y
405
Michael Neulinga278e7e2019-06-04 13:00:37 +1000406config PPC_DAWR
407 bool
408
Kirill A. Shutemov06ef42a2015-04-14 15:45:57 -0700409config PGTABLE_LEVELS
410 int
411 default 2 if !PPC64
Kirill A. Shutemov06ef42a2015-04-14 15:45:57 -0700412 default 4
413
Benjamin Herrenschmidta2d2e1e2007-12-21 15:39:24 +1100414source "arch/powerpc/sysdev/Kconfig"
Kumar Gala4330f5d2007-03-16 09:32:17 -0500415source "arch/powerpc/platforms/Kconfig"
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000416
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000417menu "Kernel options"
418
419config HIGHMEM
420 bool "High memory support"
421 depends on PPC32
Thomas Gleixner47da42b2020-11-03 10:27:27 +0100422 select KMAP_LOCAL
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000423
Masahiro Yamada8636a1f2018-12-11 20:01:04 +0900424source "kernel/Kconfig.hz"
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000425
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000426config MATH_EMULATION
427 bool "Math emulation"
Paul Mackerras53d143fe2021-06-18 13:43:41 +1000428 depends on 4xx || PPC_8xx || PPC_MPC832x || BOOKE || PPC_MICROWATT
Christophe Leroyb6254ce2020-08-18 17:19:17 +0000429 select PPC_FPU_REGS
Enrico Weigelt, metux IT consult4f44e8a2019-07-03 18:04:13 +0200430 help
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000431 Some PowerPC chips designed for embedded applications do not have
432 a floating-point unit and therefore do not implement the
433 floating-point instructions in the PowerPC instruction set. If you
434 say Y here, the kernel will include code to emulate a floating-point
435 unit, which will allow programs that use floating-point
436 instructions to run.
437
Benjamin Herrenschmidt4e63f8e2013-06-09 17:01:24 +1000438 This is also useful to emulate missing (optional) instructions
439 such as fsqrt on cores that do have an FPU but do not implement
440 them (such as Freescale BookE).
441
Kevin Haoe05c0e82013-07-16 19:57:15 +0800442choice
443 prompt "Math emulation options"
444 default MATH_EMULATION_FULL
445 depends on MATH_EMULATION
446
447config MATH_EMULATION_FULL
448 bool "Emulate all the floating point instructions"
Enrico Weigelt, metux IT consult4f44e8a2019-07-03 18:04:13 +0200449 help
Kevin Haoe05c0e82013-07-16 19:57:15 +0800450 Select this option will enable the kernel to support to emulate
451 all the floating point instructions. If your SoC doesn't have
452 a FPU, you should select this.
453
454config MATH_EMULATION_HW_UNIMPLEMENTED
455 bool "Just emulate the FPU unimplemented instructions"
Enrico Weigelt, metux IT consult4f44e8a2019-07-03 18:04:13 +0200456 help
Kevin Haoe05c0e82013-07-16 19:57:15 +0800457 Select this if you know there does have a hardware FPU on your
458 SoC, but some floating point instructions are not implemented by that.
459
460endchoice
461
Michael Neuling3d72bbc2013-02-13 16:21:43 +0000462config PPC_TRANSACTIONAL_MEM
Enrico Weigelt, metux IT consult4f44e8a2019-07-03 18:04:13 +0200463 bool "Transactional Memory support for POWERPC"
464 depends on PPC_BOOK3S_64
465 depends on SMP
466 select ALTIVEC
467 select VSX
468 help
469 Support user-mode Transactional Memory on POWERPC.
Michael Neuling3d72bbc2013-02-13 16:21:43 +0000470
Anshuman Khandual013a53f2019-11-25 08:36:31 +0530471config PPC_UV
472 bool "Ultravisor support"
473 depends on KVM_BOOK3S_HV_POSSIBLE
Bharata B Raoa2db55d2020-01-09 14:50:47 +0530474 depends on DEVICE_PRIVATE
Anshuman Khandual013a53f2019-11-25 08:36:31 +0530475 default n
476 help
477 This option paravirtualizes the kernel to run in POWER platforms that
478 supports the Protected Execution Facility (PEF). On such platforms,
479 the ultravisor firmware runs at a privilege level above the
480 hypervisor.
481
482 If unsure, say "N".
483
Nicholas Piggin951eede2017-05-29 17:39:40 +1000484config LD_HEAD_STUB_CATCH
485 bool "Reserve 256 bytes to cope with linker stubs in HEAD text" if EXPERT
486 depends on PPC64
Nicholas Piggin951eede2017-05-29 17:39:40 +1000487 help
488 Very large kernels can cause linker branch stubs to be generated by
489 code in head_64.S, which moves the head text sections out of their
490 specified location. This option can work around the problem.
491
492 If unsure, say "N".
493
Torsten Duwe8c50b722016-03-03 15:27:00 +1100494config MPROFILE_KERNEL
Naveen N. Rao57b3ed92020-04-22 14:56:12 +0530495 depends on PPC64 && CPU_LITTLE_ENDIAN && FUNCTION_TRACER
Nicholas Pigginabba7592018-05-30 22:19:22 +1000496 def_bool $(success,$(srctree)/arch/powerpc/tools/gcc-check-mprofile-kernel.sh $(CC) -I$(srctree)/include -D__KERNEL__)
Torsten Duwe8c50b722016-03-03 15:27:00 +1100497
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000498config HOTPLUG_CPU
499 bool "Support for enabling/disabling CPUs"
Stephen Rothwell40b31362013-05-21 13:49:35 +1000500 depends on SMP && (PPC_PSERIES || \
Randy Dunlap76be4412020-01-28 18:22:25 -0800501 PPC_PMAC || PPC_POWERNV || FSL_SOC_BOOKE)
Enrico Weigelt, metux IT consult4f44e8a2019-07-03 18:04:13 +0200502 help
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000503 Say Y here to be able to disable and re-enable individual
504 CPUs at runtime on SMP machines.
505
506 Say N if you are unsure.
507
Nicholas Pigginaa65ff62020-07-24 23:14:20 +1000508config PPC_QUEUED_SPINLOCKS
Nicholas Pigginc9f34012021-01-18 22:34:51 +1000509 bool "Queued spinlocks" if EXPERT
Nicholas Pigginaa65ff62020-07-24 23:14:20 +1000510 depends on SMP
Nicholas Pigginc9f34012021-01-18 22:34:51 +1000511 default PPC_BOOK3S_64
Nicholas Pigginaa65ff62020-07-24 23:14:20 +1000512 help
513 Say Y here to use queued spinlocks which give better scalability and
514 fairness on large SMP and NUMA systems without harming single threaded
515 performance.
516
Nathan Fontenot12633e82009-11-25 17:23:25 +0000517config ARCH_CPU_PROBE_RELEASE
518 def_bool y
519 depends on HOTPLUG_CPU
520
Mahesh Salgaonkarf2296a32013-11-15 09:50:50 +0530521config PPC64_SUPPORTS_MEMORY_FAILURE
522 bool "Add support for memory hwpoison"
523 depends on PPC_BOOK3S_64
524 default "y" if PPC_POWERNV
525 select ARCH_SUPPORTS_MEMORY_FAILURE
526
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000527config KEXEC
Kees Cook642e56f2013-01-16 18:53:25 -0800528 bool "kexec system call"
Tiejun Chen96eea642015-10-06 22:48:22 -0500529 depends on (PPC_BOOK3S || FSL_BOOKE || (44x && !SMP)) || PPC_BOOK3E
Dave Young2965faa2015-09-09 15:38:55 -0700530 select KEXEC_CORE
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000531 help
532 kexec is a system call that implements the ability to shutdown your
533 current kernel, and to start another kernel. It is like a reboot
Matt LaPlante1f1332f2006-06-29 01:32:47 -0400534 but it is independent of the system firmware. And like a reboot
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000535 you can start any kernel with it, not just Linux.
536
Matt LaPlante1f1332f2006-06-29 01:32:47 -0400537 The name comes from the similarity to the exec system call.
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000538
539 It is an ongoing process to be certain the hardware in a machine
540 is properly shutdown, so do not be surprised if this code does not
Geert Uytterhoevenbf220692013-08-20 21:38:03 +0200541 initially work for you. As of this writing the exact hardware
542 interface is strongly in flux, so no good recommendation can be
543 made.
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000544
Thiago Jung Bauermann80f60e52016-11-29 23:45:53 +1100545config KEXEC_FILE
546 bool "kexec file based system call"
547 select KEXEC_CORE
Lakshmi Ramasubramanian39652742021-02-21 09:49:26 -0800548 select HAVE_IMA_KEXEC if IMA
Thiago Jung Bauermann80f60e52016-11-29 23:45:53 +1100549 select BUILD_BIN2C
Sven Schnelle175fca32019-08-23 21:49:13 +0200550 select KEXEC_ELF
Thiago Jung Bauermann80f60e52016-11-29 23:45:53 +1100551 depends on PPC64
552 depends on CRYPTO=y
553 depends on CRYPTO_SHA256=y
554 help
555 This is a new version of the kexec system call. This call is
556 file based and takes in file descriptors as system call arguments
557 for kernel and initramfs as opposed to a list of segments as is the
558 case for the older kexec call.
559
AKASHI Takahirob799a092018-04-13 15:35:45 -0700560config ARCH_HAS_KEXEC_PURGATORY
561 def_bool KEXEC_FILE
562
Kevin Hao4c91bd62016-07-13 09:14:39 +0800563config RELOCATABLE
564 bool "Build a relocatable kernel"
Nicholas Piggin084a2752016-10-19 14:16:00 +1100565 depends on PPC64 || (FLATMEM && (44x || FSL_BOOKE))
Kevin Hao4c91bd62016-07-13 09:14:39 +0800566 select NONSTATIC_KERNEL
Ard Biesheuvel71810db2017-02-03 09:54:06 +0000567 select MODULE_REL_CRCS if MODVERSIONS
Kevin Hao4c91bd62016-07-13 09:14:39 +0800568 help
569 This builds a kernel image that is capable of running at the
570 location the kernel is loaded at. For ppc32, there is no any
571 alignment restrictions, and this feature is a superset of
572 DYNAMIC_MEMSTART and hence overrides it. For ppc64, we should use
573 16k-aligned base address. The kernel is linked as a
574 position-independent executable (PIE) and contains dynamic relocations
575 which are processed early in the bootup process.
576
577 One use is for the kexec on panic case where the recovery kernel
578 must live at a different physical address than the primary
579 kernel.
580
581 Note: If CONFIG_RELOCATABLE=y, then the kernel runs from the address
582 it has been loaded at and the compile time physical addresses
583 CONFIG_PHYSICAL_START is ignored. However CONFIG_PHYSICAL_START
584 setting can still be useful to bootwrappers that need to know the
585 load address of the kernel (eg. u-boot/mkimage).
586
Jason Yan2b0e86cc2019-09-20 17:45:40 +0800587config RANDOMIZE_BASE
588 bool "Randomize the address of the kernel image"
589 depends on (FSL_BOOKE && FLATMEM && PPC32)
590 depends on RELOCATABLE
591 help
592 Randomizes the virtual address at which the kernel image is
593 loaded, as a security feature that deters exploit attempts
594 relying on knowledge of the location of kernel internals.
595
596 If unsure, say Y.
597
Nicholas Piggin70839d22016-10-14 18:31:33 +1100598config RELOCATABLE_TEST
599 bool "Test relocatable kernel"
600 depends on (PPC64 && RELOCATABLE)
Nicholas Piggin70839d22016-10-14 18:31:33 +1100601 help
602 This runs the relocatable kernel at the address it was initially
603 loaded at, which tends to be non-zero and therefore test the
604 relocation code.
605
Haren Mynenie8625d462006-01-14 13:48:25 -0800606config CRASH_DUMP
Hari Bathini22bd0172017-05-08 15:56:24 -0700607 bool "Build a dump capture kernel"
Christophe Leroybe34fff2018-11-17 10:24:58 +0000608 depends on PPC64 || PPC_BOOK3S_32 || FSL_BOOKE || (44x && !SMP)
Nicholas Piggin084a2752016-10-19 14:16:00 +1100609 select RELOCATABLE if PPC64 || 44x || FSL_BOOKE
Haren Mynenie8625d462006-01-14 13:48:25 -0800610 help
Hari Bathini22bd0172017-05-08 15:56:24 -0700611 Build a kernel suitable for use as a dump capture kernel.
Mohan Kumar M54622f12008-10-21 17:38:10 +0000612 The same kernel binary can be used as production kernel and dump
613 capture kernel.
Haren Mynenie8625d462006-01-14 13:48:25 -0800614
Mahesh Salgaonkareb39c882012-02-16 01:14:22 +0000615config FA_DUMP
616 bool "Firmware-assisted dump"
Hari Bathini41df5922019-09-11 20:20:26 +0530617 depends on PPC64 && (PPC_RTAS || PPC_POWERNV)
Hari Bathini22bd0172017-05-08 15:56:24 -0700618 select CRASH_CORE
619 select CRASH_DUMP
Manish Ahuja242f2712008-03-22 10:50:50 +1100620 help
Mahesh Salgaonkareb39c882012-02-16 01:14:22 +0000621 A robust mechanism to get reliable kernel crash dump with
622 assistance from firmware. This approach does not use kexec,
Hari Bathini22bd0172017-05-08 15:56:24 -0700623 instead firmware assists in booting the capture kernel
Mahesh Salgaonkareb39c882012-02-16 01:14:22 +0000624 while preserving memory contents. Firmware-assisted dump
625 is meant to be a kdump replacement offering robustness and
626 speed not possible without system firmware assistance.
Manish Ahuja242f2712008-03-22 10:50:50 +1100627
Hari Bathini41df5922019-09-11 20:20:26 +0530628 If unsure, say "y". Only special kernels like petitboot may
629 need to say "N" here.
Manish Ahuja242f2712008-03-22 10:50:50 +1100630
Hari Bathinibec53192019-09-11 20:26:03 +0530631config PRESERVE_FA_DUMP
632 bool "Preserve Firmware-assisted dump"
633 depends on PPC64 && PPC_POWERNV && !FA_DUMP
634 help
635 On a kernel with FA_DUMP disabled, this option helps to preserve
636 crash data from a previously crash'ed kernel. Useful when the next
637 memory preserving kernel boot would process this crash data.
638 Petitboot kernel is the typical usecase for this option.
639
Hari Bathini6f713d12019-09-11 20:26:33 +0530640config OPAL_CORE
641 bool "Export OPAL memory as /sys/firmware/opal/core"
642 depends on PPC64 && PPC_POWERNV
643 help
644 This option uses the MPIPL support in firmware to provide an
645 ELF core of OPAL memory after a crash. The ELF core is exported
646 as /sys/firmware/opal/core file which is helpful in debugging
647 OPAL crashes using GDB.
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000648
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000649config IRQ_ALL_CPUS
650 bool "Distribute interrupts on all CPUs by default"
Paul Bolle6cf09b92013-05-15 11:21:01 +0200651 depends on SMP
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000652 help
653 This option gives the kernel permission to distribute IRQs across
654 multiple CPUs. Saying N here will route all IRQs to the first
655 CPU. Generally saying Y is safe, although some problems have been
656 reported with SMP Power Macintoshes with this option enabled.
657
Andy Whitcroftffa27b62005-10-28 17:46:58 -0700658config NUMA
Michael Ellermanbae80c22020-11-24 23:05:47 +1100659 bool "NUMA Memory Allocation and Scheduler Support"
Michael Ellerman25395cd2020-11-24 23:05:45 +1100660 depends on PPC64 && SMP
Michael Ellerman4c28b322020-11-24 23:05:46 +1100661 default y if PPC_PSERIES || PPC_POWERNV
Michael Ellermanbae80c22020-11-24 23:05:47 +1100662 help
663 Enable NUMA (Non-Uniform Memory Access) support.
664
665 The kernel will try to allocate memory used by a CPU on the
666 local memory controller of the CPU and add some more
667 NUMA awareness to the kernel.
Andy Whitcroftffa27b62005-10-28 17:46:58 -0700668
Yasunori Gotoc80d79d2006-04-10 22:53:53 -0700669config NODES_SHIFT
670 int
Anton Blanchardea55bf22009-09-21 19:56:43 +0000671 default "8" if PPC64
Yasunori Gotoc80d79d2006-04-10 22:53:53 -0700672 default "4"
Mike Rapoporta9ee6cf2021-06-28 19:43:01 -0700673 depends on NUMA
Yasunori Gotoc80d79d2006-04-10 22:53:53 -0700674
Nishanth Aravamudan8c272262014-05-19 11:14:23 -0700675config USE_PERCPU_NUMA_NODE_ID
676 def_bool y
677 depends on NUMA
678
Nishanth Aravamudan64bb80d2014-05-16 16:41:20 -0700679config HAVE_MEMORYLESS_NODES
680 def_bool y
681 depends on NUMA
682
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000683config ARCH_SELECT_MEMORY_MODEL
684 def_bool y
685 depends on PPC64
686
687config ARCH_FLATMEM_ENABLE
Andy Whitcroft9100b202005-11-29 19:20:55 +0000688 def_bool y
689 depends on (PPC64 && !NUMA) || PPC32
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000690
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000691config ARCH_SPARSEMEM_ENABLE
692 def_bool y
Andy Whitcroft9100b202005-11-29 19:20:55 +0000693 depends on PPC64
Andy Whitcroftd29eff7bc2007-10-16 01:24:17 -0700694 select SPARSEMEM_VMEMMAP_ENABLE
Anton Blanchard45fb6ce2005-11-11 14:22:35 +1100695
696config ARCH_SPARSEMEM_DEFAULT
697 def_bool y
Michael Ellerman7b3912f2017-04-05 16:10:48 +1000698 depends on PPC_BOOK3S_64
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000699
Michael Ellermanf6853eb2016-11-15 21:59:38 +1100700config ILLEGAL_POINTER_VALUE
701 hex
702 # This is roughly half way between the top of user space and the bottom
703 # of kernel space, which seems about as good as we can get.
704 default 0x5deadbeef0000000 if PPC64
705 default 0
706
Mike Kravetz7e9191d2005-11-07 09:39:48 -0800707config ARCH_MEMORY_PROBE
708 def_bool y
709 depends on MEMORY_HOTPLUG
710
Ilya Yanokca9153a2008-12-11 04:55:41 +0300711choice
712 prompt "Page size"
Joel Stanleyf22969a2021-10-15 10:46:49 +1030713 default PPC_64K_PAGES if PPC_BOOK3S_64
Ilya Yanokca9153a2008-12-11 04:55:41 +0300714 default PPC_4K_PAGES
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100715 help
Ilya Yanokca9153a2008-12-11 04:55:41 +0300716 Select the kernel logical page size. Increasing the page size
717 will reduce software overhead at each page boundary, allow
718 hardware prefetch mechanisms to be more effective, and allow
719 larger dma transfers increasing IO efficiency and reducing
720 overhead. However the utilization of memory will increase.
721 For example, each cached file will using a multiple of the
722 page size to hold its contents and the difference between the
723 end of file and the end of page is wasted.
724
725 Some dedicated systems, such as software raid serving with
726 accelerated calculations, have shown significant increases.
727
728 If you configure a 64 bit kernel for 64k pages but the
729 processor does not support them, then the kernel will simulate
730 them with 4k pages, loading them on demand, but with the
731 reduced software overhead and larger internal fragmentation.
732 For the 32 bit kernel, a large page option will not be offered
733 unless it is supported by the configured processor.
734
735 If unsure, choose 4K_PAGES.
736
737config PPC_4K_PAGES
738 bool "4k page size"
Aneesh Kumar K.V19f97c92016-01-29 22:32:49 +0530739 select HAVE_ARCH_SOFT_DIRTY if PPC_BOOK3S_64
Ilya Yanokca9153a2008-12-11 04:55:41 +0300740
741config PPC_16K_PAGES
Michael Ellerman55f8b5b2015-08-07 16:19:46 +1000742 bool "16k page size"
Christophe Leroy55c8fc3f2018-11-29 14:07:21 +0000743 depends on 44x || PPC_8xx
Ilya Yanokca9153a2008-12-11 04:55:41 +0300744
745config PPC_64K_PAGES
Michael Ellerman55f8b5b2015-08-07 16:19:46 +1000746 bool "64k page size"
Michael Ellermanbba43632019-02-08 23:34:16 +1100747 depends on 44x || PPC_BOOK3S_64
Aneesh Kumar K.V19f97c92016-01-29 22:32:49 +0530748 select HAVE_ARCH_SOFT_DIRTY if PPC_BOOK3S_64
Ilya Yanokca9153a2008-12-11 04:55:41 +0300749
Yuri Tikhonove1240122009-01-29 01:40:44 +0000750config PPC_256K_PAGES
Christophe Leroy4eeef092021-01-20 07:49:14 +0000751 bool "256k page size (Requires non-standard binutils settings)"
752 depends on 44x && !PPC_47x
Yuri Tikhonove1240122009-01-29 01:40:44 +0000753 help
754 Make the page size 256k.
755
Christophe Leroy4eeef092021-01-20 07:49:14 +0000756 The kernel will only be able to run applications that have been
757 compiled with '-zmax-page-size' set to 256K (the default is 64K) using
758 binutils later than 2.17.50.0.3, or by patching the ELF_MAXPAGESIZE
759 definition from 0x10000 to 0x40000 in older versions.
Yuri Tikhonove1240122009-01-29 01:40:44 +0000760
Ilya Yanokca9153a2008-12-11 04:55:41 +0300761endchoice
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100762
Christophe Leroy555f4fd2019-02-21 19:08:46 +0000763config PPC_PAGE_SHIFT
764 int
765 default 18 if PPC_256K_PAGES
766 default 16 if PPC_64K_PAGES
767 default 14 if PPC_16K_PAGES
768 default 12
769
Hamish Martin47613402017-02-24 13:52:09 +1300770config THREAD_SHIFT
771 int "Thread shift" if EXPERT
772 range 13 15
773 default "15" if PPC_256K_PAGES
774 default "14" if PPC64
Christophe Leroyedbadaf2020-04-08 15:58:49 +0000775 default "14" if KASAN
Hamish Martin47613402017-02-24 13:52:09 +1300776 default "13"
777 help
778 Used to define the stack size. The default is almost always what you
779 want. Only change this if you know what you are doing.
780
Christophe Leroy0f4a9042019-02-21 19:08:50 +0000781config DATA_SHIFT_BOOL
Christophe Leroyda1adea2020-05-19 05:49:25 +0000782 bool "Set custom data alignment"
Christophe Leroy0f4a9042019-02-21 19:08:50 +0000783 depends on ADVANCED_OPTIONS
Christophe Leroy90cbac02021-03-04 14:35:09 +0000784 depends on STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE
Christophe Leroy49e3d8e2021-10-15 12:02:49 +0200785 depends on PPC_BOOK3S_32 || (PPC_8xx && !PIN_TLB_DATA && !STRICT_KERNEL_RWX) || \
786 FSL_BOOKE
Christophe Leroy0f4a9042019-02-21 19:08:50 +0000787 help
788 This option allows you to set the kernel data alignment. When
789 RAM is mapped by blocks, the alignment needs to fit the size and
790 number of possible blocks. The default should be OK for most configs.
791
792 Say N here unless you know what you are doing.
Christophe Leroy166d97d2019-02-21 19:08:47 +0000793
794config DATA_SHIFT
Christophe Leroy0f4a9042019-02-21 19:08:50 +0000795 int "Data shift" if DATA_SHIFT_BOOL
Christophe Leroy166d97d2019-02-21 19:08:47 +0000796 default 24 if STRICT_KERNEL_RWX && PPC64
Christophe Leroy90cbac02021-03-04 14:35:09 +0000797 range 17 28 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_BOOK3S_32
798 range 19 23 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_8xx
Christophe Leroy49e3d8e2021-10-15 12:02:49 +0200799 range 20 24 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_FSL_BOOKE
Christophe Leroy63b2bc62019-02-21 19:08:49 +0000800 default 22 if STRICT_KERNEL_RWX && PPC_BOOK3S_32
Christophe Leroy90cbac02021-03-04 14:35:09 +0000801 default 18 if (DEBUG_PAGEALLOC || KFENCE) && PPC_BOOK3S_32
Christophe Leroy8f54a6f2019-02-21 19:08:52 +0000802 default 23 if STRICT_KERNEL_RWX && PPC_8xx
Christophe Leroy90cbac02021-03-04 14:35:09 +0000803 default 23 if (DEBUG_PAGEALLOC || KFENCE) && PPC_8xx && PIN_TLB_DATA
804 default 19 if (DEBUG_PAGEALLOC || KFENCE) && PPC_8xx
Christophe Leroy49e3d8e2021-10-15 12:02:49 +0200805 default 24 if STRICT_KERNEL_RWX && FSL_BOOKE
Christophe Leroy166d97d2019-02-21 19:08:47 +0000806 default PPC_PAGE_SHIFT
Christophe Leroy0f4a9042019-02-21 19:08:50 +0000807 help
808 On Book3S 32 (603+), DBATs are used to map kernel text and rodata RO.
809 Smaller is the alignment, greater is the number of necessary DBATs.
Christophe Leroy166d97d2019-02-21 19:08:47 +0000810
Christophe Leroy8f54a6f2019-02-21 19:08:52 +0000811 On 8xx, large pages (512kb or 8M) are used to map kernel linear
812 memory. Aligning to 8M reduces TLB misses as only 8M pages are used
Christophe Leroyda1adea2020-05-19 05:49:25 +0000813 in that case. If PIN_TLB is selected, it must be aligned to 8M as
814 8M pages will be pinned.
Christophe Leroy8f54a6f2019-02-21 19:08:52 +0000815
Stephen Rothwell53bcddb2008-04-11 11:11:56 +1000816config FORCE_MAX_ZONEORDER
817 int "Maximum zone order"
Rashmica Guptaa7ee5392016-02-19 16:38:47 +1100818 range 8 9 if PPC64 && PPC_64K_PAGES
Benjamin Herrenschmidt066c4b82009-07-21 15:25:53 +0000819 default "9" if PPC64 && PPC_64K_PAGES
Aneesh Kumar K.Vd5a1e422016-09-19 23:01:33 +0530820 range 13 13 if PPC64 && !PPC_64K_PAGES
Benjamin Herrenschmidt066c4b82009-07-21 15:25:53 +0000821 default "13" if PPC64 && !PPC_64K_PAGES
822 range 9 64 if PPC32 && PPC_16K_PAGES
823 default "9" if PPC32 && PPC_16K_PAGES
824 range 7 64 if PPC32 && PPC_64K_PAGES
825 default "7" if PPC32 && PPC_64K_PAGES
826 range 5 64 if PPC32 && PPC_256K_PAGES
827 default "5" if PPC32 && PPC_256K_PAGES
Johannes Bergebe40c52008-09-24 04:29:08 +0000828 range 11 64
Stephen Rothwell53bcddb2008-04-11 11:11:56 +1000829 default "11"
830 help
831 The kernel memory allocator divides physically contiguous memory
832 blocks into "zones", where each zone is a power of two number of
833 pages. This option selects the largest power of two that the kernel
834 keeps in the memory allocator. If you need to allocate very large
835 blocks of physically contiguous memory, then you may need to
836 increase this value.
837
838 This config option is actually maximum order plus one. For example,
839 a value of 11 means that the largest free memory block is 2^10 pages.
840
841 The page size is not necessarily 4KB. For example, on 64-bit
842 systems, 64KB pages can be enabled via CONFIG_PPC_64K_PAGES. Keep
843 this in mind when choosing a value for this option.
844
Paul Mackerrasfa282372008-01-24 08:35:13 +1100845config PPC_SUBPAGE_PROT
Nicholas Piggin63396ad2020-07-03 11:19:58 +1000846 bool "Support setting protections for 4k subpages (subpage_prot syscall)"
847 default n
Michael Ellerman4e003742017-10-19 15:08:43 +1100848 depends on PPC_BOOK3S_64 && PPC_64K_PAGES
Paul Mackerrasfa282372008-01-24 08:35:13 +1100849 help
Nicholas Piggin63396ad2020-07-03 11:19:58 +1000850 This option adds support for system call to allow user programs
Paul Mackerrasfa282372008-01-24 08:35:13 +1100851 to set access permissions (read/write, readonly, or no access)
852 on the 4k subpages of each 64k page.
853
Nicholas Piggin63396ad2020-07-03 11:19:58 +1000854 If unsure, say N here.
855
Shawn Anastasio9b725a92020-08-21 13:55:57 -0500856config PPC_PROT_SAO_LPAR
857 bool "Support PROT_SAO mappings in LPARs"
858 depends on PPC_BOOK3S_64
859 help
860 This option adds support for PROT_SAO mappings from userspace
861 inside LPARs on supported CPUs.
862
863 This may cause issues when performing guest migration from
864 a CPU that supports SAO to one that does not.
865
866 If unsure, say N here.
867
Ian Munsiee83d0162014-10-08 19:54:50 +1100868config PPC_COPRO_BASE
869 bool
Ian Munsiee83d0162014-10-08 19:54:50 +1100870
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000871config SCHED_SMT
872 bool "SMT (Hyperthreading) scheduler support"
873 depends on PPC64 && SMP
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000874 help
875 SMT scheduler support improves the CPU scheduler's decision making
876 when dealing with POWER5 cpus at a cost of slightly increased
877 overhead in some places. If unsure say N here.
878
Michael Neulingb92a66a2012-09-10 00:35:26 +0000879config PPC_DENORMALISATION
880 bool "PowerPC denormalisation exception handling"
881 depends on PPC_BOOK3S_64
Anton Blanchard4e90a2a2013-07-31 16:31:26 +1000882 default "y" if PPC_POWERNV
Enrico Weigelt, metux IT consult4f44e8a2019-07-03 18:04:13 +0200883 help
Michael Neulingb92a66a2012-09-10 00:35:26 +0000884 Add support for handling denormalisation of single precision
885 values. Useful for bare metal only. If unsure say Y here.
886
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000887config CMDLINE
Chris Packhamf134a7c2020-06-12 10:42:19 +1200888 string "Initial kernel command string"
Christophe Leroycbe46bd2019-04-26 16:23:27 +0000889 default ""
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000890 help
891 On some platforms, there is currently no way for the boot loader to
892 pass arguments to the kernel. For these platforms, you can supply
893 some command-line options at build time by entering them here. In
894 most cases you will need to specify the root device here.
895
Chris Packhamd79fbb32019-08-02 10:50:06 +1200896choice
897 prompt "Kernel command line type" if CMDLINE != ""
898 default CMDLINE_FROM_BOOTLOADER
899
900config CMDLINE_FROM_BOOTLOADER
901 bool "Use bootloader kernel arguments if available"
902 help
903 Uses the command-line options passed by the boot loader. If
904 the boot loader doesn't provide any, the default kernel command
905 string provided in CMDLINE will be used.
906
907config CMDLINE_EXTEND
908 bool "Extend bootloader kernel arguments"
909 help
910 The command-line arguments provided by the boot loader will be
911 appended to the default kernel command string.
912
Sebastian Siewioreb3b80f2014-02-20 21:48:17 +0100913config CMDLINE_FORCE
914 bool "Always use the default kernel command string"
Sebastian Siewioreb3b80f2014-02-20 21:48:17 +0100915 help
916 Always use the default kernel command string, even if the boot
917 loader passes other arguments to the kernel.
918 This is useful if you cannot or don't want to change the
919 command-line options your boot loader passes to the kernel.
920
Chris Packhamd79fbb32019-08-02 10:50:06 +1200921endchoice
922
Grant Likelyc356aa42008-07-09 09:41:52 -0600923config EXTRA_TARGETS
924 string "Additional default image types"
925 help
926 List additional targets to be built by the bootwrapper here (separated
927 by spaces). This is useful for targets that depend of device tree
928 files in the .dts directory.
929
930 Targets in this list will be build as part of the default build
931 target, or when the user does a 'make zImage' or a
932 'make zImage.initrd'.
933
934 If unsure, leave blank
935
Johannes Bergb28f5082008-01-15 23:17:00 -0500936config ARCH_WANTS_FREEZER_CONTROL
937 def_bool y
938 depends on ADB_PMU
939
Masahiro Yamada8636a1f2018-12-11 20:01:04 +0900940source "kernel/power/Kconfig"
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000941
Ram Pai92e3da32018-01-18 17:50:24 -0800942config PPC_MEM_KEYS
943 prompt "PowerPC Memory Protection Keys"
944 def_bool y
945 depends on PPC_BOOK3S_64
946 select ARCH_USES_HIGH_VMA_FLAGS
947 select ARCH_HAS_PKEYS
948 help
949 Memory Protection Keys provides a mechanism for enforcing
950 page-based protections, but without requiring modification of the
951 page tables when an application changes protection domains.
952
Mauro Carvalho Chehab1eecbcd2019-06-07 15:54:31 -0300953 For details, see Documentation/core-api/protection-keys.rst
Ram Pai92e3da32018-01-18 17:50:24 -0800954
955 If unsure, say y.
956
Nayna Jain1a8916e2019-11-05 17:00:22 -0600957config PPC_SECURE_BOOT
958 prompt "Enable secure boot support"
959 bool
Daniel Axtens5c5e46d2020-09-24 11:49:22 +1000960 depends on PPC_POWERNV || PPC_PSERIES
Nayna Jain4238fad2019-10-30 23:31:27 -0400961 depends on IMA_ARCH_POLICY
Nayna Jain9e2b4be2020-03-08 20:57:51 -0400962 imply IMA_SECURE_AND_OR_TRUSTED_BOOT
Nayna Jain1a8916e2019-11-05 17:00:22 -0600963 help
964 Systems with firmware secure boot enabled need to define security
965 policies to extend secure boot to the OS. This config allows a user
966 to enable OS secure boot on systems that have firmware support for
967 it. If in doubt say N.
968
Nayna Jainbd5d9c72019-11-10 21:10:34 -0600969config PPC_SECVAR_SYSFS
970 bool "Enable sysfs interface for POWER secure variables"
971 default y
972 depends on PPC_SECURE_BOOT
973 depends on SYSFS
974 help
975 POWER secure variables are managed and controlled by firmware.
976 These variables are exposed to userspace via sysfs to enable
977 read/write operations on these variables. Say Y if you have
978 secure boot enabled and want to expose variables to userspace.
979
Andrew Donnellanbd593802020-08-20 14:45:12 +1000980config PPC_RTAS_FILTER
981 bool "Enable filtering of RTAS syscalls"
982 default y
983 depends on PPC_RTAS
984 help
985 The RTAS syscall API has security issues that could be used to
986 compromise system integrity. This option enforces restrictions on the
987 RTAS calls and arguments passed by userspace programs to mitigate
988 these issues.
989
990 Say Y unless you know what you are doing and the filter is causing
991 problems for you.
992
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000993endmenu
994
995config ISA_DMA_API
996 bool
Stephen Rothwell3d066d72012-02-22 14:10:12 +0000997 default PCI
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000998
999menu "Bus options"
1000
1001config ISA
1002 bool "Support for ISA-bus hardware"
Paul Bolle933ee712013-03-27 00:47:03 +00001003 depends on PPC_CHRP
Paul Mackerrasf9bd1702005-10-26 16:47:42 +10001004 select PPC_I8259
Paul Mackerras14cf11a2005-09-26 16:04:21 +10001005 help
1006 Find out whether you have ISA slots on your motherboard. ISA is the
1007 name of a bus system, i.e. the way the CPU talks to the other stuff
1008 inside your box. If you have an Apple machine, say N here; if you
Paul Bolle933ee712013-03-27 00:47:03 +00001009 have an IBM RS/6000 or pSeries machine, say Y. If you have an
1010 embedded board, consult your board documentation.
Paul Mackerras14cf11a2005-09-26 16:04:21 +10001011
1012config GENERIC_ISA_DMA
1013 bool
Anton Vorontsov19274452010-07-15 07:38:16 +00001014 depends on ISA_DMA_API
Paul Mackerras14cf11a2005-09-26 16:04:21 +10001015 default y
1016
Paul Mackerras25635c72005-10-26 16:36:55 +10001017config PPC_INDIRECT_PCI
1018 bool
1019 depends on PCI
Becky Bruce63dafe52006-01-14 16:57:39 -06001020 default y if 40x || 44x
Paul Mackerras25635c72005-10-26 16:36:55 +10001021
Paul Mackerras14cf11a2005-09-26 16:04:21 +10001022config SBUS
1023 bool
1024
Kumar Gala08264cb2006-01-10 21:43:56 -06001025config FSL_SOC
1026 bool
1027
Roy Zang55c44992007-07-10 18:44:34 +08001028config FSL_PCI
Enrico Weigelt, metux IT consult4f44e8a2019-07-03 18:04:13 +02001029 bool
Christoph Hellwig11ddce12019-02-13 08:01:22 +01001030 select ARCH_HAS_DMA_SET_MASK
Roy Zang55c44992007-07-10 18:44:34 +08001031 select PPC_INDIRECT_PCI
Kumar Galad0839112009-01-28 13:25:29 -06001032 select PCI_QUIRKS
Roy Zang55c44992007-07-10 18:44:34 +08001033
Anton Vorontsov4ffd6952009-09-16 01:43:57 +04001034config FSL_PMC
1035 bool
1036 default y
1037 depends on SUSPEND && (PPC_85xx || PPC_86xx)
1038 help
1039 Freescale MPC85xx/MPC86xx power management controller support
1040 (suspend/resume). For MPC83xx see platforms/83xx/suspend.c
1041
Victor Gallardod164f6d2010-10-08 10:25:27 +00001042config PPC4xx_CPM
1043 bool
1044 default y
1045 depends on SUSPEND && (44x || 40x)
1046 help
1047 PPC4xx Clock Power Management (CPM) support (suspend/resume).
1048 It also enables support for two different idle states (idle-wait
1049 and idle-doze).
1050
Stefan Roese2a706912008-03-26 22:39:50 +11001051config 4xx_SOC
1052 bool
1053
Anton Vorontsovacaa7aa2008-04-11 21:03:40 +04001054config FSL_LBC
Roy Zang3ab8f2a2010-10-18 15:22:31 +08001055 bool "Freescale Local Bus support"
Anton Vorontsovacaa7aa2008-04-11 21:03:40 +04001056 help
Roy Zang3ab8f2a2010-10-18 15:22:31 +08001057 Enables reporting of errors from the Freescale local bus
1058 controller. Also contains some common code used by
1059 drivers for specific local bus peripherals.
Anton Vorontsovacaa7aa2008-04-11 21:03:40 +04001060
Anton Vorontsov83ff9dc2008-05-23 20:38:54 +04001061config FSL_GTM
1062 bool
1063 depends on PPC_83xx || QUICC_ENGINE || CPM2
1064 help
1065 Freescale General-purpose Timers support
1066
Paul Mackerras14cf11a2005-09-26 16:04:21 +10001067config PCI_8260
1068 bool
1069 depends on PCI && 8260
Paul Mackerras25635c72005-10-26 16:36:55 +10001070 select PPC_INDIRECT_PCI
Paul Mackerras14cf11a2005-09-26 16:04:21 +10001071 default y
1072
Alexandre Bounine388b78a2011-03-23 16:43:03 -07001073config FSL_RIO
1074 bool "Freescale Embedded SRIO Controller support"
Christoph Hellwig1753d502018-11-15 20:05:36 +01001075 depends on RAPIDIO = y && HAVE_RAPIDIO
Alexandre Bounine388b78a2011-03-23 16:43:03 -07001076 default "n"
Enrico Weigelt, metux IT consult4f44e8a2019-07-03 18:04:13 +02001077 help
Alexandre Bounine388b78a2011-03-23 16:43:03 -07001078 Include support for RapidIO controller on Freescale embedded
1079 processors (MPC8548, MPC8641, etc).
1080
Paul Mackerras14cf11a2005-09-26 16:04:21 +10001081endmenu
1082
Suzuki Poulose0f890c82011-12-14 22:57:15 +00001083config NONSTATIC_KERNEL
1084 bool
Suzuki Poulose0f890c82011-12-14 22:57:15 +00001085
Paul Mackerras14cf11a2005-09-26 16:04:21 +10001086menu "Advanced setup"
1087 depends on PPC32
1088
1089config ADVANCED_OPTIONS
1090 bool "Prompt for advanced kernel configuration options"
1091 help
1092 This option will enable prompting for a variety of advanced kernel
1093 configuration options. These options can cause the kernel to not
1094 work if they are set incorrectly, but can be used to optimize certain
1095 aspects of kernel memory management.
1096
1097 Unless you know what you are doing, say N here.
1098
1099comment "Default settings for advanced configuration options are used"
1100 depends on !ADVANCED_OPTIONS
1101
Paul Mackerras14cf11a2005-09-26 16:04:21 +10001102config LOWMEM_SIZE_BOOL
1103 bool "Set maximum low memory"
1104 depends on ADVANCED_OPTIONS
1105 help
1106 This option allows you to set the maximum amount of memory which
1107 will be used as "low memory", that is, memory which the kernel can
1108 access directly, without having to set up a kernel virtual mapping.
1109 This can be useful in optimizing the layout of kernel virtual
1110 memory.
1111
1112 Say N here unless you know what you are doing.
1113
1114config LOWMEM_SIZE
1115 hex "Maximum low memory size (in bytes)" if LOWMEM_SIZE_BOOL
1116 default "0x30000000"
1117
Trent Piepho96051462008-12-08 19:34:58 -08001118config LOWMEM_CAM_NUM_BOOL
1119 bool "Set number of CAMs to use to map low memory"
1120 depends on ADVANCED_OPTIONS && FSL_BOOKE
1121 help
1122 This option allows you to set the maximum number of CAM slots that
1123 will be used to map low memory. There are a limited number of slots
1124 available and even more limited number that will fit in the L1 MMU.
1125 However, using more entries will allow mapping more low memory. This
1126 can be useful in optimizing the layout of kernel virtual memory.
1127
1128 Say N here unless you know what you are doing.
1129
1130config LOWMEM_CAM_NUM
Josh Boyer9b71dbd2009-03-31 08:05:50 -04001131 depends on FSL_BOOKE
Trent Piepho96051462008-12-08 19:34:58 -08001132 int "Number of CAMs to use to map low memory" if LOWMEM_CAM_NUM_BOOL
Christophe Leroy49e3d8e2021-10-15 12:02:49 +02001133 default 3 if !STRICT_KERNEL_RWX
1134 default 9 if DATA_SHIFT >= 24
1135 default 12 if DATA_SHIFT >= 22
1136 default 15
Trent Piepho96051462008-12-08 19:34:58 -08001137
Suzuki Poulose0f890c82011-12-14 22:57:15 +00001138config DYNAMIC_MEMSTART
Kees Cook642e56f2013-01-16 18:53:25 -08001139 bool "Enable page aligned dynamic load address for kernel"
1140 depends on ADVANCED_OPTIONS && FLATMEM && (FSL_BOOKE || 44x)
Suzuki Poulose0f890c82011-12-14 22:57:15 +00001141 select NONSTATIC_KERNEL
Kumar Gala37dd2ba2008-04-22 04:22:34 +10001142 help
Suzuki Poulose0f890c82011-12-14 22:57:15 +00001143 This option enables the kernel to be loaded at any page aligned
Enrico Weigelt, metux IT consult4f44e8a2019-07-03 18:04:13 +02001144 physical address. The kernel creates a mapping from KERNELBASE to
Suzuki Poulose0f890c82011-12-14 22:57:15 +00001145 the address where the kernel is loaded. The page size here implies
1146 the TLB page size of the mapping for kernel on the particular platform.
1147 Please refer to the init code for finding the TLB page size.
Kumar Gala37dd2ba2008-04-22 04:22:34 +10001148
Suzuki Poulose0f890c82011-12-14 22:57:15 +00001149 DYNAMIC_MEMSTART is an easy way of implementing pseudo-RELOCATABLE
1150 kernel image, where the only restriction is the page aligned kernel
Enrico Weigelt, metux IT consult4f44e8a2019-07-03 18:04:13 +02001151 load address. When this option is enabled, the compile time physical
Suzuki Poulose0f890c82011-12-14 22:57:15 +00001152 address CONFIG_PHYSICAL_START is ignored.
Kumar Gala37dd2ba2008-04-22 04:22:34 +10001153
Suzuki Poulose9c5f7d32011-12-14 22:58:12 +00001154 This option is overridden by CONFIG_RELOCATABLE
1155
Kumar Gala37dd2ba2008-04-22 04:22:34 +10001156config PAGE_OFFSET_BOOL
1157 bool "Set custom page offset address"
1158 depends on ADVANCED_OPTIONS
1159 help
1160 This option allows you to set the kernel virtual address at which
1161 the kernel will map low memory. This can be useful in optimizing
1162 the virtual memory layout of the system.
1163
1164 Say N here unless you know what you are doing.
1165
1166config PAGE_OFFSET
1167 hex "Virtual address of memory base" if PAGE_OFFSET_BOOL
1168 default "0xc0000000"
1169
Paul Mackerras14cf11a2005-09-26 16:04:21 +10001170config KERNEL_START_BOOL
1171 bool "Set custom kernel base address"
1172 depends on ADVANCED_OPTIONS
1173 help
1174 This option allows you to set the kernel virtual address at which
Kumar Gala37dd2ba2008-04-22 04:22:34 +10001175 the kernel will be loaded. Normally this should match PAGE_OFFSET
1176 however there are times (like kdump) that one might not want them
1177 to be the same.
Paul Mackerras14cf11a2005-09-26 16:04:21 +10001178
1179 Say N here unless you know what you are doing.
1180
1181config KERNEL_START
1182 hex "Virtual address of kernel base" if KERNEL_START_BOOL
Kumar Gala37dd2ba2008-04-22 04:22:34 +10001183 default PAGE_OFFSET if PAGE_OFFSET_BOOL
Suzuki Poulose0f890c82011-12-14 22:57:15 +00001184 default "0xc2000000" if CRASH_DUMP && !NONSTATIC_KERNEL
Paul Mackerras14cf11a2005-09-26 16:04:21 +10001185 default "0xc0000000"
1186
Kumar Gala37dd2ba2008-04-22 04:22:34 +10001187config PHYSICAL_START_BOOL
1188 bool "Set physical address where the kernel is loaded"
1189 depends on ADVANCED_OPTIONS && FLATMEM && FSL_BOOKE
1190 help
1191 This gives the physical address where the kernel is loaded.
1192
1193 Say N here unless you know what you are doing.
1194
1195config PHYSICAL_START
1196 hex "Physical address where the kernel is loaded" if PHYSICAL_START_BOOL
Christophe Leroy26598f22018-11-17 10:25:07 +00001197 default "0x02000000" if PPC_BOOK3S && CRASH_DUMP && !NONSTATIC_KERNEL
Kumar Gala37dd2ba2008-04-22 04:22:34 +10001198 default "0x00000000"
1199
1200config PHYSICAL_ALIGN
1201 hex
Trent Piephoc8f35702008-12-08 19:34:59 -08001202 default "0x04000000" if FSL_BOOKE
Kumar Gala37dd2ba2008-04-22 04:22:34 +10001203 help
1204 This value puts the alignment restrictions on physical address
1205 where kernel is loaded and run from. Kernel is compiled for an
1206 address which meets above alignment restriction.
1207
Paul Mackerras14cf11a2005-09-26 16:04:21 +10001208config TASK_SIZE_BOOL
1209 bool "Set custom user task size"
1210 depends on ADVANCED_OPTIONS
1211 help
1212 This option allows you to set the amount of virtual address space
1213 allocated to user tasks. This can be useful in optimizing the
1214 virtual memory layout of the system.
1215
1216 Say N here unless you know what you are doing.
1217
1218config TASK_SIZE
1219 hex "Size of user task space" if TASK_SIZE_BOOL
Paul Bolle933ee712013-03-27 00:47:03 +00001220 default "0x80000000" if PPC_8xx
Christophe Leroy80edc682021-04-01 13:30:43 +00001221 default "0xb0000000" if PPC_BOOK3S_32
Kumar Gala4d9e55102007-10-11 13:40:21 -05001222 default "0xc0000000"
Paul Mackerras14cf11a2005-09-26 16:04:21 +10001223endmenu
1224
Stephen Rothwellcabb5582005-09-30 16:16:52 +10001225if PPC64
Paul Mackerrasbdbc29c2013-08-27 16:07:49 +10001226# This value must have zeroes in the bottom 60 bits otherwise lots will break
Kumar Gala37dd2ba2008-04-22 04:22:34 +10001227config PAGE_OFFSET
Stephen Rothwellcabb5582005-09-30 16:16:52 +10001228 hex
Stephen Rothwelleeb2d212005-09-30 17:24:15 +10001229 default "0xc000000000000000"
Kumar Gala37dd2ba2008-04-22 04:22:34 +10001230config KERNEL_START
1231 hex
Kumar Gala37dd2ba2008-04-22 04:22:34 +10001232 default "0xc000000000000000"
1233config PHYSICAL_START
1234 hex
Kumar Gala37dd2ba2008-04-22 04:22:34 +10001235 default "0x00000000"
Stephen Rothwellcabb5582005-09-30 16:16:52 +10001236endif
1237
Michael Ellermana4da0d52013-10-11 14:07:57 +11001238config ARCH_RANDOM
1239 def_bool n
1240
Sylvain Munaut1088a202007-09-16 20:53:25 +10001241config PPC_LIB_RHEAP
1242 bool
1243
Hollis Blanchardbbf45ba2008-04-16 23:28:09 -05001244source "arch/powerpc/kvm/Kconfig"
Michael Ellerman85baa092016-03-24 22:04:05 +11001245
1246source "kernel/livepatch/Kconfig"