blob: 65cb322115748636ec28e489e74b199fb8f4812d [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
travis@sgi.comb32ef632008-01-30 13:32:51 +010062 def_bool PPC64
63
Michael Ellerman551b81f2009-10-13 19:44:44 +000064config NR_IRQS
65 int "Number of virtual interrupt numbers"
Anton Blanchard859aefc2010-01-31 01:14:03 +000066 range 32 32768
Michael Ellerman551b81f2009-10-13 19:44:44 +000067 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
Nicholas Pigginddd703c2016-12-20 04:30:08 +100074config NMI_IPI
75 bool
Nicholas Piggin21041802017-07-12 14:35:52 -070076 depends on SMP && (DEBUGGER || KEXEC_CORE || HARDLOCKUP_DETECTOR)
Nicholas Pigginddd703c2016-12-20 04:30:08 +100077 default y
78
Nicholas Piggin75eb7672017-08-01 22:00:52 +100079config PPC_WATCHDOG
80 bool
81 depends on HARDLOCKUP_DETECTOR
82 depends on HAVE_HARDLOCKUP_DETECTOR_ARCH
83 default y
84 help
85 This is a placeholder when the powerpc hardlockup detector
86 watchdog is selected (arch/powerpc/kernel/watchdog.c). It is
87 seleted via the generic lockup detector menu which is why we
88 have no standalone config option for it here.
89
Christoph Hellwigfd3e0bb2008-04-17 14:35:00 +100090config STACKTRACE_SUPPORT
91 bool
92 default y
93
Benjamin Herrenschmidt945feb12008-04-17 14:35:01 +100094config TRACE_IRQFLAGS_SUPPORT
95 bool
Benjamin Herrenschmidt945feb12008-04-17 14:35:01 +100096 default y
97
98config LOCKDEP_SUPPORT
99 bool
100 default y
101
Nick Piggin95c354f2008-01-30 13:31:20 +0100102config GENERIC_LOCKBREAK
103 bool
104 default y
Thomas Gleixnerfdc5569e2019-10-24 18:04:58 +0200105 depends on SMP && PREEMPTION
Nick Piggin95c354f2008-01-30 13:31:20 +0100106
Akinobu Mitae779b2f2006-03-26 01:39:33 -0800107config GENERIC_HWEIGHT
108 bool
109 default y
110
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000111config PPC
112 bool
113 default y
Michael Ellermana7d24752017-03-06 22:53:59 +1100114 #
115 # Please keep this list sorted alphabetically.
116 #
Yury Norov942fa982018-05-16 11:18:49 +0300117 select ARCH_32BIT_OFF_T if PPC32
Christophe Leroy6bf752d2018-12-19 07:09:39 +0000118 select ARCH_HAS_DEBUG_VIRTUAL
Anshuman Khandual399145f2020-06-04 16:47:15 -0700119 select ARCH_HAS_DEBUG_VM_PGTABLE
Michael Ellermana7d24752017-03-06 22:53:59 +1100120 select ARCH_HAS_DEVMEM_IS_ALLOWED
Michael Ellermana7d24752017-03-06 22:53:59 +1100121 select ARCH_HAS_ELF_RANDOMIZE
Daniel Micay6974f0c2017-07-12 14:36:10 -0700122 select ARCH_HAS_FORTIFY_SOURCE
Michael Ellermana7d24752017-03-06 22:53:59 +1100123 select ARCH_HAS_GCOV_PROFILE_ALL
Andrew Donnellanfb0b0a72019-02-22 11:40:46 +1100124 select ARCH_HAS_KCOV
Christoph Hellwigcbd34da2019-07-11 20:57:28 -0700125 select ARCH_HAS_HUGEPD if HUGETLB_PAGE
Dan Williams9ffc1d12020-01-30 12:06:07 -0800126 select ARCH_HAS_MEMREMAP_COMPAT_ALIGN
Will Deacon420af152019-02-22 14:45:42 +0000127 select ARCH_HAS_MMIOWB if PPC64
Christoph Hellwigea8c64a2018-01-10 16:21:13 +0100128 select ARCH_HAS_PHYS_TO_DMA
Christophe Leroy461cef22019-07-31 06:31:41 +0000129 select ARCH_HAS_PMEM_API
Petr Mladekd195b1d2020-05-27 14:28:44 +0200130 select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
Robin Murphy17596732019-07-16 16:30:47 -0700131 select ARCH_HAS_PTE_DEVMAP if PPC_BOOK3S_64
Laurent Dufour3010a5e2018-06-07 17:06:08 -0700132 select ARCH_HAS_PTE_SPECIAL
Mathieu Desnoyers3ccfebe2018-01-29 15:20:11 -0500133 select ARCH_HAS_MEMBARRIER_CALLBACKS
Nicholas Piggin2384b362020-07-16 11:35:22 +1000134 select ARCH_HAS_MEMBARRIER_SYNC_CORE
Christophe Leroyb4645ff2019-08-22 16:44:05 +0000135 select ARCH_HAS_SCALED_CPUTIME if VIRT_CPU_ACCOUNTING_NATIVE && PPC_BOOK3S_64
Michael Ellerman8659a0e2020-05-20 23:36:05 +1000136 select ARCH_HAS_STRICT_KERNEL_RWX if (PPC32 && !HIBERNATION)
Michael Ellermana7d24752017-03-06 22:53:59 +1100137 select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST
Christophe Leroy461cef22019-07-31 06:31:41 +0000138 select ARCH_HAS_UACCESS_FLUSHCACHE
Santosh Sivaraj42ac26d2019-08-20 13:43:52 +0530139 select ARCH_HAS_UACCESS_MCSAFE if PPC64
Michael Ellermana7d24752017-03-06 22:53:59 +1100140 select ARCH_HAS_UBSAN_SANITIZE_ALL
141 select ARCH_HAVE_NMI_SAFE_CMPXCHG
Mike Rapoport350e88b2019-05-13 17:22:59 -0700142 select ARCH_KEEP_MEMBLOCK
Mark Salterb7e7c372013-10-07 22:15:32 -0400143 select ARCH_MIGHT_HAVE_PC_PARPORT
Mark Salterc74e6d32014-01-01 11:32:26 -0800144 select ARCH_MIGHT_HAVE_PC_SERIO
Christophe Leroy4ec591e2018-01-04 16:35:25 +0100145 select ARCH_OPTIONAL_KERNEL_RWX if ARCH_HAS_STRICT_KERNEL_RWX
Michael Ellermana7d24752017-03-06 22:53:59 +1100146 select ARCH_SUPPORTS_ATOMIC_RMW
Michael Ellermana7d24752017-03-06 22:53:59 +1100147 select ARCH_USE_BUILTIN_BSWAP
148 select ARCH_USE_CMPXCHG_LOCKREF if PPC64
Nicholas Pigginaa65ff62020-07-24 23:14:20 +1000149 select ARCH_USE_QUEUED_RWLOCKS if PPC_QUEUED_SPINLOCKS
150 select ARCH_USE_QUEUED_SPINLOCKS if PPC_QUEUED_SPINLOCKS
Michael Ellermana7d24752017-03-06 22:53:59 +1100151 select ARCH_WANT_IPC_PARSE_VERSION
Nicholas Piggin66acd462020-09-14 14:52:17 +1000152 select ARCH_WANT_IRQS_OFF_ACTIVATE_MM
Paul E. McKenney77e58492017-01-14 13:32:50 -0800153 select ARCH_WEAK_RELEASE_ACQUIRE
Stephen Rothwelld812c0e12013-03-06 18:11:51 +0000154 select BINFMT_ELF
Shile Zhang10916702019-12-04 08:46:31 +0800155 select BUILDTIME_TABLE_SORT
Michael Ellermana7d24752017-03-06 22:53:59 +1100156 select CLONE_BACKWARDS
157 select DCACHE_WORD_ACCESS if PPC64 && CPU_LITTLE_ENDIAN
Christoph Hellwig2f9237d2020-07-08 09:30:00 +0200158 select DMA_OPS if PPC64
Christoph Hellwigf1565c22020-07-08 12:22:47 +0200159 select DMA_OPS_BYPASS if PPC64
Michael Ellerman0c0c52302018-03-27 15:29:06 +1100160 select DYNAMIC_FTRACE if FUNCTION_TRACER
Michael Ellermana7d24752017-03-06 22:53:59 +1100161 select EDAC_ATOMIC_SCRUB
162 select EDAC_SUPPORT
163 select GENERIC_ATOMIC64 if PPC32
164 select GENERIC_CLOCKEVENTS
165 select GENERIC_CLOCKEVENTS_BROADCAST if SMP
166 select GENERIC_CMOS_UPDATE
167 select GENERIC_CPU_AUTOPROBE
Michael Ellerman179ab1c2018-07-28 09:06:34 +1000168 select GENERIC_CPU_VULNERABILITIES if PPC_BARRIER_NOSPEC
Christophe Leroy265c3492019-09-12 13:49:43 +0000169 select GENERIC_EARLY_IOREMAP
Michael Ellermana7d24752017-03-06 22:53:59 +1100170 select GENERIC_IRQ_SHOW
171 select GENERIC_IRQ_SHOW_LEVEL
Christoph Hellwigeb01d422018-11-15 20:05:32 +0100172 select GENERIC_PCI_IOMAP if PCI
Michael Ellermana7d24752017-03-06 22:53:59 +1100173 select GENERIC_SMP_IDLE_THREAD
174 select GENERIC_STRNCPY_FROM_USER
175 select GENERIC_STRNLEN_USER
Paul Mackerrasd4cfb112017-05-27 18:04:52 +1000176 select GENERIC_TIME_VSYSCALL
Michael Ellermana7d24752017-03-06 22:53:59 +1100177 select HAVE_ARCH_AUDITSYSCALL
Nicholas Piggind909f912019-06-10 13:08:18 +1000178 select HAVE_ARCH_HUGE_VMAP if PPC_BOOK3S_64 && PPC_RADIX_MMU
Michael Ellermana7d24752017-03-06 22:53:59 +1100179 select HAVE_ARCH_JUMP_LABEL
Christophe Leroy888468c2020-05-28 10:17:04 +0000180 select HAVE_ARCH_KASAN if PPC32 && PPC_PAGE_SHIFT <= 14
181 select HAVE_ARCH_KASAN_VMALLOC if PPC32 && PPC_PAGE_SHIFT <= 14
Michael Ellermana7d24752017-03-06 22:53:59 +1100182 select HAVE_ARCH_KGDB
Michael Ellerman9fea59b2017-04-21 00:36:20 +1000183 select HAVE_ARCH_MMAP_RND_BITS
184 select HAVE_ARCH_MMAP_RND_COMPAT_BITS if COMPAT
Finn Thain20e07af2019-01-15 15:18:56 +1100185 select HAVE_ARCH_NVRAM_OPS
Michael Ellermana7d24752017-03-06 22:53:59 +1100186 select HAVE_ARCH_SECCOMP_FILTER
187 select HAVE_ARCH_TRACEHOOK
Masahiro Yamada2ff2b7e2019-08-19 14:54:20 +0900188 select HAVE_ASM_MODVERSIONS
Christophe Leroyf079bb32019-05-07 13:31:38 +0000189 select HAVE_C_RECORDMCOUNT
Michael Ellermana7d24752017-03-06 22:53:59 +1100190 select HAVE_CBPF_JIT if !PPC64
Michael Ellermanbf6cbd02018-10-12 22:09:09 +1100191 select HAVE_STACKPROTECTOR if PPC64 && $(cc-option,-mstack-protector-guard=tls -mstack-protector-guard-reg=r13)
192 select HAVE_STACKPROTECTOR if PPC32 && $(cc-option,-mstack-protector-guard=tls -mstack-protector-guard-reg=r2)
Michael Ellermana7d24752017-03-06 22:53:59 +1100193 select HAVE_CONTEXT_TRACKING if PPC64
Frederic Weisbecker490f5612020-01-27 16:41:52 +0100194 select HAVE_TIF_NOHZ if PPC64
Michael Ellermana7d24752017-03-06 22:53:59 +1100195 select HAVE_DEBUG_KMEMLEAK
196 select HAVE_DEBUG_STACKOVERFLOW
Michael Ellermana7d24752017-03-06 22:53:59 +1100197 select HAVE_DYNAMIC_FTRACE
198 select HAVE_DYNAMIC_FTRACE_WITH_REGS if MPROFILE_KERNEL
199 select HAVE_EBPF_JIT if PPC64
200 select HAVE_EFFICIENT_UNALIGNED_ACCESS if !(CPU_LITTLE_ENDIAN && POWER7_CPU)
Christoph Hellwig67a929e2019-07-11 20:57:14 -0700201 select HAVE_FAST_GUP
Michael Ellermana7d24752017-03-06 22:53:59 +1100202 select HAVE_FTRACE_MCOUNT_RECORD
Naveen N. Rao7cd01b02018-06-07 15:22:02 +0530203 select HAVE_FUNCTION_ERROR_INJECTION
Michael Ellermana7d24752017-03-06 22:53:59 +1100204 select HAVE_FUNCTION_GRAPH_TRACER
205 select HAVE_FUNCTION_TRACER
Masahiro Yamada8034c2f2018-05-28 18:22:05 +0900206 select HAVE_GCC_PLUGINS if GCC_VERSION >= 50200 # plugin support on gcc <= 5.1 is buggy on PPC
Michael Ellermana7d24752017-03-06 22:53:59 +1100207 select HAVE_HW_BREAKPOINT if PERF_EVENTS && (PPC_BOOK3S || PPC_8xx)
208 select HAVE_IDE
209 select HAVE_IOREMAP_PROT
210 select HAVE_IRQ_EXIT_ON_IRQ_STACK
211 select HAVE_KERNEL_GZIP
Christophe Leroy1cc9a212019-06-14 10:16:24 +0000212 select HAVE_KERNEL_LZMA if DEFAULT_UIMAGE
Christophe Leroy264bffa2019-06-14 10:16:25 +0000213 select HAVE_KERNEL_LZO if DEFAULT_UIMAGE
Christian Lamparter423bfc62019-01-31 21:59:04 +0100214 select HAVE_KERNEL_XZ if PPC_BOOK3S || 44x
Michael Ellermana7d24752017-03-06 22:53:59 +1100215 select HAVE_KPROBES
Naveen N. Raoead514d2017-04-19 18:22:26 +0530216 select HAVE_KPROBES_ON_FTRACE
Michael Ellermana7d24752017-03-06 22:53:59 +1100217 select HAVE_KRETPROBES
Nicholas Piggin4c1d9bb2018-05-09 23:00:01 +1000218 select HAVE_LD_DEAD_CODE_DATA_ELIMINATION
Michael Ellermana7d24752017-03-06 22:53:59 +1100219 select HAVE_LIVEPATCH if HAVE_DYNAMIC_FTRACE_WITH_REGS
Michael Ellermana7d24752017-03-06 22:53:59 +1100220 select HAVE_MOD_ARCH_SPECIFIC
Nicholas Piggin21041802017-07-12 14:35:52 -0700221 select HAVE_NMI if PERF_EVENTS || (PPC64 && PPC_BOOK3S)
222 select HAVE_HARDLOCKUP_DETECTOR_ARCH if (PPC64 && PPC_BOOK3S)
Michael Ellermana7d24752017-03-06 22:53:59 +1100223 select HAVE_OPROFILE
224 select HAVE_OPTPROBES if PPC64
225 select HAVE_PERF_EVENTS
226 select HAVE_PERF_EVENTS_NMI if PPC64
Nicholas Piggin92e5aae2017-08-18 15:15:51 -0700227 select HAVE_HARDLOCKUP_DETECTOR_PERF if PERF_EVENTS && HAVE_PERF_EVENTS_NMI && !HAVE_HARDLOCKUP_DETECTOR_ARCH
Michael Ellermana7d24752017-03-06 22:53:59 +1100228 select HAVE_PERF_REGS
229 select HAVE_PERF_USER_STACK_DUMP
Peter Zijlstraff2e6d722020-02-03 17:37:02 -0800230 select MMU_GATHER_RCU_TABLE_FREE
Peter Zijlstra3af4bd02020-02-03 17:37:05 -0800231 select MMU_GATHER_PAGE_SIZE
Michael Ellermana7d24752017-03-06 22:53:59 +1100232 select HAVE_REGS_AND_STACK_ACCESS_API
Nicolai Stangea50d3252019-01-31 16:41:50 +1100233 select HAVE_RELIABLE_STACKTRACE if PPC_BOOK3S_64 && CPU_LITTLE_ENDIAN
Michael Ellermana7d24752017-03-06 22:53:59 +1100234 select HAVE_SYSCALL_TRACEPOINTS
235 select HAVE_VIRT_CPU_ACCOUNTING
Anton Blanchard518470f2017-05-19 15:46:41 +1000236 select HAVE_IRQ_TIME_ACCOUNTING
Boqun Feng8a417c42018-06-02 08:44:00 -0400237 select HAVE_RSEQ
Christoph Hellwiga4ce5a42018-04-03 15:47:59 +0200238 select IOMMU_HELPER if PPC64
Michael Ellermana7d24752017-03-06 22:53:59 +1100239 select IRQ_DOMAIN
240 select IRQ_FORCED_THREADING
241 select MODULES_USE_ELF_RELA
Christoph Hellwig06832fc2018-07-30 09:37:21 +0200242 select NEED_DMA_MAP_STATE if PPC64 || NOT_COHERENT_CACHE
Christoph Hellwig86596f02018-04-05 09:44:52 +0200243 select NEED_SG_DMA_LENGTH
Stephen Rothwell10f85f42010-06-29 12:43:34 +1000244 select OF
Michael Ellermandabf6b32020-01-26 22:52:47 +1100245 select OF_DMA_DEFAULT_COHERENT if !NOT_COHERENT_CACHE
Stephen Neuendorffere6ce1322010-11-18 15:54:56 -0800246 select OF_EARLY_FLATTREE
Michael Ellermana7d24752017-03-06 22:53:59 +1100247 select OLD_SIGACTION if PPC32
Al Viro0980cae2012-12-25 16:23:09 -0500248 select OLD_SIGSUSPEND
Christoph Hellwig2eac9c22018-11-15 20:05:33 +0100249 select PCI_DOMAINS if PCI
Christoph Hellwig20f1b792018-11-15 20:05:34 +0100250 select PCI_SYSCALL if PCI
Michael Neulinga278e7e2019-06-04 13:00:37 +1000251 select PPC_DAWR if PPC64
Arnd Bergmann6e8cef32018-04-23 10:36:38 +0200252 select RTC_LIB
Michael Ellermana7d24752017-03-06 22:53:59 +1100253 select SPARSE_IRQ
254 select SYSCTL_EXCEPTION_TRACE
Christophe Leroyed1cd6d2019-01-31 10:08:58 +0000255 select THREAD_INFO_IN_TASK
Michael Ellermana7d24752017-03-06 22:53:59 +1100256 select VIRT_TO_BUS if !PPC64
257 #
258 # Please keep this list sorted alphabetically.
259 #
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000260
Michael Ellerman179ab1c2018-07-28 09:06:34 +1000261config PPC_BARRIER_NOSPEC
Enrico Weigelt, metux IT consult4f44e8a2019-07-03 18:04:13 +0200262 bool
263 default y
264 depends on PPC_BOOK3S_64 || PPC_FSL_BOOK3E
Michael Ellerman179ab1c2018-07-28 09:06:34 +1000265
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000266config EARLY_PRINTK
267 bool
Benjamin Herrenschmidt51d30822005-11-23 17:57:25 +1100268 default y
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000269
Jason Baronb71d47c2013-11-25 23:23:11 +0000270config PANIC_TIMEOUT
271 int
272 default 180
273
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000274config COMPAT
Michal Suchanek6e944ae2020-03-20 11:20:17 +0100275 bool "Enable support for 32bit binaries"
276 depends on PPC64
277 default y if !CPU_LITTLE_ENDIAN
Roland McGrath01e31db2008-01-02 17:03:11 -0800278 select COMPAT_BINFMT_ELF
Chris Metcalf48b25c42012-03-15 13:13:38 -0400279 select ARCH_WANT_OLD_COMPAT_IPC
Al Viro09a4d5d2012-12-25 19:27:42 -0500280 select COMPAT_OLD_SIGACTION
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000281
282config SYSVIPC_COMPAT
283 bool
284 depends on COMPAT && SYSVIPC
285 default y
286
Ingo Molnarae1e9132008-11-11 09:05:16 +0100287config SCHED_OMIT_FRAME_POINTER
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000288 bool
289 default y
290
291config ARCH_MAY_HAVE_PC_FDC
292 bool
Pranith Kumar3484a312014-08-18 17:13:41 -0400293 default PCI
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000294
Kumar Gala08264cb2006-01-10 21:43:56 -0600295config PPC_UDBG_16550
296 bool
Kumar Gala08264cb2006-01-10 21:43:56 -0600297
Kumar Gala08264cb2006-01-10 21:43:56 -0600298config GENERIC_TBSYNC
299 bool
300 default y if PPC32 && SMP
Kumar Gala08264cb2006-01-10 21:43:56 -0600301
Al Viroe65e1fc2006-09-12 03:04:40 -0400302config AUDIT_ARCH
303 bool
304 default y
305
Jeremy Fitzhardinge73c9cea2006-12-08 03:30:41 -0800306config GENERIC_BUG
307 bool
308 default y
309 depends on BUG
310
Johannes Bergb3028872007-03-20 05:18:02 +1100311config SYS_SUPPORTS_APM_EMULATION
Kumar Gala58da10b2007-05-23 09:51:46 -0500312 default y if PMAC_APM_EMU
Johannes Bergb3028872007-03-20 05:18:02 +1100313 bool
314
David Gibson6c5b59b2011-04-14 18:29:16 +0000315config EPAPR_BOOT
316 bool
317 help
318 Used to allow a board to specify it wants an ePAPR compliant wrapper.
David Gibson6c5b59b2011-04-14 18:29:16 +0000319
Kumar Galaf4fc4a52006-01-16 10:53:22 -0600320config DEFAULT_UIMAGE
321 bool
322 help
323 Used to allow a board to specify it wants a uImage built by default
Kumar Galaf4fc4a52006-01-16 10:53:22 -0600324
Johannes Berg801e4062007-12-08 02:12:39 +0100325config ARCH_HIBERNATION_POSSIBLE
326 bool
Johannes Berg543b9fd2007-05-03 22:31:38 +1000327 default y
328
Johannes Bergf4cb5702007-12-08 02:14:00 +0100329config ARCH_SUSPEND_POSSIBLE
330 def_bool y
Anton Vorontsov4ffd6952009-09-16 01:43:57 +0400331 depends on ADB_PMU || PPC_EFIKA || PPC_LITE5200 || PPC_83xx || \
Zhao Chenhuid0832a72012-07-20 20:42:36 +0800332 (PPC_85xx && !PPC_E500MC) || PPC_86xx || PPC_PSERIES \
333 || 44x || 40x
Johannes Bergf4cb5702007-12-08 02:14:00 +0100334
Nicholas Piggin9ca12ac2019-04-11 13:34:46 +1000335config ARCH_SUSPEND_NONZERO_CPU
336 def_bool y
337 depends on PPC_POWERNV || PPC_PSERIES
338
Benjamin Herrenschmidt4c75a6f2006-11-11 17:24:53 +1100339config PPC_DCR_NATIVE
340 bool
Benjamin Herrenschmidt4c75a6f2006-11-11 17:24:53 +1100341
342config PPC_DCR_MMIO
343 bool
Benjamin Herrenschmidt4c75a6f2006-11-11 17:24:53 +1100344
345config PPC_DCR
346 bool
347 depends on PPC_DCR_NATIVE || PPC_DCR_MMIO
348 default y
349
Benjamin Herrenschmidt4c9d2802006-11-11 17:25:08 +1100350config PPC_OF_PLATFORM_PCI
351 bool
Stephen Rothwell373a6da2007-12-21 15:37:07 +1100352 depends on PCI
Benjamin Herrenschmidt4c9d2802006-11-11 17:25:08 +1100353 depends on PPC64 # not supported on 32 bits yet
Benjamin Herrenschmidt4c9d2802006-11-11 17:25:08 +1100354
Akinobu Mita6a11f752009-03-31 15:23:17 -0700355config ARCH_SUPPORTS_DEBUG_PAGEALLOC
Michael Ellerman4e003742017-10-19 15:08:43 +1100356 depends on PPC32 || PPC_BOOK3S_64
Akinobu Mita6a11f752009-03-31 15:23:17 -0700357 def_bool y
358
Ananth N Mavinakayanahalli8b7b80b2012-08-23 21:31:32 +0000359config ARCH_SUPPORTS_UPROBES
360 def_bool y
361
Dave Kleikamp172ae2e2010-02-08 11:50:57 +0000362config PPC_ADV_DEBUG_REGS
363 bool
364 depends on 40x || BOOKE
365 default y
366
367config PPC_ADV_DEBUG_IACS
368 int
369 depends on PPC_ADV_DEBUG_REGS
370 default 4 if 44x
371 default 2
372
373config PPC_ADV_DEBUG_DACS
374 int
375 depends on PPC_ADV_DEBUG_REGS
376 default 2
377
378config PPC_ADV_DEBUG_DVCS
379 int
380 depends on PPC_ADV_DEBUG_REGS
381 default 2 if 44x
382 default 0
383
384config PPC_ADV_DEBUG_DAC_RANGE
385 bool
386 depends on PPC_ADV_DEBUG_REGS && 44x
387 default y
388
Michael Neulinga278e7e2019-06-04 13:00:37 +1000389config PPC_DAWR
390 bool
391
Christoph Hellwig25078dc2018-12-16 17:53:49 +0100392config ZONE_DMA
Scott Wood1c980252014-08-08 18:40:42 -0500393 bool
Christoph Hellwig25078dc2018-12-16 17:53:49 +0100394 default y if PPC_BOOK3E_64
Scott Wood1c980252014-08-08 18:40:42 -0500395
Kirill A. Shutemov06ef42a2015-04-14 15:45:57 -0700396config PGTABLE_LEVELS
397 int
398 default 2 if !PPC64
Kirill A. Shutemov06ef42a2015-04-14 15:45:57 -0700399 default 4
400
Benjamin Herrenschmidta2d2e1e2007-12-21 15:39:24 +1100401source "arch/powerpc/sysdev/Kconfig"
Kumar Gala4330f5d2007-03-16 09:32:17 -0500402source "arch/powerpc/platforms/Kconfig"
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000403
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000404menu "Kernel options"
405
406config HIGHMEM
407 bool "High memory support"
408 depends on PPC32
409
Masahiro Yamada8636a1f2018-12-11 20:01:04 +0900410source "kernel/Kconfig.hz"
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000411
Mel Gormanba72cb82007-11-28 16:21:13 -0800412config HUGETLB_PAGE_SIZE_VARIABLE
413 bool
Christophe Leroyc5710cd22019-04-26 05:59:48 +0000414 depends on HUGETLB_PAGE && PPC_BOOK3S_64
Mel Gormanba72cb82007-11-28 16:21:13 -0800415 default y
416
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000417config MATH_EMULATION
418 bool "Math emulation"
Christophe Leroy968159c2017-08-08 13:58:54 +0200419 depends on 4xx || PPC_8xx || PPC_MPC832x || BOOKE
Enrico Weigelt, metux IT consult4f44e8a2019-07-03 18:04:13 +0200420 help
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000421 Some PowerPC chips designed for embedded applications do not have
422 a floating-point unit and therefore do not implement the
423 floating-point instructions in the PowerPC instruction set. If you
424 say Y here, the kernel will include code to emulate a floating-point
425 unit, which will allow programs that use floating-point
426 instructions to run.
427
Benjamin Herrenschmidt4e63f8e2013-06-09 17:01:24 +1000428 This is also useful to emulate missing (optional) instructions
429 such as fsqrt on cores that do have an FPU but do not implement
430 them (such as Freescale BookE).
431
Kevin Haoe05c0e82013-07-16 19:57:15 +0800432choice
433 prompt "Math emulation options"
434 default MATH_EMULATION_FULL
435 depends on MATH_EMULATION
436
437config MATH_EMULATION_FULL
438 bool "Emulate all the floating point instructions"
Enrico Weigelt, metux IT consult4f44e8a2019-07-03 18:04:13 +0200439 help
Kevin Haoe05c0e82013-07-16 19:57:15 +0800440 Select this option will enable the kernel to support to emulate
441 all the floating point instructions. If your SoC doesn't have
442 a FPU, you should select this.
443
444config MATH_EMULATION_HW_UNIMPLEMENTED
445 bool "Just emulate the FPU unimplemented instructions"
Enrico Weigelt, metux IT consult4f44e8a2019-07-03 18:04:13 +0200446 help
Kevin Haoe05c0e82013-07-16 19:57:15 +0800447 Select this if you know there does have a hardware FPU on your
448 SoC, but some floating point instructions are not implemented by that.
449
450endchoice
451
Michael Neuling3d72bbc2013-02-13 16:21:43 +0000452config PPC_TRANSACTIONAL_MEM
Enrico Weigelt, metux IT consult4f44e8a2019-07-03 18:04:13 +0200453 bool "Transactional Memory support for POWERPC"
454 depends on PPC_BOOK3S_64
455 depends on SMP
456 select ALTIVEC
457 select VSX
458 help
459 Support user-mode Transactional Memory on POWERPC.
Michael Neuling3d72bbc2013-02-13 16:21:43 +0000460
Anshuman Khandual013a53f2019-11-25 08:36:31 +0530461config PPC_UV
462 bool "Ultravisor support"
463 depends on KVM_BOOK3S_HV_POSSIBLE
Bharata B Raoa2db55d2020-01-09 14:50:47 +0530464 depends on DEVICE_PRIVATE
Anshuman Khandual013a53f2019-11-25 08:36:31 +0530465 default n
466 help
467 This option paravirtualizes the kernel to run in POWER platforms that
468 supports the Protected Execution Facility (PEF). On such platforms,
469 the ultravisor firmware runs at a privilege level above the
470 hypervisor.
471
472 If unsure, say "N".
473
Nicholas Piggin951eede2017-05-29 17:39:40 +1000474config LD_HEAD_STUB_CATCH
475 bool "Reserve 256 bytes to cope with linker stubs in HEAD text" if EXPERT
476 depends on PPC64
Nicholas Piggin951eede2017-05-29 17:39:40 +1000477 help
478 Very large kernels can cause linker branch stubs to be generated by
479 code in head_64.S, which moves the head text sections out of their
480 specified location. This option can work around the problem.
481
482 If unsure, say "N".
483
Torsten Duwe8c50b722016-03-03 15:27:00 +1100484config MPROFILE_KERNEL
Naveen N. Rao57b3ed92020-04-22 14:56:12 +0530485 depends on PPC64 && CPU_LITTLE_ENDIAN && FUNCTION_TRACER
Nicholas Pigginabba7592018-05-30 22:19:22 +1000486 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 +1100487
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000488config HOTPLUG_CPU
489 bool "Support for enabling/disabling CPUs"
Stephen Rothwell40b31362013-05-21 13:49:35 +1000490 depends on SMP && (PPC_PSERIES || \
Randy Dunlap76be4412020-01-28 18:22:25 -0800491 PPC_PMAC || PPC_POWERNV || FSL_SOC_BOOKE)
Enrico Weigelt, metux IT consult4f44e8a2019-07-03 18:04:13 +0200492 help
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000493 Say Y here to be able to disable and re-enable individual
494 CPUs at runtime on SMP machines.
495
496 Say N if you are unsure.
497
Nicholas Pigginaa65ff62020-07-24 23:14:20 +1000498config PPC_QUEUED_SPINLOCKS
499 bool "Queued spinlocks"
500 depends on SMP
501 help
502 Say Y here to use queued spinlocks which give better scalability and
503 fairness on large SMP and NUMA systems without harming single threaded
504 performance.
505
506 This option is currently experimental, the code is more complex and
507 less tested so it defaults to "N" for the moment.
508
509 If unsure, say "N".
510
Nathan Fontenot12633e82009-11-25 17:23:25 +0000511config ARCH_CPU_PROBE_RELEASE
512 def_bool y
513 depends on HOTPLUG_CPU
514
Yasunori Gotocc576372006-06-29 02:24:27 -0700515config ARCH_ENABLE_MEMORY_HOTPLUG
516 def_bool y
517
Badari Pulavarty14824712008-02-05 00:10:17 -0800518config ARCH_ENABLE_MEMORY_HOTREMOVE
519 def_bool y
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
Thiago Jung Bauermann467d2782016-12-19 16:22:32 -0800548 select HAVE_IMA_KEXEC
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
659 bool "NUMA support"
660 depends on PPC64
661 default y if SMP && PPC_PSERIES
662
Yasunori Gotoc80d79d2006-04-10 22:53:53 -0700663config NODES_SHIFT
664 int
Anton Blanchardea55bf22009-09-21 19:56:43 +0000665 default "8" if PPC64
Yasunori Gotoc80d79d2006-04-10 22:53:53 -0700666 default "4"
667 depends on NEED_MULTIPLE_NODES
668
Nishanth Aravamudan8c272262014-05-19 11:14:23 -0700669config USE_PERCPU_NUMA_NODE_ID
670 def_bool y
671 depends on NUMA
672
Nishanth Aravamudan64bb80d2014-05-16 16:41:20 -0700673config HAVE_MEMORYLESS_NODES
674 def_bool y
675 depends on NUMA
676
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000677config ARCH_SELECT_MEMORY_MODEL
678 def_bool y
679 depends on PPC64
680
681config ARCH_FLATMEM_ENABLE
Andy Whitcroft9100b202005-11-29 19:20:55 +0000682 def_bool y
683 depends on (PPC64 && !NUMA) || PPC32
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000684
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000685config ARCH_SPARSEMEM_ENABLE
686 def_bool y
Andy Whitcroft9100b202005-11-29 19:20:55 +0000687 depends on PPC64
Andy Whitcroftd29eff7bc2007-10-16 01:24:17 -0700688 select SPARSEMEM_VMEMMAP_ENABLE
Anton Blanchard45fb6ce2005-11-11 14:22:35 +1100689
690config ARCH_SPARSEMEM_DEFAULT
691 def_bool y
Michael Ellerman7b3912f2017-04-05 16:10:48 +1000692 depends on PPC_BOOK3S_64
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000693
Benjamin Herrenschmidt5a1eb5c2009-10-30 15:03:54 +1100694config SYS_SUPPORTS_HUGETLBFS
Becky Bruce41151e72011-06-28 09:54:48 +0000695 bool
Benjamin Herrenschmidt5a1eb5c2009-10-30 15:03:54 +1100696
Michael Ellermanf6853eb2016-11-15 21:59:38 +1100697config ILLEGAL_POINTER_VALUE
698 hex
699 # This is roughly half way between the top of user space and the bottom
700 # of kernel space, which seems about as good as we can get.
701 default 0x5deadbeef0000000 if PPC64
702 default 0
703
Mike Kravetz7e9191d2005-11-07 09:39:48 -0800704config ARCH_MEMORY_PROBE
705 def_bool y
706 depends on MEMORY_HOTPLUG
707
Yuri Tikhonove1240122009-01-29 01:40:44 +0000708config STDBINUTILS
709 bool "Using standard binutils settings"
710 depends on 44x
711 default y
712 help
713 Turning this option off allows you to select 256KB PAGE_SIZE on 44x.
714 Note, that kernel will be able to run only those applications,
715 which had been compiled using binutils later than 2.17.50.0.3 with
716 '-zmax-page-size' set to 256K (the default is 64K). Or, if using
717 the older binutils, you can patch them with a trivial patch, which
718 changes the ELF_MAXPAGESIZE definition from 0x10000 to 0x40000.
719
Ilya Yanokca9153a2008-12-11 04:55:41 +0300720choice
721 prompt "Page size"
722 default PPC_4K_PAGES
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100723 help
Ilya Yanokca9153a2008-12-11 04:55:41 +0300724 Select the kernel logical page size. Increasing the page size
725 will reduce software overhead at each page boundary, allow
726 hardware prefetch mechanisms to be more effective, and allow
727 larger dma transfers increasing IO efficiency and reducing
728 overhead. However the utilization of memory will increase.
729 For example, each cached file will using a multiple of the
730 page size to hold its contents and the difference between the
731 end of file and the end of page is wasted.
732
733 Some dedicated systems, such as software raid serving with
734 accelerated calculations, have shown significant increases.
735
736 If you configure a 64 bit kernel for 64k pages but the
737 processor does not support them, then the kernel will simulate
738 them with 4k pages, loading them on demand, but with the
739 reduced software overhead and larger internal fragmentation.
740 For the 32 bit kernel, a large page option will not be offered
741 unless it is supported by the configured processor.
742
743 If unsure, choose 4K_PAGES.
744
745config PPC_4K_PAGES
746 bool "4k page size"
Aneesh Kumar K.V19f97c92016-01-29 22:32:49 +0530747 select HAVE_ARCH_SOFT_DIRTY if PPC_BOOK3S_64
Ilya Yanokca9153a2008-12-11 04:55:41 +0300748
749config PPC_16K_PAGES
Michael Ellerman55f8b5b2015-08-07 16:19:46 +1000750 bool "16k page size"
Christophe Leroy55c8fc3f2018-11-29 14:07:21 +0000751 depends on 44x || PPC_8xx
Ilya Yanokca9153a2008-12-11 04:55:41 +0300752
753config PPC_64K_PAGES
Michael Ellerman55f8b5b2015-08-07 16:19:46 +1000754 bool "64k page size"
Michael Ellermanbba43632019-02-08 23:34:16 +1100755 depends on 44x || PPC_BOOK3S_64
Aneesh Kumar K.V19f97c92016-01-29 22:32:49 +0530756 select HAVE_ARCH_SOFT_DIRTY if PPC_BOOK3S_64
Ilya Yanokca9153a2008-12-11 04:55:41 +0300757
Yuri Tikhonove1240122009-01-29 01:40:44 +0000758config PPC_256K_PAGES
Michael Ellerman55f8b5b2015-08-07 16:19:46 +1000759 bool "256k page size"
760 depends on 44x && !STDBINUTILS
Yuri Tikhonove1240122009-01-29 01:40:44 +0000761 help
762 Make the page size 256k.
763
764 As the ELF standard only requires alignment to support page
765 sizes up to 64k, you will need to compile all of your user
766 space applications with a non-standard binutils settings
767 (see the STDBINUTILS description for details).
768
769 Say N unless you know what you are doing.
770
Ilya Yanokca9153a2008-12-11 04:55:41 +0300771endchoice
Benjamin Herrenschmidt3c726f82005-11-07 11:06:55 +1100772
Christophe Leroy555f4fd2019-02-21 19:08:46 +0000773config PPC_PAGE_SHIFT
774 int
775 default 18 if PPC_256K_PAGES
776 default 16 if PPC_64K_PAGES
777 default 14 if PPC_16K_PAGES
778 default 12
779
Hamish Martin47613402017-02-24 13:52:09 +1300780config THREAD_SHIFT
781 int "Thread shift" if EXPERT
782 range 13 15
783 default "15" if PPC_256K_PAGES
784 default "14" if PPC64
Christophe Leroyedbadaf2020-04-08 15:58:49 +0000785 default "14" if KASAN
Hamish Martin47613402017-02-24 13:52:09 +1300786 default "13"
787 help
788 Used to define the stack size. The default is almost always what you
789 want. Only change this if you know what you are doing.
790
Christophe Leroy0f4a9042019-02-21 19:08:50 +0000791config DATA_SHIFT_BOOL
Christophe Leroyda1adea2020-05-19 05:49:25 +0000792 bool "Set custom data alignment"
Christophe Leroy0f4a9042019-02-21 19:08:50 +0000793 depends on ADVANCED_OPTIONS
Christophe Leroyfcdafd12020-05-19 05:49:26 +0000794 depends on STRICT_KERNEL_RWX || DEBUG_PAGEALLOC
795 depends on PPC_BOOK3S_32 || (PPC_8xx && !PIN_TLB_DATA && \
796 (!PIN_TLB_TEXT || !STRICT_KERNEL_RWX))
Christophe Leroy0f4a9042019-02-21 19:08:50 +0000797 help
798 This option allows you to set the kernel data alignment. When
799 RAM is mapped by blocks, the alignment needs to fit the size and
800 number of possible blocks. The default should be OK for most configs.
801
802 Say N here unless you know what you are doing.
Christophe Leroy166d97d2019-02-21 19:08:47 +0000803
804config DATA_SHIFT
Christophe Leroy0f4a9042019-02-21 19:08:50 +0000805 int "Data shift" if DATA_SHIFT_BOOL
Christophe Leroy166d97d2019-02-21 19:08:47 +0000806 default 24 if STRICT_KERNEL_RWX && PPC64
Christophe Leroyfcdafd12020-05-19 05:49:26 +0000807 range 17 28 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC) && PPC_BOOK3S_32
808 range 19 23 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC) && PPC_8xx
Christophe Leroy63b2bc62019-02-21 19:08:49 +0000809 default 22 if STRICT_KERNEL_RWX && PPC_BOOK3S_32
Christophe Leroy2b279c02020-05-19 05:49:28 +0000810 default 18 if DEBUG_PAGEALLOC && PPC_BOOK3S_32
Christophe Leroy8f54a6f2019-02-21 19:08:52 +0000811 default 23 if STRICT_KERNEL_RWX && PPC_8xx
Christophe Leroyfcdafd12020-05-19 05:49:26 +0000812 default 23 if DEBUG_PAGEALLOC && PPC_8xx && PIN_TLB_DATA
813 default 19 if DEBUG_PAGEALLOC && PPC_8xx
Christophe Leroy166d97d2019-02-21 19:08:47 +0000814 default PPC_PAGE_SHIFT
Christophe Leroy0f4a9042019-02-21 19:08:50 +0000815 help
816 On Book3S 32 (603+), DBATs are used to map kernel text and rodata RO.
817 Smaller is the alignment, greater is the number of necessary DBATs.
Christophe Leroy166d97d2019-02-21 19:08:47 +0000818
Christophe Leroy8f54a6f2019-02-21 19:08:52 +0000819 On 8xx, large pages (512kb or 8M) are used to map kernel linear
820 memory. Aligning to 8M reduces TLB misses as only 8M pages are used
Christophe Leroyda1adea2020-05-19 05:49:25 +0000821 in that case. If PIN_TLB is selected, it must be aligned to 8M as
822 8M pages will be pinned.
Christophe Leroy8f54a6f2019-02-21 19:08:52 +0000823
Stephen Rothwell53bcddb2008-04-11 11:11:56 +1000824config FORCE_MAX_ZONEORDER
825 int "Maximum zone order"
Rashmica Guptaa7ee5392016-02-19 16:38:47 +1100826 range 8 9 if PPC64 && PPC_64K_PAGES
Benjamin Herrenschmidt066c4b82009-07-21 15:25:53 +0000827 default "9" if PPC64 && PPC_64K_PAGES
Aneesh Kumar K.Vd5a1e422016-09-19 23:01:33 +0530828 range 13 13 if PPC64 && !PPC_64K_PAGES
Benjamin Herrenschmidt066c4b82009-07-21 15:25:53 +0000829 default "13" if PPC64 && !PPC_64K_PAGES
830 range 9 64 if PPC32 && PPC_16K_PAGES
831 default "9" if PPC32 && PPC_16K_PAGES
832 range 7 64 if PPC32 && PPC_64K_PAGES
833 default "7" if PPC32 && PPC_64K_PAGES
834 range 5 64 if PPC32 && PPC_256K_PAGES
835 default "5" if PPC32 && PPC_256K_PAGES
Johannes Bergebe40c52008-09-24 04:29:08 +0000836 range 11 64
Stephen Rothwell53bcddb2008-04-11 11:11:56 +1000837 default "11"
838 help
839 The kernel memory allocator divides physically contiguous memory
840 blocks into "zones", where each zone is a power of two number of
841 pages. This option selects the largest power of two that the kernel
842 keeps in the memory allocator. If you need to allocate very large
843 blocks of physically contiguous memory, then you may need to
844 increase this value.
845
846 This config option is actually maximum order plus one. For example,
847 a value of 11 means that the largest free memory block is 2^10 pages.
848
849 The page size is not necessarily 4KB. For example, on 64-bit
850 systems, 64KB pages can be enabled via CONFIG_PPC_64K_PAGES. Keep
851 this in mind when choosing a value for this option.
852
Paul Mackerrasfa282372008-01-24 08:35:13 +1100853config PPC_SUBPAGE_PROT
Nicholas Piggin63396ad2020-07-03 11:19:58 +1000854 bool "Support setting protections for 4k subpages (subpage_prot syscall)"
855 default n
Michael Ellerman4e003742017-10-19 15:08:43 +1100856 depends on PPC_BOOK3S_64 && PPC_64K_PAGES
Paul Mackerrasfa282372008-01-24 08:35:13 +1100857 help
Nicholas Piggin63396ad2020-07-03 11:19:58 +1000858 This option adds support for system call to allow user programs
Paul Mackerrasfa282372008-01-24 08:35:13 +1100859 to set access permissions (read/write, readonly, or no access)
860 on the 4k subpages of each 64k page.
861
Nicholas Piggin63396ad2020-07-03 11:19:58 +1000862 If unsure, say N here.
863
Ian Munsiee83d0162014-10-08 19:54:50 +1100864config PPC_COPRO_BASE
865 bool
Ian Munsiee83d0162014-10-08 19:54:50 +1100866
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000867config SCHED_SMT
868 bool "SMT (Hyperthreading) scheduler support"
869 depends on PPC64 && SMP
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000870 help
871 SMT scheduler support improves the CPU scheduler's decision making
872 when dealing with POWER5 cpus at a cost of slightly increased
873 overhead in some places. If unsure say N here.
874
Michael Neulingb92a66a2012-09-10 00:35:26 +0000875config PPC_DENORMALISATION
876 bool "PowerPC denormalisation exception handling"
877 depends on PPC_BOOK3S_64
Anton Blanchard4e90a2a2013-07-31 16:31:26 +1000878 default "y" if PPC_POWERNV
Enrico Weigelt, metux IT consult4f44e8a2019-07-03 18:04:13 +0200879 help
Michael Neulingb92a66a2012-09-10 00:35:26 +0000880 Add support for handling denormalisation of single precision
881 values. Useful for bare metal only. If unsure say Y here.
882
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000883config CMDLINE
Chris Packhamf134a7c2020-06-12 10:42:19 +1200884 string "Initial kernel command string"
Christophe Leroycbe46bd2019-04-26 16:23:27 +0000885 default ""
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000886 help
887 On some platforms, there is currently no way for the boot loader to
888 pass arguments to the kernel. For these platforms, you can supply
889 some command-line options at build time by entering them here. In
890 most cases you will need to specify the root device here.
891
Chris Packhamd79fbb32019-08-02 10:50:06 +1200892choice
893 prompt "Kernel command line type" if CMDLINE != ""
894 default CMDLINE_FROM_BOOTLOADER
895
896config CMDLINE_FROM_BOOTLOADER
897 bool "Use bootloader kernel arguments if available"
898 help
899 Uses the command-line options passed by the boot loader. If
900 the boot loader doesn't provide any, the default kernel command
901 string provided in CMDLINE will be used.
902
903config CMDLINE_EXTEND
904 bool "Extend bootloader kernel arguments"
905 help
906 The command-line arguments provided by the boot loader will be
907 appended to the default kernel command string.
908
Sebastian Siewioreb3b80f2014-02-20 21:48:17 +0100909config CMDLINE_FORCE
910 bool "Always use the default kernel command string"
Sebastian Siewioreb3b80f2014-02-20 21:48:17 +0100911 help
912 Always use the default kernel command string, even if the boot
913 loader passes other arguments to the kernel.
914 This is useful if you cannot or don't want to change the
915 command-line options your boot loader passes to the kernel.
916
Chris Packhamd79fbb32019-08-02 10:50:06 +1200917endchoice
918
Grant Likelyc356aa42008-07-09 09:41:52 -0600919config EXTRA_TARGETS
920 string "Additional default image types"
921 help
922 List additional targets to be built by the bootwrapper here (separated
923 by spaces). This is useful for targets that depend of device tree
924 files in the .dts directory.
925
926 Targets in this list will be build as part of the default build
927 target, or when the user does a 'make zImage' or a
928 'make zImage.initrd'.
929
930 If unsure, leave blank
931
Johannes Bergb28f5082008-01-15 23:17:00 -0500932config ARCH_WANTS_FREEZER_CONTROL
933 def_bool y
934 depends on ADB_PMU
935
Masahiro Yamada8636a1f2018-12-11 20:01:04 +0900936source "kernel/power/Kconfig"
Paul Mackerras14cf11a2005-09-26 16:04:21 +1000937
938config SECCOMP
939 bool "Enable seccomp to safely compute untrusted bytecode"
940 depends on PROC_FS
941 default y
942 help
943 This kernel feature is useful for number crunching applications
944 that may need to compute untrusted bytecode during their
945 execution. By using pipes or other transports made available to
946 the process as file descriptors supporting the read/write
947 syscalls, it's possible to isolate those applications in
948 their own address space using seccomp. Once seccomp is
949 enabled via /proc/<pid>/seccomp, it cannot be disabled
950 and the task is only allowed to execute a few safe syscalls
951 defined by each seccomp mode.
952
953 If unsure, say Y. Only embedded should say N here.
954
Ram Pai92e3da32018-01-18 17:50:24 -0800955config PPC_MEM_KEYS
956 prompt "PowerPC Memory Protection Keys"
957 def_bool y
958 depends on PPC_BOOK3S_64
959 select ARCH_USES_HIGH_VMA_FLAGS
960 select ARCH_HAS_PKEYS
961 help
962 Memory Protection Keys provides a mechanism for enforcing
963 page-based protections, but without requiring modification of the
964 page tables when an application changes protection domains.
965
Mauro Carvalho Chehab1eecbcd2019-06-07 15:54:31 -0300966 For details, see Documentation/core-api/protection-keys.rst
Ram Pai92e3da32018-01-18 17:50:24 -0800967
968 If unsure, say y.
969
Nayna Jain1a8916e2019-11-05 17:00:22 -0600970config PPC_SECURE_BOOT
971 prompt "Enable secure boot support"
972 bool
973 depends on PPC_POWERNV
Nayna Jain4238fad2019-10-30 23:31:27 -0400974 depends on IMA_ARCH_POLICY
Nayna Jain9e2b4be2020-03-08 20:57:51 -0400975 imply IMA_SECURE_AND_OR_TRUSTED_BOOT
Nayna Jain1a8916e2019-11-05 17:00:22 -0600976 help
977 Systems with firmware secure boot enabled need to define security
978 policies to extend secure boot to the OS. This config allows a user
979 to enable OS secure boot on systems that have firmware support for
980 it. If in doubt say N.
981
Nayna Jainbd5d9c72019-11-10 21:10:34 -0600982config PPC_SECVAR_SYSFS
983 bool "Enable sysfs interface for POWER secure variables"
984 default y
985 depends on PPC_SECURE_BOOT
986 depends on SYSFS
987 help
988 POWER secure variables are managed and controlled by firmware.
989 These variables are exposed to userspace via sysfs to enable
990 read/write operations on these variables. Say Y if you have
991 secure boot enabled and want to expose variables to userspace.
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
1133 default 3
1134
Suzuki Poulose0f890c82011-12-14 22:57:15 +00001135config DYNAMIC_MEMSTART
Kees Cook642e56f2013-01-16 18:53:25 -08001136 bool "Enable page aligned dynamic load address for kernel"
1137 depends on ADVANCED_OPTIONS && FLATMEM && (FSL_BOOKE || 44x)
Suzuki Poulose0f890c82011-12-14 22:57:15 +00001138 select NONSTATIC_KERNEL
Kumar Gala37dd2ba2008-04-22 04:22:34 +10001139 help
Suzuki Poulose0f890c82011-12-14 22:57:15 +00001140 This option enables the kernel to be loaded at any page aligned
Enrico Weigelt, metux IT consult4f44e8a2019-07-03 18:04:13 +02001141 physical address. The kernel creates a mapping from KERNELBASE to
Suzuki Poulose0f890c82011-12-14 22:57:15 +00001142 the address where the kernel is loaded. The page size here implies
1143 the TLB page size of the mapping for kernel on the particular platform.
1144 Please refer to the init code for finding the TLB page size.
Kumar Gala37dd2ba2008-04-22 04:22:34 +10001145
Suzuki Poulose0f890c82011-12-14 22:57:15 +00001146 DYNAMIC_MEMSTART is an easy way of implementing pseudo-RELOCATABLE
1147 kernel image, where the only restriction is the page aligned kernel
Enrico Weigelt, metux IT consult4f44e8a2019-07-03 18:04:13 +02001148 load address. When this option is enabled, the compile time physical
Suzuki Poulose0f890c82011-12-14 22:57:15 +00001149 address CONFIG_PHYSICAL_START is ignored.
Kumar Gala37dd2ba2008-04-22 04:22:34 +10001150
Suzuki Poulose9c5f7d32011-12-14 22:58:12 +00001151 This option is overridden by CONFIG_RELOCATABLE
1152
Kumar Gala37dd2ba2008-04-22 04:22:34 +10001153config PAGE_OFFSET_BOOL
1154 bool "Set custom page offset address"
1155 depends on ADVANCED_OPTIONS
1156 help
1157 This option allows you to set the kernel virtual address at which
1158 the kernel will map low memory. This can be useful in optimizing
1159 the virtual memory layout of the system.
1160
1161 Say N here unless you know what you are doing.
1162
1163config PAGE_OFFSET
1164 hex "Virtual address of memory base" if PAGE_OFFSET_BOOL
1165 default "0xc0000000"
1166
Paul Mackerras14cf11a2005-09-26 16:04:21 +10001167config KERNEL_START_BOOL
1168 bool "Set custom kernel base address"
1169 depends on ADVANCED_OPTIONS
1170 help
1171 This option allows you to set the kernel virtual address at which
Kumar Gala37dd2ba2008-04-22 04:22:34 +10001172 the kernel will be loaded. Normally this should match PAGE_OFFSET
1173 however there are times (like kdump) that one might not want them
1174 to be the same.
Paul Mackerras14cf11a2005-09-26 16:04:21 +10001175
1176 Say N here unless you know what you are doing.
1177
1178config KERNEL_START
1179 hex "Virtual address of kernel base" if KERNEL_START_BOOL
Kumar Gala37dd2ba2008-04-22 04:22:34 +10001180 default PAGE_OFFSET if PAGE_OFFSET_BOOL
Suzuki Poulose0f890c82011-12-14 22:57:15 +00001181 default "0xc2000000" if CRASH_DUMP && !NONSTATIC_KERNEL
Paul Mackerras14cf11a2005-09-26 16:04:21 +10001182 default "0xc0000000"
1183
Kumar Gala37dd2ba2008-04-22 04:22:34 +10001184config PHYSICAL_START_BOOL
1185 bool "Set physical address where the kernel is loaded"
1186 depends on ADVANCED_OPTIONS && FLATMEM && FSL_BOOKE
1187 help
1188 This gives the physical address where the kernel is loaded.
1189
1190 Say N here unless you know what you are doing.
1191
1192config PHYSICAL_START
1193 hex "Physical address where the kernel is loaded" if PHYSICAL_START_BOOL
Christophe Leroy26598f22018-11-17 10:25:07 +00001194 default "0x02000000" if PPC_BOOK3S && CRASH_DUMP && !NONSTATIC_KERNEL
Kumar Gala37dd2ba2008-04-22 04:22:34 +10001195 default "0x00000000"
1196
1197config PHYSICAL_ALIGN
1198 hex
Trent Piephoc8f35702008-12-08 19:34:59 -08001199 default "0x04000000" if FSL_BOOKE
Kumar Gala37dd2ba2008-04-22 04:22:34 +10001200 help
1201 This value puts the alignment restrictions on physical address
1202 where kernel is loaded and run from. Kernel is compiled for an
1203 address which meets above alignment restriction.
1204
Paul Mackerras14cf11a2005-09-26 16:04:21 +10001205config TASK_SIZE_BOOL
1206 bool "Set custom user task size"
1207 depends on ADVANCED_OPTIONS
1208 help
1209 This option allows you to set the amount of virtual address space
1210 allocated to user tasks. This can be useful in optimizing the
1211 virtual memory layout of the system.
1212
1213 Say N here unless you know what you are doing.
1214
1215config TASK_SIZE
1216 hex "Size of user task space" if TASK_SIZE_BOOL
Paul Bolle933ee712013-03-27 00:47:03 +00001217 default "0x80000000" if PPC_8xx
Christophe Leroy6ca05532020-06-29 11:15:26 +00001218 default "0xb0000000" if PPC_BOOK3S_32 && STRICT_KERNEL_RWX
Kumar Gala4d9e55102007-10-11 13:40:21 -05001219 default "0xc0000000"
Paul Mackerras14cf11a2005-09-26 16:04:21 +10001220endmenu
1221
Stephen Rothwellcabb5582005-09-30 16:16:52 +10001222if PPC64
Paul Mackerrasbdbc29c2013-08-27 16:07:49 +10001223# This value must have zeroes in the bottom 60 bits otherwise lots will break
Kumar Gala37dd2ba2008-04-22 04:22:34 +10001224config PAGE_OFFSET
Stephen Rothwellcabb5582005-09-30 16:16:52 +10001225 hex
Stephen Rothwelleeb2d212005-09-30 17:24:15 +10001226 default "0xc000000000000000"
Kumar Gala37dd2ba2008-04-22 04:22:34 +10001227config KERNEL_START
1228 hex
Kumar Gala37dd2ba2008-04-22 04:22:34 +10001229 default "0xc000000000000000"
1230config PHYSICAL_START
1231 hex
Kumar Gala37dd2ba2008-04-22 04:22:34 +10001232 default "0x00000000"
Stephen Rothwellcabb5582005-09-30 16:16:52 +10001233endif
1234
Michael Ellermana4da0d52013-10-11 14:07:57 +11001235config ARCH_RANDOM
1236 def_bool n
1237
Sylvain Munaut1088a202007-09-16 20:53:25 +10001238config PPC_LIB_RHEAP
1239 bool
1240
Hollis Blanchardbbf45ba2008-04-16 23:28:09 -05001241source "arch/powerpc/kvm/Kconfig"
Michael Ellerman85baa092016-03-24 22:04:05 +11001242
1243source "kernel/livepatch/Kconfig"