xref: /linux-6.15/arch/powerpc/Kconfig (revision f9aad622)
1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0
2a0ae9c7cSArnd Bergmannsource "arch/powerpc/platforms/Kconfig.cputype"
317e638bcSJohannes Berg
45017b459SNicholas Pigginconfig CC_HAS_ELFV2
55017b459SNicholas Piggin	def_bool PPC64 && $(cc-option, -mabi=elfv2)
65017b459SNicholas Piggin
7dc5dac74SNicholas Pigginconfig CC_HAS_PREFIXED
8dc5dac74SNicholas Piggin	def_bool PPC64 && $(cc-option, -mcpu=power10 -mprefixed)
9dc5dac74SNicholas Piggin
107e3a68beSNicholas Pigginconfig CC_HAS_PCREL
11169f8997SNicholas Piggin	# Clang has a bug (https://github.com/llvm/llvm-project/issues/62372)
12169f8997SNicholas Piggin	# where pcrel code is not generated if -msoft-float, -mno-altivec, or
13169f8997SNicholas Piggin	# -mno-vsx options are also given. Without these options, fp/vec
14169f8997SNicholas Piggin	# instructions are generated from regular kernel code. So Clang can't
15169f8997SNicholas Piggin	# do pcrel yet.
16169f8997SNicholas Piggin	def_bool PPC64 && CC_IS_GCC && $(cc-option, -mcpu=power10 -mpcrel)
177e3a68beSNicholas Piggin
18234a71a7Skerstin jonssonconfig 32BIT
19234a71a7Skerstin jonsson	bool
20234a71a7Skerstin jonsson	default y if PPC32
21234a71a7Skerstin jonsson
2214cf11afSPaul Mackerrasconfig 64BIT
2314cf11afSPaul Mackerras	bool
2414cf11afSPaul Mackerras	default y if PPC64
2514cf11afSPaul Mackerras
26a4520b25SChristophe Leroyconfig LIVEPATCH_64
27a4520b25SChristophe Leroy	def_bool PPC64
28a4520b25SChristophe Leroy	depends on LIVEPATCH
29a4520b25SChristophe Leroy
3014cf11afSPaul Mackerrasconfig MMU
3114cf11afSPaul Mackerras	bool
3214cf11afSPaul Mackerras	default y
3314cf11afSPaul Mackerras
349fea59bdSMichael Ellermanconfig ARCH_MMAP_RND_BITS_MAX
359fea59bdSMichael Ellerman	# On Book3S 64, the default virtual address space for 64-bit processes
369fea59bdSMichael Ellerman	# is 2^47 (128TB). As a maximum, allow randomisation to consume up to
379fea59bdSMichael Ellerman	# 32T of address space (2^45), which should ensure a reasonable gap
389fea59bdSMichael Ellerman	# between bottom-up and top-down allocations for applications that
399fea59bdSMichael Ellerman	# consume "normal" amounts of address space. Book3S 64 only supports 64K
409fea59bdSMichael Ellerman	# and 4K page sizes.
419fea59bdSMichael Ellerman	default 29 if PPC_BOOK3S_64 && PPC_64K_PAGES # 29 = 45 (32T) - 16 (64K)
429fea59bdSMichael Ellerman	default 33 if PPC_BOOK3S_64		     # 33 = 45 (32T) - 12 (4K)
439fea59bdSMichael Ellerman	#
449fea59bdSMichael Ellerman	# On all other 64-bit platforms (currently only Book3E), the virtual
459fea59bdSMichael Ellerman	# address space is 2^46 (64TB). Allow randomisation to consume up to 16T
469fea59bdSMichael Ellerman	# of address space (2^44). Only 4K page sizes are supported.
479fea59bdSMichael Ellerman	default 32 if 64BIT	# 32 = 44 (16T) - 12 (4K)
489fea59bdSMichael Ellerman	#
499fea59bdSMichael Ellerman	# For 32-bit, use the compat values, as they're the same.
509fea59bdSMichael Ellerman	default ARCH_MMAP_RND_COMPAT_BITS_MAX
519fea59bdSMichael Ellerman
529fea59bdSMichael Ellermanconfig ARCH_MMAP_RND_BITS_MIN
539fea59bdSMichael Ellerman	# Allow randomisation to consume up to 1GB of address space (2^30).
549fea59bdSMichael Ellerman	default 14 if 64BIT && PPC_64K_PAGES	# 14 = 30 (1GB) - 16 (64K)
559fea59bdSMichael Ellerman	default 18 if 64BIT			# 18 = 30 (1GB) - 12 (4K)
569fea59bdSMichael Ellerman	#
579fea59bdSMichael Ellerman	# For 32-bit, use the compat values, as they're the same.
589fea59bdSMichael Ellerman	default ARCH_MMAP_RND_COMPAT_BITS_MIN
599fea59bdSMichael Ellerman
609fea59bdSMichael Ellermanconfig ARCH_MMAP_RND_COMPAT_BITS_MAX
619fea59bdSMichael Ellerman	# Total virtual address space for 32-bit processes is 2^31 (2GB).
629fea59bdSMichael Ellerman	# Allow randomisation to consume up to 512MB of address space (2^29).
639fea59bdSMichael Ellerman	default 11 if PPC_256K_PAGES	# 11 = 29 (512MB) - 18 (256K)
649fea59bdSMichael Ellerman	default 13 if PPC_64K_PAGES	# 13 = 29 (512MB) - 16 (64K)
659fea59bdSMichael Ellerman	default 15 if PPC_16K_PAGES	# 15 = 29 (512MB) - 14 (16K)
669fea59bdSMichael Ellerman	default 17			# 17 = 29 (512MB) - 12 (4K)
679fea59bdSMichael Ellerman
689fea59bdSMichael Ellermanconfig ARCH_MMAP_RND_COMPAT_BITS_MIN
699fea59bdSMichael Ellerman	# Total virtual address space for 32-bit processes is 2^31 (2GB).
709fea59bdSMichael Ellerman	# Allow randomisation to consume up to 8MB of address space (2^23).
719fea59bdSMichael Ellerman	default 5 if PPC_256K_PAGES	#  5 = 23 (8MB) - 18 (256K)
729fea59bdSMichael Ellerman	default 7 if PPC_64K_PAGES	#  7 = 23 (8MB) - 16 (64K)
739fea59bdSMichael Ellerman	default 9 if PPC_16K_PAGES	#  9 = 23 (8MB) - 14 (16K)
749fea59bdSMichael Ellerman	default 11			# 11 = 23 (8MB) - 12 (4K)
759fea59bdSMichael Ellerman
76551b81f2SMichael Ellermanconfig NR_IRQS
77551b81f2SMichael Ellerman	int "Number of virtual interrupt numbers"
787b3b3de3SCédric Le Goater	range 32 1048576
79551b81f2SMichael Ellerman	default "512"
80551b81f2SMichael Ellerman	help
81551b81f2SMichael Ellerman	  This defines the number of virtual interrupt numbers the kernel
82551b81f2SMichael Ellerman	  can manage. Virtual interrupt numbers are what you see in
83551b81f2SMichael Ellerman	  /proc/interrupts. If you configure your system to have too few,
84551b81f2SMichael Ellerman	  drivers will fail to load or worse - handle with care.
85551b81f2SMichael Ellerman
86ddd703caSNicholas Pigginconfig NMI_IPI
87ddd703caSNicholas Piggin	bool
882104180aSNicholas Piggin	depends on SMP && (DEBUGGER || KEXEC_CORE || HARDLOCKUP_DETECTOR)
89ddd703caSNicholas Piggin	default y
90ddd703caSNicholas Piggin
9175eb767eSNicholas Pigginconfig PPC_WATCHDOG
9275eb767eSNicholas Piggin	bool
937ca8fe94SPetr Mladek	depends on HARDLOCKUP_DETECTOR_ARCH
9475eb767eSNicholas Piggin	default y
9575eb767eSNicholas Piggin	help
9675eb767eSNicholas Piggin	  This is a placeholder when the powerpc hardlockup detector
9775eb767eSNicholas Piggin	  watchdog is selected (arch/powerpc/kernel/watchdog.c). It is
98f8a4b277SColin Ian King	  selected via the generic lockup detector menu which is why we
9975eb767eSNicholas Piggin	  have no standalone config option for it here.
10075eb767eSNicholas Piggin
101fd3e0bbcSChristoph Hellwigconfig STACKTRACE_SUPPORT
102fd3e0bbcSChristoph Hellwig	bool
103fd3e0bbcSChristoph Hellwig	default y
104fd3e0bbcSChristoph Hellwig
105945feb17SBenjamin Herrenschmidtconfig LOCKDEP_SUPPORT
106945feb17SBenjamin Herrenschmidt	bool
107945feb17SBenjamin Herrenschmidt	default y
108945feb17SBenjamin Herrenschmidt
10995c354feSNick Pigginconfig GENERIC_LOCKBREAK
11095c354feSNick Piggin	bool
11195c354feSNick Piggin	default y
1129f61521cSNicholas Piggin	depends on SMP && PREEMPTION && !PPC_QUEUED_SPINLOCKS
11395c354feSNick Piggin
114e779b2f9SAkinobu Mitaconfig GENERIC_HWEIGHT
115e779b2f9SAkinobu Mita	bool
116e779b2f9SAkinobu Mita	default y
117e779b2f9SAkinobu Mita
11814cf11afSPaul Mackerrasconfig PPC
11914cf11afSPaul Mackerras	bool
12014cf11afSPaul Mackerras	default y
121a7d2475aSMichael Ellerman	#
122a7d2475aSMichael Ellerman	# Please keep this list sorted alphabetically.
123a7d2475aSMichael Ellerman	#
124942fa985SYury Norov	select ARCH_32BIT_OFF_T if PPC32
12541b7a347SDaniel Axtens	select ARCH_DISABLE_KASAN_INLINE	if PPC_RADIX_MMU
126c00a60d6SJiaxun Yang	select ARCH_DMA_DEFAULT_COHERENT	if !NOT_COHERENT_CACHE
12791024b3cSAnshuman Khandual	select ARCH_ENABLE_MEMORY_HOTPLUG
12891024b3cSAnshuman Khandual	select ARCH_ENABLE_MEMORY_HOTREMOVE
129c6b05f4eSChristophe Leroy	select ARCH_HAS_COPY_MC			if PPC64
130372ff60aSEric Biggers	select ARCH_HAS_CRC32			if PPC64 && ALTIVEC
1317439cfedSEric Biggers	select ARCH_HAS_CRC_T10DIF		if PPC64 && ALTIVEC
1322792d84eSKees Cook	select ARCH_HAS_CURRENT_STACK_POINTER
1336bf752daSChristophe Leroy	select ARCH_HAS_DEBUG_VIRTUAL
134937c49d1SAneesh Kumar K.V	select ARCH_HAS_DEBUG_VM_PGTABLE
135e0847283SChristophe Leroy	select ARCH_HAS_DEBUG_WX		if STRICT_KERNEL_RWX
136a7d2475aSMichael Ellerman	select ARCH_HAS_DEVMEM_IS_ALLOWED
137c6b05f4eSChristophe Leroy	select ARCH_HAS_DMA_MAP_DIRECT 		if PPC_PSERIES
138de6c85bfSChristoph Hellwig	select ARCH_HAS_DMA_OPS			if PPC64
1396974f0c4SDaniel Micay	select ARCH_HAS_FORTIFY_SOURCE
140a7d2475aSMichael Ellerman	select ARCH_HAS_GCOV_PROFILE_ALL
141c6b05f4eSChristophe Leroy	select ARCH_HAS_KCOV
142be2fc65dSSamuel Holland	select ARCH_HAS_KERNEL_FPU_SUPPORT	if PPC64 && PPC_FPU
1433ccfebedSMathieu Desnoyers	select ARCH_HAS_MEMBARRIER_CALLBACKS
1442384b36fSNicholas Piggin	select ARCH_HAS_MEMBARRIER_SYNC_CORE
145387e220aSNicholas Piggin	select ARCH_HAS_MEMREMAP_COMPAT_ALIGN	if PPC_64S_HASH_MMU
146c6b05f4eSChristophe Leroy	select ARCH_HAS_MMIOWB			if PPC64
147c6b05f4eSChristophe Leroy	select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
148c6b05f4eSChristophe Leroy	select ARCH_HAS_PHYS_TO_DMA
149c6b05f4eSChristophe Leroy	select ARCH_HAS_PMEM_API
15000199ed6SShrikanth Hegde	select ARCH_HAS_PREEMPT_LAZY
151*f9aad622SAnshuman Khandual	select ARCH_HAS_PTDUMP
152c6b05f4eSChristophe Leroy	select ARCH_HAS_PTE_DEVMAP		if PPC_BOOK3S_64
153c6b05f4eSChristophe Leroy	select ARCH_HAS_PTE_SPECIAL
154b4645ffcSChristophe Leroy	select ARCH_HAS_SCALED_CPUTIME		if VIRT_CPU_ACCOUNTING_NATIVE && PPC_BOOK3S_64
1551f9ad21cSRussell Currey	select ARCH_HAS_SET_MEMORY
156e939da89SMichael Ellerman	select ARCH_HAS_STRICT_KERNEL_RWX	if (PPC_BOOK3S || PPC_8xx) && !HIBERNATION
157dfc3095cSChristophe Leroy	select ARCH_HAS_STRICT_KERNEL_RWX	if PPC_85xx && !HIBERNATION && !RANDOMIZE_BASE
1580670010fSChristophe Leroy	select ARCH_HAS_STRICT_MODULE_RWX	if ARCH_HAS_STRICT_KERNEL_RWX
1597e92e01bSRohan McLure	select ARCH_HAS_SYSCALL_WRAPPER		if !SPU_BASE && !COMPAT
160a7d2475aSMichael Ellerman	select ARCH_HAS_TICK_BROADCAST		if GENERIC_CLOCKEVENTS_BROADCAST
161461cef2aSChristophe Leroy	select ARCH_HAS_UACCESS_FLUSHCACHE
162918327e9SKees Cook	select ARCH_HAS_UBSAN
163a7d2475aSMichael Ellerman	select ARCH_HAS_VDSO_ARCH_DATA
164a9c3475dSVignesh Balasubramanian	select ARCH_HAVE_NMI_SAFE_CMPXCHG
165350e88baSMike Rapoport	select ARCH_HAVE_EXTRA_ELF_NOTES        if SPU_BASE
166603fd64dSAneesh Kumar K.V	select ARCH_KEEP_MEMBLOCK
167b7e7c37bSMark Salter	select ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE	if PPC_RADIX_MMU
168c74e6d3dSMark Salter	select ARCH_MIGHT_HAVE_PC_PARPORT
1694ec591e5SChristophe Leroy	select ARCH_MIGHT_HAVE_PC_SERIO
170fdacae8aSChristophe Leroy	select ARCH_OPTIONAL_KERNEL_RWX		if ARCH_HAS_STRICT_KERNEL_RWX
17102a771c9SMichael Ellerman	select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT
172a1cdef04SChristophe Leroy	select ARCH_SPLIT_ARG64			if PPC32
173a7d2475aSMichael Ellerman	select ARCH_STACKWALK
174e939da89SMichael Ellerman	select ARCH_SUPPORTS_ATOMIC_RMW
175a7d2475aSMichael Ellerman	select ARCH_SUPPORTS_DEBUG_PAGEALLOC	if PPC_BOOK3S || PPC_8xx
176a7d2475aSMichael Ellerman	select ARCH_USE_BUILTIN_BSWAP
177dce44566SAnshuman Khandual	select ARCH_USE_CMPXCHG_LOCKREF		if PPC64
178aa65ff6bSNicholas Piggin	select ARCH_USE_MEMTEST
179e0fe568eSMichael Ellerman	select ARCH_USE_QUEUED_RWLOCKS		if PPC_QUEUED_SPINLOCKS
18036e5f9eeSChristophe Leroy	select ARCH_WANT_DEFAULT_BPF_JIT
181a7d2475aSMichael Ellerman	select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT
18266acd460SNicholas Piggin	select ARCH_WANT_IPC_PARSE_VERSION
18359612b24SNathan Chancellor	select ARCH_WANT_IRQS_OFF_ACTIVATE_MM
184f2b79c0dSAneesh Kumar K.V	select ARCH_WANT_LD_ORPHAN_WARN
185eeaec780SChristophe Leroy	select ARCH_WANT_OPTIMIZE_DAX_VMEMMAP	if PPC_RADIX_MMU
18677e58496SPaul E. McKenney	select ARCH_WANTS_MODULES_DATA_IN_VMALLOC	if PPC_BOOK3S_32 || PPC_8xx
187d812c0e1SStephen Rothwell	select ARCH_WEAK_RELEASE_ACQUIRE
18810916706SShile Zhang	select BINFMT_ELF
189a7d2475aSMichael Ellerman	select BUILDTIME_TABLE_SORT
1902eafc474SNicholas Piggin	select CLONE_BACKWARDS
191a7d2475aSMichael Ellerman	select CPUMASK_OFFSTACK			if NR_CPUS >= 8192
192f1565c24SChristoph Hellwig	select DCACHE_WORD_ACCESS		if PPC64 && CPU_LITTLE_ENDIAN
1930c0c5230SMichael Ellerman	select DMA_OPS_BYPASS			if PPC64
194a7d2475aSMichael Ellerman	select DYNAMIC_FTRACE			if FUNCTION_TRACER
195a7d2475aSMichael Ellerman	select EDAC_ATOMIC_SCRUB
1960f71dcfbSNaveen N Rao	select EDAC_SUPPORT
197b20f98e8SSathvika Vasireddy	select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY if ARCH_USING_PATCHABLE_FUNCTION_ENTRY
198a7d2475aSMichael Ellerman	select FUNCTION_ALIGNMENT_4B
199a7d2475aSMichael Ellerman	select GENERIC_ATOMIC64			if PPC32
200a7d2475aSMichael Ellerman	select GENERIC_CLOCKEVENTS_BROADCAST	if SMP
201a7d2475aSMichael Ellerman	select GENERIC_CMOS_UPDATE
202179ab1cbSMichael Ellerman	select GENERIC_CPU_AUTOPROBE
203265c3491SChristophe Leroy	select GENERIC_CPU_VULNERABILITIES	if PPC_BARRIER_NOSPEC
20474205b3fSChristophe Leroy	select GENERIC_EARLY_IOREMAP
2050ceef6e9SVaibhav Jain	select GENERIC_GETTIMEOFDAY
2068d05554dSChristophe Leroy	select GENERIC_IDLE_POLL_SETUP
207a7d2475aSMichael Ellerman	select GENERIC_IOREMAP
208a7d2475aSMichael Ellerman	select GENERIC_IRQ_SHOW
209eb01d42aSChristoph Hellwig	select GENERIC_IRQ_SHOW_LEVEL
210a7d2475aSMichael Ellerman	select GENERIC_PCI_IOMAP		if PCI
211d4cfb113SPaul Mackerras	select GENERIC_SMP_IDLE_THREAD
21274205b3fSChristophe Leroy	select GENERIC_TIME_VSYSCALL
213fcbfe812SNiklas Schnelle	select GENERIC_VDSO_DATA_STORE
214a7d2475aSMichael Ellerman	select GENERIC_VDSO_TIME_NS
2158abddd96SNicholas Piggin	select HAS_IOPORT			if PCI
216a6a8f7c4SChristophe Leroy	select HAVE_ARCH_AUDITSYSCALL
217a7d2475aSMichael Ellerman	select HAVE_ARCH_HUGE_VMALLOC		if HAVE_ARCH_HUGE_VMAP
218b0b3b2c7SChristophe Leroy	select HAVE_ARCH_HUGE_VMAP		if PPC_RADIX_MMU || PPC_8xx
219d3e5bab9SArnd Bergmann	select HAVE_ARCH_JUMP_LABEL
22041b7a347SDaniel Axtens	select HAVE_ARCH_JUMP_LABEL_RELATIVE
221c7b9ed7cSChristophe Leroy	select HAVE_ARCH_KASAN			if PPC32 && PAGE_SHIFT <= 14
22241b7a347SDaniel Axtens	select HAVE_ARCH_KASAN			if PPC_RADIX_MMU
22395567f46SRohan McLure	select HAVE_ARCH_KASAN			if PPC_BOOK3E_64
224a5edf981SNicholas Miehlbradt	select HAVE_ARCH_KASAN_VMALLOC		if HAVE_ARCH_KASAN
225f4a0318fSXiu Jianfeng	select HAVE_ARCH_KCSAN
226ac9c8901SNicholas Miehlbradt	select HAVE_ARCH_KFENCE			if ARCH_SUPPORTS_DEBUG_PAGEALLOC
227c6b05f4eSChristophe Leroy	select HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET
2289fea59bdSMichael Ellerman	select HAVE_ARCH_WITHIN_STACK_FRAMES
2299fea59bdSMichael Ellerman	select HAVE_ARCH_KGDB
23020e07af7SFinn Thain	select HAVE_ARCH_MMAP_RND_BITS
231a7d2475aSMichael Ellerman	select HAVE_ARCH_MMAP_RND_COMPAT_BITS	if COMPAT
232a7d2475aSMichael Ellerman	select HAVE_ARCH_NVRAM_OPS
2332ff2b7ecSMasahiro Yamada	select HAVE_ARCH_SECCOMP_FILTER
2345c4b710aSNicholas Piggin	select HAVE_ARCH_TRACEHOOK
235c6b05f4eSChristophe Leroy	select HAVE_ASM_MODVERSIONS
236a7d2475aSMichael Ellerman	select HAVE_CONTEXT_TRACKING_USER
237a7d2475aSMichael Ellerman	select HAVE_C_RECORDMCOUNT
238a7d2475aSMichael Ellerman	select HAVE_DEBUG_KMEMLEAK
2390f71dcfbSNaveen N Rao	select HAVE_DEBUG_STACKOVERFLOW
240e717754fSNaveen N Rao	select HAVE_DYNAMIC_FTRACE
241a52f6043SNaveen N Rao	select HAVE_DYNAMIC_FTRACE_WITH_ARGS	if ARCH_USING_PATCHABLE_FUNCTION_ENTRY || MPROFILE_KERNEL || PPC32
2420f71dcfbSNaveen N Rao	select HAVE_DYNAMIC_FTRACE_WITH_CALL_OPS if PPC_FTRACE_OUT_OF_LINE || (PPC32 && ARCH_USING_PATCHABLE_FUNCTION_ENTRY)
24351c66ad8SChristophe Leroy	select HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS if HAVE_DYNAMIC_FTRACE_WITH_CALL_OPS
244ecf8f364SMichael Ellerman	select HAVE_DYNAMIC_FTRACE_WITH_REGS	if ARCH_USING_PATCHABLE_FUNCTION_ENTRY || MPROFILE_KERNEL || PPC32
24525176ad0SDavid Hildenbrand	select HAVE_EBPF_JIT
246a762e926SMasami Hiramatsu (Google)	select HAVE_EFFICIENT_UNALIGNED_ACCESS
247a7d2475aSMichael Ellerman	select HAVE_GUP_FAST
248f01b0eddSNaveen N Rao	select HAVE_FTRACE_GRAPH_FUNC
2495b89492cSChristophe Leroy	select HAVE_FTRACE_MCOUNT_RECORD
2507cd01b08SNaveen N. Rao	select HAVE_FUNCTION_ARG_ACCESS_API
251a7d2475aSMichael Ellerman	select HAVE_FUNCTION_DESCRIPTORS	if PPC64_ELF_ABI_V1
252782f46cbSNaveen N Rao	select HAVE_FUNCTION_ERROR_INJECTION
2538034c2fbSMasahiro Yamada	select HAVE_FUNCTION_GRAPH_TRACER
254ab037dd8SChristophe Leroy	select HAVE_FUNCTION_TRACER		if !COMPILE_TEST && (PPC64 || (PPC32 && CC_IS_GCC))
255c6b05f4eSChristophe Leroy	select HAVE_GCC_PLUGINS			if GCC_VERSION >= 50200   # plugin support on gcc <= 5.1 is buggy on PPC
2567ca8fe94SPetr Mladek	select HAVE_GENERIC_VDSO
257a7d2475aSMichael Ellerman	select HAVE_HARDLOCKUP_DETECTOR_ARCH	if PPC_BOOK3S_64 && SMP
258a7d2475aSMichael Ellerman	select HAVE_HARDLOCKUP_DETECTOR_PERF	if PERF_EVENTS && HAVE_PERF_EVENTS_NMI
259c6b05f4eSChristophe Leroy	select HAVE_HW_BREAKPOINT		if PERF_EVENTS && (PPC_BOOK3S || PPC_8xx)
260a7d2475aSMichael Ellerman	select HAVE_IOREMAP_PROT
2611cc9a21bSChristophe Leroy	select HAVE_IRQ_TIME_ACCOUNTING
262264bffadSChristophe Leroy	select HAVE_KERNEL_GZIP
263423bfc69SChristian Lamparter	select HAVE_KERNEL_LZMA			if DEFAULT_UIMAGE
264a7d2475aSMichael Ellerman	select HAVE_KERNEL_LZO			if DEFAULT_UIMAGE
265ead514d5SNaveen N. Rao	select HAVE_KERNEL_XZ			if PPC_BOOK3S || 44x
266a7d2475aSMichael Ellerman	select HAVE_KPROBES
26760d77ed2SNaveen N Rao	select HAVE_KPROBES_ON_FTRACE
268a4520b25SChristophe Leroy	select HAVE_KRETPROBES
269a7d2475aSMichael Ellerman	select HAVE_LD_DEAD_CODE_DATA_ELIMINATION if HAVE_OBJTOOL_MCOUNT && (!ARCH_USING_PATCHABLE_FUNCTION_ENTRY || (!CC_IS_GCC || GCC_VERSION >= 110100))
2702104180aSNicholas Piggin	select HAVE_LIVEPATCH			if HAVE_DYNAMIC_FTRACE_WITH_REGS
271eacf4c02SChristophe Leroy	select HAVE_MOD_ARCH_SPECIFIC
2720f71dcfbSNaveen N Rao	select HAVE_NMI				if PERF_EVENTS || (PPC64 && PPC_BOOK3S)
273c984aef8SSathvika Vasireddy	select HAVE_OPTPROBES
274a7d2475aSMichael Ellerman	select HAVE_OBJTOOL			if ARCH_USING_PATCHABLE_FUNCTION_ENTRY || MPROFILE_KERNEL || PPC32
275a7d2475aSMichael Ellerman	select HAVE_OBJTOOL_MCOUNT		if HAVE_OBJTOOL
276a7d2475aSMichael Ellerman	select HAVE_PERF_EVENTS
277a7d2475aSMichael Ellerman	select HAVE_PERF_EVENTS_NMI		if PPC64
27819f1bc3fSAbhishek Dubey	select HAVE_PERF_REGS
279a7d2475aSMichael Ellerman	select HAVE_PERF_USER_STACK_DUMP
280accdd093SChristophe Leroy	select HAVE_RETHOOK			if KPROBES
281c6b05f4eSChristophe Leroy	select HAVE_REGS_AND_STACK_ACCESS_API
28271db948bSNaveen N Rao	select HAVE_RELIABLE_STACKTRACE
28371db948bSNaveen N Rao	select HAVE_RSEQ
2847ecd19cfSKefeng Wang	select HAVE_SAMPLE_FTRACE_DIRECT	if HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS
285cd1a41ceSThomas Gleixner	select HAVE_SAMPLE_FTRACE_DIRECT_MULTI	if HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS
28646e1879dSNathan Chancellor	select HAVE_SETUP_PER_CPU_AREA		if PPC64
28746e1879dSNathan Chancellor	select HAVE_SOFTIRQ_ON_OWN_STACK
2885c810cedSChristophe Leroy	select HAVE_STACKPROTECTOR		if PPC32 && $(cc-option,$(m32-flag) -mstack-protector-guard=tls -mstack-protector-guard-reg=r2 -mstack-protector-guard-offset=0)
289a7d2475aSMichael Ellerman	select HAVE_STACKPROTECTOR		if PPC64 && $(cc-option,$(m64-flag) -mstack-protector-guard=tls -mstack-protector-guard-reg=r13 -mstack-protector-guard-offset=0)
290a7d2475aSMichael Ellerman	select HAVE_STATIC_CALL			if PPC32
29101f13550SNicholas Piggin	select HAVE_STATIC_CALL_INLINE		if PPC32
29273c58e7eSMichael Ellerman	select HAVE_SYSCALL_TRACEPOINTS
29373c58e7eSMichael Ellerman	select HAVE_VIRT_CPU_ACCOUNTING
294f96271ceSMichael Ellerman	select HAVE_VIRT_CPU_ACCOUNTING_GEN
295a4ce5a48SChristoph Hellwig	select HOTPLUG_SMT			if HOTPLUG_CPU
296a7d2475aSMichael Ellerman	select SMT_NUM_THREADS_DYNAMIC
297a7d2475aSMichael Ellerman	select HUGETLB_PAGE_SIZE_VARIABLE	if PPC_BOOK3S_64 && HUGETLB_PAGE
2980a956d52SMike Rapoport (IBM)	select IOMMU_HELPER			if PPC64
299e6fe228cSMichael Ellerman	select IRQ_DOMAIN
300c6b05f4eSChristophe Leroy	select IRQ_FORCED_THREADING
301c6b05f4eSChristophe Leroy	select KASAN_VMALLOC			if KASAN && EXECMEM
3021e9fdf21SPeter Zijlstra	select LOCK_MM_AND_FIND_VMA
30377f68ebeSNicholas Piggin	select MMU_GATHER_PAGE_SIZE
304a7d2475aSMichael Ellerman	select MMU_GATHER_RCU_TABLE_FREE
30506832fc0SChristoph Hellwig	select MMU_GATHER_MERGE_VMAS
3067ecd19cfSKefeng Wang	select MMU_LAZY_TLB_SHOOTDOWN		if PPC_BOOK3S_64
3077ecd19cfSKefeng Wang	select MODULES_USE_ELF_RELA
30886596f0aSChristoph Hellwig	select NEED_DMA_MAP_STATE		if PPC64 || NOT_COHERENT_CACHE
30910f85f43SStephen Rothwell	select NEED_PER_CPU_EMBED_FIRST_CHUNK	if PPC64
310e6ce1324SStephen Neuendorffer	select NEED_PER_CPU_PAGE_FIRST_CHUNK	if PPC64
311a7d2475aSMichael Ellerman	select NEED_SG_DMA_LENGTH
312a7d2475aSMichael Ellerman	select OF
3132eac9c2dSChristoph Hellwig	select OF_EARLY_FLATTREE
314981aa1d3SThomas Gleixner	select OLD_SIGACTION			if PPC32
31520f1b79dSChristoph Hellwig	select OLD_SIGSUSPEND
316a278e7eaSMichael Neuling	select PCI_DOMAINS			if PCI
3176e8cef38SArnd Bergmann	select PCI_MSI_ARCH_FALLBACKS		if PCI_MSI
318a7d2475aSMichael Ellerman	select PCI_SYSCALL			if PCI
319c35717c7SRussell Currey	select PPC_DAWR				if PPC64
3207ac57a89SCatalin Marinas	select RTC_LIB
321ed1cd6deSChristophe Leroy	select SPARSE_IRQ
3224aae683fSMasahiro Yamada	select STRICT_KERNEL_RWX if STRICT_MODULE_RWX
3238072b39cSChristophe Leroy	select SYSCTL_EXCEPTION_TRACE
324a7d2475aSMichael Ellerman	select THREAD_INFO_IN_TASK
325a7d2475aSMichael Ellerman	select TRACE_IRQFLAGS_SUPPORT
326a7d2475aSMichael Ellerman	select VDSO_GETRANDOM
32714cf11afSPaul Mackerras	#
328179ab1cbSMichael Ellerman	# Please keep this list sorted alphabetically.
329179ab1cbSMichael Ellerman	#
330179ab1cbSMichael Ellerman
3313e731858SChristophe Leroyconfig PPC_BARRIER_NOSPEC
332179ab1cbSMichael Ellerman	bool
333b86cf14fSNicholas Piggin	default y
334b86cf14fSNicholas Piggin	depends on PPC_BOOK3S_64 || PPC_E500
335b86cf14fSNicholas Piggin
33614cf11afSPaul Mackerrasconfig PPC_HAS_LBARX_LHARX
33714cf11afSPaul Mackerras	bool
33851d3082fSBenjamin Herrenschmidt
33914cf11afSPaul Mackerrasconfig EARLY_PRINTK
340b71d47c1SJason Baron	bool
341b71d47c1SJason Baron	default y
342b71d47c1SJason Baron
343b71d47c1SJason Baronconfig PANIC_TIMEOUT
34414cf11afSPaul Mackerras	int
3456e944aedSMichal Suchanek	default 180
3466e944aedSMichal Suchanek
3476e944aedSMichal Suchanekconfig COMPAT
34848b25c43SChris Metcalf	bool "Enable support for 32bit binaries"
34909a4d5d0SAl Viro	depends on PPC64
35014cf11afSPaul Mackerras	default y if !CPU_LITTLE_ENDIAN
351ae1e9130SIngo Molnar	select ARCH_WANT_OLD_COMPAT_IPC
35214cf11afSPaul Mackerras	select COMPAT_OLD_SIGACTION
35314cf11afSPaul Mackerras
35414cf11afSPaul Mackerrasconfig SCHED_OMIT_FRAME_POINTER
35514cf11afSPaul Mackerras	bool
35614cf11afSPaul Mackerras	default y
3573484a31fSPranith Kumar
35814cf11afSPaul Mackerrasconfig ARCH_MAY_HAVE_PC_FDC
35908264cbcSKumar Gala	bool
36008264cbcSKumar Gala	default PCI
36108264cbcSKumar Gala
36208264cbcSKumar Galaconfig PPC_UDBG_16550
36308264cbcSKumar Gala	bool
36408264cbcSKumar Gala
36508264cbcSKumar Galaconfig GENERIC_TBSYNC
366b7472e17SMichael Ellerman	bool
367b7472e17SMichael Ellerman	default y if PPC32 && SMP
368b7472e17SMichael Ellerman
369b7472e17SMichael Ellermanconfig AUDIT_ARCH
37073c9ceabSJeremy Fitzhardinge	bool
37173c9ceabSJeremy Fitzhardinge	default y
37273c9ceabSJeremy Fitzhardinge
37373c9ceabSJeremy Fitzhardingeconfig GENERIC_BUG
37473c9ceabSJeremy Fitzhardinge	bool
3751baa1f70SJordan Niethe	default y
3761baa1f70SJordan Niethe	depends on BUG
3771baa1f70SJordan Niethe
3781baa1f70SJordan Nietheconfig GENERIC_BUG_RELATIVE_POINTERS
379b3028878SJohannes Berg	def_bool y
38058da10bbSKumar Gala	depends on GENERIC_BUG
381b3028878SJohannes Berg
382b3028878SJohannes Bergconfig SYS_SUPPORTS_APM_EMULATION
3836c5b59b9SDavid Gibson	default y if PMAC_APM_EMU
3846c5b59b9SDavid Gibson	bool
3856c5b59b9SDavid Gibson
3866c5b59b9SDavid Gibsonconfig EPAPR_BOOT
3876c5b59b9SDavid Gibson	bool
388f4fc4a5bSKumar Gala	help
389f4fc4a5bSKumar Gala	  Used to allow a board to specify it wants an ePAPR compliant wrapper.
390f4fc4a5bSKumar Gala
391f4fc4a5bSKumar Galaconfig DEFAULT_UIMAGE
392f4fc4a5bSKumar Gala	bool
393801e4062SJohannes Berg	help
394801e4062SJohannes Berg	  Used to allow a board to specify it wants a uImage built by default
395543b9fd3SJohannes Berg
396543b9fd3SJohannes Bergconfig ARCH_HIBERNATION_POSSIBLE
397f4cb5700SJohannes Berg	bool
398f4cb5700SJohannes Berg	default y
3994ffd6952SAnton Vorontsov
400d0832a75SZhao Chenhuiconfig ARCH_SUSPEND_POSSIBLE
401e939da89SMichael Ellerman	def_bool y
402f4cb5700SJohannes Berg	depends on ADB_PMU || PPC_EFIKA || PPC_LITE5200 || PPC_83xx || \
4039ca12ac0SNicholas Piggin		   (PPC_85xx && !PPC_E500MC) || PPC_86xx || PPC_PSERIES \
4049ca12ac0SNicholas Piggin		   || 44x
4059ca12ac0SNicholas Piggin
4069ca12ac0SNicholas Pigginconfig ARCH_SUSPEND_NONZERO_CPU
407ac790d09SAneesh Kumar K.V	def_bool y
408ac790d09SAneesh Kumar K.V	depends on PPC_POWERNV || PPC_PSERIES
409ac790d09SAneesh Kumar K.V
410ac790d09SAneesh Kumar K.Vconfig ARCH_HAS_ADD_PAGES
4114c75a6f4SBenjamin Herrenschmidt	def_bool y
4124c75a6f4SBenjamin Herrenschmidt	depends on ARCH_ENABLE_MEMORY_HOTPLUG
4134c75a6f4SBenjamin Herrenschmidt
4144c75a6f4SBenjamin Herrenschmidtconfig PPC_DCR_NATIVE
4154c75a6f4SBenjamin Herrenschmidt	bool
4164c75a6f4SBenjamin Herrenschmidt
4174c75a6f4SBenjamin Herrenschmidtconfig PPC_DCR
4184c75a6f4SBenjamin Herrenschmidt	bool
4194c75a6f4SBenjamin Herrenschmidt	depends on PPC_DCR_NATIVE
4204c75a6f4SBenjamin Herrenschmidt	default y
4214c75a6f4SBenjamin Herrenschmidt
4225d2eb73aSPali Rohárconfig PPC_PCI_OF_BUS_MAP
4235d2eb73aSPali Rohár	bool "Use pci_to_OF_bus_map (deprecated)"
4245d2eb73aSPali Rohár	depends on PPC32
4255d2eb73aSPali Rohár	depends on PPC_PMAC || PPC_CHRP
4265d2eb73aSPali Rohár	help
4275d2eb73aSPali Rohár	  This option uses pci_to_OF_bus_map to map OF nodes to PCI devices, which
4285d2eb73aSPali Rohár	  restricts the system to only having 256 PCI buses. On CHRP it also causes
4295d2eb73aSPali Rohár	  the "pci-OF-bus-map" property to be created in the device tree.
4305d2eb73aSPali Rohár
4315d2eb73aSPali Rohár	  If unsure, say "N".
4325d2eb73aSPali Rohár
43356635681SPali Rohárconfig PPC_PCI_BUS_NUM_DOMAIN_DEPENDENT
43456635681SPali Rohár	depends on PPC32
4355d2eb73aSPali Rohár	depends on !PPC_PCI_OF_BUS_MAP
43656635681SPali Rohár	bool "Assign PCI bus numbers from zero individually for each PCI domain"
43734557b75SPali Rohár	default y
43856635681SPali Rohár	help
43956635681SPali Rohár	  By default on PPC32 were PCI bus numbers unique across all PCI domains.
44056635681SPali Rohár	  So system could have only 256 PCI buses independently of available
44156635681SPali Rohár	  PCI domains. When this option is enabled then PCI bus numbers are
44256635681SPali Rohár	  PCI domain dependent and each PCI controller on own domain can have
44356635681SPali Rohár	  256 PCI buses, like it is on other Linux architectures.
44456635681SPali Rohár
4454c9d2800SBenjamin Herrenschmidtconfig ARCH_SUPPORTS_UPROBES
4464c9d2800SBenjamin Herrenschmidt	def_bool y
447373a6da1SStephen Rothwell
4484c9d2800SBenjamin Herrenschmidtconfig PPC_ADV_DEBUG_REGS
4494c9d2800SBenjamin Herrenschmidt	bool
4508b7b80b9SAnanth N Mavinakayanahalli	depends on BOOKE
4518b7b80b9SAnanth N Mavinakayanahalli	default y
4528b7b80b9SAnanth N Mavinakayanahalli
453172ae2e7SDave Kleikampconfig PPC_ADV_DEBUG_IACS
454172ae2e7SDave Kleikamp	int
455e939da89SMichael Ellerman	depends on PPC_ADV_DEBUG_REGS
456172ae2e7SDave Kleikamp	default 4 if 44x
457172ae2e7SDave Kleikamp	default 2
458172ae2e7SDave Kleikamp
459172ae2e7SDave Kleikampconfig PPC_ADV_DEBUG_DACS
460172ae2e7SDave Kleikamp	int
461172ae2e7SDave Kleikamp	depends on PPC_ADV_DEBUG_REGS
462172ae2e7SDave Kleikamp	default 2
463172ae2e7SDave Kleikamp
464172ae2e7SDave Kleikampconfig PPC_ADV_DEBUG_DVCS
465172ae2e7SDave Kleikamp	int
466172ae2e7SDave Kleikamp	depends on PPC_ADV_DEBUG_REGS
467172ae2e7SDave Kleikamp	default 2 if 44x
468172ae2e7SDave Kleikamp	default 0
469172ae2e7SDave Kleikamp
470172ae2e7SDave Kleikampconfig PPC_ADV_DEBUG_DAC_RANGE
471172ae2e7SDave Kleikamp	bool
472172ae2e7SDave Kleikamp	depends on PPC_ADV_DEBUG_REGS && 44x
473172ae2e7SDave Kleikamp	default y
474172ae2e7SDave Kleikamp
475172ae2e7SDave Kleikampconfig PPC_DAWR
476172ae2e7SDave Kleikamp	bool
477172ae2e7SDave Kleikamp
478172ae2e7SDave Kleikampconfig PGTABLE_LEVELS
479172ae2e7SDave Kleikamp	int
480a278e7eaSMichael Neuling	default 2 if !PPC64
481a278e7eaSMichael Neuling	default 4
482a278e7eaSMichael Neuling
48306ef42a1SKirill A. Shutemovsource "arch/powerpc/sysdev/Kconfig"
48406ef42a1SKirill A. Shutemovsource "arch/powerpc/platforms/Kconfig"
48506ef42a1SKirill A. Shutemov
48606ef42a1SKirill A. Shutemovmenu "Kernel options"
48706ef42a1SKirill A. Shutemov
488a2d2e1ecSBenjamin Herrenschmidtconfig HIGHMEM
4894330f5daSKumar Gala	bool "High memory support"
49014cf11afSPaul Mackerras	depends on PPC32
49114cf11afSPaul Mackerras	select KMAP_LOCAL
49214cf11afSPaul Mackerras
49314cf11afSPaul Mackerrassource "kernel/Kconfig.hz"
49414cf11afSPaul Mackerras
49514cf11afSPaul Mackerrasconfig MATH_EMULATION
49647da42b2SThomas Gleixner	bool "Math emulation"
49714cf11afSPaul Mackerras	depends on 44x || PPC_8xx || PPC_MPC832x || BOOKE || PPC_MICROWATT
4988636a1f9SMasahiro Yamada	select PPC_FPU_REGS
49914cf11afSPaul Mackerras	help
50014cf11afSPaul Mackerras	  Some PowerPC chips designed for embedded applications do not have
50114cf11afSPaul Mackerras	  a floating-point unit and therefore do not implement the
5027bf5f056SMichael Ellerman	  floating-point instructions in the PowerPC instruction set.  If you
503b6254cedSChristophe Leroy	  say Y here, the kernel will include code to emulate a floating-point
5044f44e8aeSEnrico Weigelt, metux IT consult	  unit, which will allow programs that use floating-point
50514cf11afSPaul Mackerras	  instructions to run.
50614cf11afSPaul Mackerras
50714cf11afSPaul Mackerras	  This is also useful to emulate missing (optional) instructions
50814cf11afSPaul Mackerras	  such as fsqrt on cores that do have an FPU but do not implement
50914cf11afSPaul Mackerras	  them (such as Freescale BookE).
51014cf11afSPaul Mackerras
51114cf11afSPaul Mackerraschoice
5124e63f8edSBenjamin Herrenschmidt	prompt "Math emulation options"
5134e63f8edSBenjamin Herrenschmidt	default MATH_EMULATION_FULL
5144e63f8edSBenjamin Herrenschmidt	depends on MATH_EMULATION
5154e63f8edSBenjamin Herrenschmidt
516e05c0e81SKevin Haoconfig MATH_EMULATION_FULL
517e05c0e81SKevin Hao	bool "Emulate all the floating point instructions"
518e05c0e81SKevin Hao	help
519e05c0e81SKevin Hao	  Select this option will enable the kernel to support to emulate
520e05c0e81SKevin Hao	  all the floating point instructions. If your SoC doesn't have
521e05c0e81SKevin Hao	  a FPU, you should select this.
522e05c0e81SKevin Hao
5234f44e8aeSEnrico Weigelt, metux IT consultconfig MATH_EMULATION_HW_UNIMPLEMENTED
524e05c0e81SKevin Hao	bool "Just emulate the FPU unimplemented instructions"
525e05c0e81SKevin Hao	help
526e05c0e81SKevin Hao	  Select this if you know there does have a hardware FPU on your
527e05c0e81SKevin Hao	  SoC, but some floating point instructions are not implemented by that.
528e05c0e81SKevin Hao
529e05c0e81SKevin Haoendchoice
5304f44e8aeSEnrico Weigelt, metux IT consult
531e05c0e81SKevin Haoconfig PPC_TRANSACTIONAL_MEM
532e05c0e81SKevin Hao	bool "Transactional Memory support for POWERPC"
533e05c0e81SKevin Hao	depends on PPC_BOOK3S_64
534e05c0e81SKevin Hao	depends on SMP
535e05c0e81SKevin Hao	select ALTIVEC
5363d72bbc4SMichael Neuling	select VSX
5373d72bbc4SMichael Neuling	help
5383d72bbc4SMichael Neuling	  Support user-mode Transactional Memory on POWERPC.
5393d72bbc4SMichael Neuling
5407b37a123SMichael Neulingconfig PPC_UV
5417b37a123SMichael Neuling	bool "Ultravisor support"
5424f44e8aeSEnrico Weigelt, metux IT consult	depends on KVM_BOOK3S_HV_POSSIBLE
5433d72bbc4SMichael Neuling	depends on DEVICE_PRIVATE
5443d72bbc4SMichael Neuling	default n
545013a53f2SAnshuman Khandual	help
546013a53f2SAnshuman Khandual	  This option paravirtualizes the kernel to run in POWER platforms that
547013a53f2SAnshuman Khandual	  supports the Protected Execution Facility (PEF). On such platforms,
548a2db55ddSBharata B Rao	  the ultravisor firmware runs at a privilege level above the
549013a53f2SAnshuman Khandual	  hypervisor.
550013a53f2SAnshuman Khandual
551013a53f2SAnshuman Khandual	  If unsure, say "N".
552013a53f2SAnshuman Khandual
553013a53f2SAnshuman Khandualconfig LD_HEAD_STUB_CATCH
554013a53f2SAnshuman Khandual	bool "Reserve 256 bytes to cope with linker stubs in HEAD text" if EXPERT
555013a53f2SAnshuman Khandual	depends on PPC64
556013a53f2SAnshuman Khandual	help
557013a53f2SAnshuman Khandual	  Very large kernels can cause linker branch stubs to be generated by
558951eedebSNicholas Piggin	  code in head_64.S, which moves the head text sections out of their
559951eedebSNicholas Piggin	  specified location. This option can work around the problem.
560951eedebSNicholas Piggin
561951eedebSNicholas Piggin	  If unsure, say "N".
562951eedebSNicholas Piggin
563951eedebSNicholas Pigginconfig MPROFILE_KERNEL
564951eedebSNicholas Piggin	depends on PPC64_ELF_ABI_V2 && FUNCTION_TRACER
565951eedebSNicholas Piggin	def_bool $(success,$(srctree)/arch/powerpc/tools/gcc-check-mprofile-kernel.sh $(CC) -mlittle-endian) if CPU_LITTLE_ENDIAN
566951eedebSNicholas Piggin	def_bool $(success,$(srctree)/arch/powerpc/tools/gcc-check-mprofile-kernel.sh $(CC) -mbig-endian) if CPU_BIG_ENDIAN
567951eedebSNicholas Piggin
5688c50b72aSTorsten Duweconfig ARCH_USING_PATCHABLE_FUNCTION_ENTRY
569aec0ba74SNicholas Piggin	depends on FUNCTION_TRACER && (PPC32 || PPC64_ELF_ABI_V2)
570aec0ba74SNicholas Piggin	depends on $(cc-option,-fpatchable-function-entry=2)
571aec0ba74SNicholas Piggin	def_bool y if PPC32
5728c50b72aSTorsten Duwe	def_bool $(success,$(srctree)/arch/powerpc/tools/gcc-check-fpatchable-function-entry.sh $(CC) -mlittle-endian) if PPC64 && CPU_LITTLE_ENDIAN
5730f71dcfbSNaveen N Rao	def_bool $(success,$(srctree)/arch/powerpc/tools/gcc-check-fpatchable-function-entry.sh $(CC) -mbig-endian) if PPC64 && CPU_BIG_ENDIAN
5740f71dcfbSNaveen N Rao
5750f71dcfbSNaveen N Raoconfig PPC_FTRACE_OUT_OF_LINE
5760f71dcfbSNaveen N Rao	def_bool PPC64 && ARCH_USING_PATCHABLE_FUNCTION_ENTRY
5770f71dcfbSNaveen N Rao	select ARCH_WANTS_PRE_LINK_VMLINUX
5780f71dcfbSNaveen N Rao
5790f71dcfbSNaveen N Raoconfig PPC_FTRACE_OUT_OF_LINE_NUM_RESERVE
580eec37961SNaveen N Rao	int "Number of ftrace out-of-line stubs to reserve within .text"
581eec37961SNaveen N Rao	depends on PPC_FTRACE_OUT_OF_LINE
582eec37961SNaveen N Rao	default 32768
583eec37961SNaveen N Rao	help
584cf9bc0efSNaveen N Rao	  Number of stubs to reserve for use by ftrace. This space is
585cf9bc0efSNaveen N Rao	  reserved within .text, and is distinct from any additional space
586cf9bc0efSNaveen N Rao	  added at the end of .text before the final vmlinux link. Set to
587cf9bc0efSNaveen N Rao	  zero to have stubs only be generated at the end of vmlinux (only
588cf9bc0efSNaveen N Rao	  if the size of vmlinux is less than 32MB). Set to a higher value
589cf9bc0efSNaveen N Rao	  if building vmlinux larger than 48MB.
590cf9bc0efSNaveen N Rao
591cf9bc0efSNaveen N Raoconfig HOTPLUG_CPU
592cf9bc0efSNaveen N Rao	bool "Support for enabling/disabling CPUs"
593cf9bc0efSNaveen N Rao	depends on SMP && (PPC_PSERIES || \
594cf9bc0efSNaveen N Rao		PPC_PMAC || PPC_POWERNV || FSL_SOC_BOOKE)
595cf9bc0efSNaveen N Rao	help
59614cf11afSPaul Mackerras	  Say Y here to be able to disable and re-enable individual
59714cf11afSPaul Mackerras	  CPUs at runtime on SMP machines.
59840b31360SStephen Rothwell
5992f4f1f81Schenhui zhao	  Say N if you are unsure.
6004f44e8aeSEnrico Weigelt, metux IT consult
60114cf11afSPaul Mackerrasconfig INTERRUPT_SANITIZE_REGISTERS
60214cf11afSPaul Mackerras	bool "Clear gprs on interrupt arrival"
60314cf11afSPaul Mackerras	depends on PPC64 && ARCH_HAS_SYSCALL_WRAPPER
60414cf11afSPaul Mackerras	default PPC_BOOK3E_64 || PPC_PSERIES || PPC_POWERNV
60514cf11afSPaul Mackerras	help
6060e23347fSRohan McLure	  Reduce the influence of user register state on interrupt handlers and
6070e23347fSRohan McLure	  syscalls through clearing user state from registers before handling
6080e23347fSRohan McLure	  the exception.
6097cd882dfSRohan McLure
6100e23347fSRohan McLureconfig PPC_QUEUED_SPINLOCKS
6110e23347fSRohan McLure	bool "Queued spinlocks" if EXPERT
6120e23347fSRohan McLure	depends on SMP
6130e23347fSRohan McLure	default PPC_BOOK3S_64
6140e23347fSRohan McLure	help
615aa65ff6bSNicholas Piggin	  Say Y here to use queued spinlocks which give better scalability and
616c9f34013SNicholas Piggin	  fairness on large SMP and NUMA systems without harming single threaded
617aa65ff6bSNicholas Piggin	  performance.
618c9f34013SNicholas Piggin
619aa65ff6bSNicholas Pigginconfig ARCH_CPU_PROBE_RELEASE
620aa65ff6bSNicholas Piggin	def_bool y
621aa65ff6bSNicholas Piggin	depends on HOTPLUG_CPU
622aa65ff6bSNicholas Piggin
623aa65ff6bSNicholas Pigginconfig PPC64_SUPPORTS_MEMORY_FAILURE
62412633e80SNathan Fontenot	bool "Add support for memory hwpoison"
62512633e80SNathan Fontenot	depends on PPC_BOOK3S_64
62612633e80SNathan Fontenot	default "y" if PPC_POWERNV
62712633e80SNathan Fontenot	select ARCH_SUPPORTS_MEMORY_FAILURE
628f2296a3dSMahesh Salgaonkar
629f2296a3dSMahesh Salgaonkarconfig ARCH_SUPPORTS_KEXEC
630f2296a3dSMahesh Salgaonkar	def_bool PPC_BOOK3S || PPC_E500 || (44x && !SMP)
631f2296a3dSMahesh Salgaonkar
632f2296a3dSMahesh Salgaonkarconfig ARCH_SUPPORTS_KEXEC_FILE
633f2296a3dSMahesh Salgaonkar	def_bool PPC64
63480bf3c84SEric DeVolder
63580bf3c84SEric DeVolderconfig ARCH_SUPPORTS_KEXEC_PURGATORY
63614cf11afSPaul Mackerras	def_bool y
63780bf3c84SEric DeVolder
638c1ad12eeSArnd Bergmannconfig ARCH_SELECTS_KEXEC_FILE
63914cf11afSPaul Mackerras	def_bool y
640e6265fe7SEric DeVolder	depends on KEXEC_FILE
641c1ad12eeSArnd Bergmann	select KEXEC_ELF
642b799a09fSAKASHI Takahiro	select HAVE_IMA_KEXEC if IMA
64380bf3c84SEric DeVolder
64480bf3c84SEric DeVolderconfig PPC64_BIG_ENDIAN_ELF_ABI_V2
64580bf3c84SEric DeVolder	# Option is available to BFD, but LLD does not support ELFv1 so this is
64680bf3c84SEric DeVolder	# always true there.
64780bf3c84SEric DeVolder	prompt "Build big-endian kernel using ELF ABI V2" if LD_IS_BFD && EXPERT
64880bf3c84SEric DeVolder	def_bool y
6495017b459SNicholas Piggin	depends on PPC64 && CPU_BIG_ENDIAN
6508c5fa3b5SNicholas Piggin	depends on CC_HAS_ELFV2
6518c5fa3b5SNicholas Piggin	help
6528c5fa3b5SNicholas Piggin	  This builds the kernel image using the "Power Architecture 64-Bit ELF
6538c5fa3b5SNicholas Piggin	  V2 ABI Specification", which has a reduced stack overhead and faster
6545017b459SNicholas Piggin	  function calls. This internal kernel ABI option does not affect
6555017b459SNicholas Piggin          userspace compatibility.
6565017b459SNicholas Piggin
6575017b459SNicholas Piggin	  The V2 ABI is standard for 64-bit little-endian, but for big-endian
6585017b459SNicholas Piggin	  it is less well tested by kernel and toolchain. However some distros
6595017b459SNicholas Piggin	  build userspace this way, and it can produce a functioning kernel.
6605017b459SNicholas Piggin
6615017b459SNicholas Pigginconfig RELOCATABLE
6625017b459SNicholas Piggin	bool "Build a relocatable kernel"
6635017b459SNicholas Piggin	depends on PPC64 || (FLATMEM && (44x || PPC_85xx))
6645017b459SNicholas Piggin	select NONSTATIC_KERNEL
6655017b459SNicholas Piggin	help
6664c91bd6eSKevin Hao	  This builds a kernel image that is capable of running at the
6674c91bd6eSKevin Hao	  location the kernel is loaded at. For ppc32, there is no any
668dfc3095cSChristophe Leroy	  alignment restrictions, and this feature is a superset of
6694c91bd6eSKevin Hao	  DYNAMIC_MEMSTART and hence overrides it. For ppc64, we should use
6704c91bd6eSKevin Hao	  16k-aligned base address. The kernel is linked as a
6714c91bd6eSKevin Hao	  position-independent executable (PIE) and contains dynamic relocations
6724c91bd6eSKevin Hao	  which are processed early in the bootup process.
6734c91bd6eSKevin Hao
6744c91bd6eSKevin Hao	  One use is for the kexec on panic case where the recovery kernel
6754c91bd6eSKevin Hao	  must live at a different physical address than the primary
6764c91bd6eSKevin Hao	  kernel.
6774c91bd6eSKevin Hao
6784c91bd6eSKevin Hao	  Note: If CONFIG_RELOCATABLE=y, then the kernel runs from the address
6794c91bd6eSKevin Hao	  it has been loaded at and the compile time physical addresses
6804c91bd6eSKevin Hao	  CONFIG_PHYSICAL_START is ignored.  However CONFIG_PHYSICAL_START
6814c91bd6eSKevin Hao	  setting can still be useful to bootwrappers that need to know the
6824c91bd6eSKevin Hao	  load address of the kernel (eg. u-boot/mkimage).
6834c91bd6eSKevin Hao
6844c91bd6eSKevin Haoconfig RANDOMIZE_BASE
6854c91bd6eSKevin Hao	bool "Randomize the address of the kernel image"
6864c91bd6eSKevin Hao	depends on PPC_85xx && FLATMEM
6874c91bd6eSKevin Hao	depends on RELOCATABLE
6884c91bd6eSKevin Hao	help
6892b0e86ccSJason Yan	  Randomizes the virtual address at which the kernel image is
6902b0e86ccSJason Yan	  loaded, as a security feature that deters exploit attempts
69173d11498SChristophe Leroy	  relying on knowledge of the location of kernel internals.
6922b0e86ccSJason Yan
6932b0e86ccSJason Yan	  If unsure, say Y.
6942b0e86ccSJason Yan
6952b0e86ccSJason Yanconfig RELOCATABLE_TEST
6962b0e86ccSJason Yan	bool "Test relocatable kernel"
6972b0e86ccSJason Yan	depends on (PPC64 && RELOCATABLE)
6982b0e86ccSJason Yan	help
6992b0e86ccSJason Yan	  This runs the relocatable kernel at the address it was initially
70070839d20SNicholas Piggin	  loaded at, which tends to be non-zero and therefore test the
70170839d20SNicholas Piggin	  relocation code.
70270839d20SNicholas Piggin
70370839d20SNicholas Pigginconfig ARCH_SUPPORTS_CRASH_DUMP
70470839d20SNicholas Piggin	def_bool PPC64 || PPC_BOOK3S_32 || PPC_85xx || (44x && !SMP)
70570839d20SNicholas Piggin
70670839d20SNicholas Pigginconfig ARCH_DEFAULT_CRASH_DUMP
70770839d20SNicholas Piggin	bool
70880bf3c84SEric DeVolder	default y if !PPC_BOOK3S_32
70980bf3c84SEric DeVolder
71080bf3c84SEric DeVolderconfig ARCH_SELECTS_CRASH_DUMP
71131daa343SDave Vasilevsky	def_bool y
71231daa343SDave Vasilevsky	depends on CRASH_DUMP
71331daa343SDave Vasilevsky	select RELOCATABLE if PPC64 || 44x || PPC_85xx
71431daa343SDave Vasilevsky
71580bf3c84SEric DeVolderconfig ARCH_SUPPORTS_CRASH_HOTPLUG
71680bf3c84SEric DeVolder	def_bool y
71780bf3c84SEric DeVolder	depends on PPC64
718dfc3095cSChristophe Leroy
719e8625d46SHaren Myneniconfig ARCH_HAS_GENERIC_CRASHKERNEL_RESERVATION
720b741092dSSourabh Jain	def_bool CRASH_RESERVE
721b741092dSSourabh Jain
722b741092dSSourabh Jainconfig FA_DUMP
723b741092dSSourabh Jain	bool "Firmware-assisted dump"
724eb39c880SMahesh Salgaonkar	depends on CRASH_DUMP && PPC64 && (PPC_RTAS || PPC_POWERNV)
725eb39c880SMahesh Salgaonkar	help
7265c4233ccSHari Bathini	  A robust mechanism to get reliable kernel crash dump with
727242f271cSManish Ahuja	  assistance from firmware. This approach does not use kexec,
728eb39c880SMahesh Salgaonkar	  instead firmware assists in booting the capture kernel
729eb39c880SMahesh Salgaonkar	  while preserving memory contents. Firmware-assisted dump
73022bd0177SHari Bathini	  is meant to be a kdump replacement offering robustness and
731eb39c880SMahesh Salgaonkar	  speed not possible without system firmware assistance.
732eb39c880SMahesh Salgaonkar
733eb39c880SMahesh Salgaonkar	  If unsure, say "y". Only special kernels like petitboot may
734242f271cSManish Ahuja	  need to say "N" here.
73541df5928SHari Bathini
73641df5928SHari Bathiniconfig PRESERVE_FA_DUMP
737242f271cSManish Ahuja	bool "Preserve Firmware-assisted dump"
738bec53196SHari Bathini	depends on PPC64 && PPC_POWERNV && !FA_DUMP
739bec53196SHari Bathini	help
740bec53196SHari Bathini	  On a kernel with FA_DUMP disabled, this option helps to preserve
741bec53196SHari Bathini	  crash data from a previously crash'ed kernel. Useful when the next
742bec53196SHari Bathini	  memory preserving kernel boot would process this crash data.
743bec53196SHari Bathini	  Petitboot kernel is the typical usecase for this option.
744bec53196SHari Bathini
745bec53196SHari Bathiniconfig OPAL_CORE
746bec53196SHari Bathini	bool "Export OPAL memory as /sys/firmware/opal/core"
7476f713d18SHari Bathini	depends on PPC64 && PPC_POWERNV
7486f713d18SHari Bathini	help
7496f713d18SHari Bathini	  This option uses the MPIPL support in firmware to provide an
7506f713d18SHari Bathini	  ELF core of OPAL memory after a crash. The ELF core is exported
7516f713d18SHari Bathini	  as /sys/firmware/opal/core file which is helpful in debugging
7526f713d18SHari Bathini	  OPAL crashes using GDB.
7536f713d18SHari Bathini
7546f713d18SHari Bathiniconfig IRQ_ALL_CPUS
75514cf11afSPaul Mackerras	bool "Distribute interrupts on all CPUs by default"
75614cf11afSPaul Mackerras	depends on SMP
75714cf11afSPaul Mackerras	help
7586cf09b9dSPaul Bolle	  This option gives the kernel permission to distribute IRQs across
75914cf11afSPaul Mackerras	  multiple CPUs.  Saying N here will route all IRQs to the first
76014cf11afSPaul Mackerras	  CPU.  Generally saying Y is safe, although some problems have been
76114cf11afSPaul Mackerras	  reported with SMP Power Macintoshes with this option enabled.
76214cf11afSPaul Mackerras
76314cf11afSPaul Mackerrasconfig NUMA
76414cf11afSPaul Mackerras	bool "NUMA Memory Allocation and Scheduler Support"
765ffa27b6bSAndy Whitcroft	depends on PPC64 && SMP
766bae80c27SMichael Ellerman	default y if PPC_PSERIES || PPC_POWERNV
76725395cd2SMichael Ellerman	select USE_PERCPU_NUMA_NODE_ID
7684c28b32bSMichael Ellerman	help
7697ecd19cfSKefeng Wang	  Enable NUMA (Non-Uniform Memory Access) support.
770bae80c27SMichael Ellerman
771bae80c27SMichael Ellerman	  The kernel will try to allocate memory used by a CPU on the
772bae80c27SMichael Ellerman	  local memory controller of the CPU and add some more
773bae80c27SMichael Ellerman	  NUMA awareness to the kernel.
774bae80c27SMichael Ellerman
775bae80c27SMichael Ellermanconfig NODES_SHIFT
776ffa27b6bSAndy Whitcroft	int
777c80d79d7SYasunori Goto	default "8" if PPC64
778c80d79d7SYasunori Goto	default "4"
779ea55bf29SAnton Blanchard	depends on NUMA
780c80d79d7SYasunori Goto
781a9ee6cf5SMike Rapoportconfig HAVE_MEMORYLESS_NODES
782c80d79d7SYasunori Goto	def_bool y
78364bb80d8SNishanth Aravamudan	depends on NUMA
78464bb80d8SNishanth Aravamudan
78564bb80d8SNishanth Aravamudanconfig ARCH_SELECT_MEMORY_MODEL
78664bb80d8SNishanth Aravamudan	def_bool y
78714cf11afSPaul Mackerras	depends on PPC64
78814cf11afSPaul Mackerras
78914cf11afSPaul Mackerrasconfig ARCH_FLATMEM_ENABLE
79014cf11afSPaul Mackerras	def_bool y
79114cf11afSPaul Mackerras	depends on (PPC64 && !NUMA) || PPC32
79214cf11afSPaul Mackerras
7939100b205SAndy Whitcroftconfig ARCH_SPARSEMEM_ENABLE
79414cf11afSPaul Mackerras	def_bool y
79514cf11afSPaul Mackerras	depends on PPC64
79614cf11afSPaul Mackerras	select SPARSEMEM_VMEMMAP_ENABLE
7979100b205SAndy Whitcroft
798d29eff7bSAndy Whitcroftconfig ARCH_SPARSEMEM_DEFAULT
79945fb6ceaSAnton Blanchard	def_bool y
80045fb6ceaSAnton Blanchard	depends on PPC_BOOK3S_64
80145fb6ceaSAnton Blanchard
8027b3912f4SMichael Ellermanconfig ILLEGAL_POINTER_VALUE
80314cf11afSPaul Mackerras	hex
804f6853eb5SMichael Ellerman	# This is roughly half way between the top of user space and the bottom
805f6853eb5SMichael Ellerman	# of kernel space, which seems about as good as we can get.
806f6853eb5SMichael Ellerman	default 0x5deadbeef0000000 if PPC64
807f6853eb5SMichael Ellerman	default 0
808f6853eb5SMichael Ellerman
809f6853eb5SMichael Ellermanconfig ARCH_MEMORY_PROBE
810f6853eb5SMichael Ellerman	def_bool y
8117e9191daSMike Kravetz	depends on MEMORY_HOTPLUG
8127e9191daSMike Kravetz
8137e9191daSMike Kravetzchoice
8147e9191daSMike Kravetz	prompt "Page size"
815ca9153a3SIlya Yanok	default PPC_64K_PAGES if PPC_BOOK3S_64
816ca9153a3SIlya Yanok	default PPC_4K_PAGES
817f22969a6SJoel Stanley	help
818ca9153a3SIlya Yanok	  Select the kernel logical page size. Increasing the page size
8193c726f8dSBenjamin Herrenschmidt	  will reduce software overhead at each page boundary, allow
820ca9153a3SIlya Yanok	  hardware prefetch mechanisms to be more effective, and allow
821ca9153a3SIlya Yanok	  larger dma transfers increasing IO efficiency and reducing
822ca9153a3SIlya Yanok	  overhead. However the utilization of memory will increase.
823ca9153a3SIlya Yanok	  For example, each cached file will using a multiple of the
824ca9153a3SIlya Yanok	  page size to hold its contents and the difference between the
825ca9153a3SIlya Yanok	  end of file and the end of page is wasted.
826ca9153a3SIlya Yanok
827ca9153a3SIlya Yanok	  Some dedicated systems, such as software raid serving with
828ca9153a3SIlya Yanok	  accelerated calculations, have shown significant increases.
829ca9153a3SIlya Yanok
830ca9153a3SIlya Yanok	  If you configure a 64 bit kernel for 64k pages but the
831ca9153a3SIlya Yanok	  processor does not support them, then the kernel will simulate
832ca9153a3SIlya Yanok	  them with 4k pages, loading them on demand, but with the
833ca9153a3SIlya Yanok	  reduced software overhead and larger internal fragmentation.
834ca9153a3SIlya Yanok	  For the 32 bit kernel, a large page option will not be offered
835ca9153a3SIlya Yanok	  unless it is supported by the configured processor.
836ca9153a3SIlya Yanok
837ca9153a3SIlya Yanok	  If unsure, choose 4K_PAGES.
838ca9153a3SIlya Yanok
839ca9153a3SIlya Yanokconfig PPC_4K_PAGES
840ca9153a3SIlya Yanok	bool "4k page size"
841ca9153a3SIlya Yanok	select HAVE_ARCH_SOFT_DIRTY if PPC_BOOK3S_64
842ca9153a3SIlya Yanok	select HAVE_PAGE_SIZE_4KB
84319f97c98SAneesh Kumar K.V
844d3e5bab9SArnd Bergmannconfig PPC_16K_PAGES
845ca9153a3SIlya Yanok	bool "16k page size"
846ca9153a3SIlya Yanok	depends on 44x || PPC_8xx
84755f8b5b8SMichael Ellerman	select HAVE_PAGE_SIZE_16KB
84855c8fc3fSChristophe Leroy
849d3e5bab9SArnd Bergmannconfig PPC_64K_PAGES
850ca9153a3SIlya Yanok	bool "64k page size"
851ca9153a3SIlya Yanok	depends on 44x || PPC_BOOK3S_64
85255f8b5b8SMichael Ellerman	select HAVE_ARCH_SOFT_DIRTY if PPC_BOOK3S_64
853bba43630SMichael Ellerman	select HAVE_PAGE_SIZE_64KB
85419f97c98SAneesh Kumar K.V
855d3e5bab9SArnd Bergmannconfig PPC_256K_PAGES
856ca9153a3SIlya Yanok	bool "256k page size (Requires non-standard binutils settings)"
857e1240122SYuri Tikhonov	depends on 44x && !PPC_47x
8584eeef098SChristophe Leroy	select HAVE_PAGE_SIZE_256KB
8594eeef098SChristophe Leroy	help
860d3e5bab9SArnd Bergmann	  Make the page size 256k.
861e1240122SYuri Tikhonov
862e1240122SYuri Tikhonov	  The kernel will only be able to run applications that have been
863e1240122SYuri Tikhonov	  compiled with '-zmax-page-size' set to 256K (the default is 64K) using
8644eeef098SChristophe Leroy	  binutils later than 2.17.50.0.3, or by patching the ELF_MAXPAGESIZE
8654eeef098SChristophe Leroy	  definition from 0x10000 to 0x40000 in older versions.
8664eeef098SChristophe Leroy
8674eeef098SChristophe Leroyendchoice
868e1240122SYuri Tikhonov
869ca9153a3SIlya Yanokconfig THREAD_SHIFT
8703c726f8dSBenjamin Herrenschmidt	int "Thread shift" if EXPERT
87147613407SHamish Martin	range 13 15
87247613407SHamish Martin	default "15" if PPC_256K_PAGES
87347613407SHamish Martin	default "15" if PPC_PSERIES || PPC_POWERNV
87447613407SHamish Martin	default "14" if PPC64
87518f14afeSMichael Ellerman	default "13"
87647613407SHamish Martin	help
87747613407SHamish Martin	  Used to define the stack size. The default is almost always what you
87847613407SHamish Martin	  want. Only change this if you know what you are doing.
87947613407SHamish Martin
88047613407SHamish Martinconfig DATA_SHIFT_BOOL
88147613407SHamish Martin	bool "Set custom data alignment"
8820f4a9041SChristophe Leroy	depends on ADVANCED_OPTIONS
883da1adea0SChristophe Leroy	depends on STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE
8840f4a9041SChristophe Leroy	depends on (PPC_8xx && !PIN_TLB_DATA && (!STRICT_KERNEL_RWX || !PIN_TLB_TEXT)) || \
88590cbac0eSChristophe Leroy		   PPC_BOOK3S_32 || PPC_85xx
886bcf77a70SChristophe Leroy	help
887bcf77a70SChristophe Leroy	  This option allows you to set the kernel data alignment. When
8880f4a9041SChristophe Leroy	  RAM is mapped by blocks, the alignment needs to fit the size and
8890f4a9041SChristophe Leroy	  number of possible blocks. The default should be OK for most configs.
8900f4a9041SChristophe Leroy
8910f4a9041SChristophe Leroy	  Say N here unless you know what you are doing.
8920f4a9041SChristophe Leroy
8930f4a9041SChristophe Leroyconfig DATA_SHIFT
894166d97d9SChristophe Leroy	int "Data shift" if DATA_SHIFT_BOOL
895166d97d9SChristophe Leroy	default 24 if STRICT_KERNEL_RWX && PPC64
8960f4a9041SChristophe Leroy	range 17 28 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_BOOK3S_32
897166d97d9SChristophe Leroy	range 19 23 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_8xx
89890cbac0eSChristophe Leroy	range 20 24 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_85xx
89990cbac0eSChristophe Leroy	default 22 if STRICT_KERNEL_RWX && PPC_BOOK3S_32
900dfc3095cSChristophe Leroy	default 18 if (DEBUG_PAGEALLOC || KFENCE) && PPC_BOOK3S_32
90163b2bc61SChristophe Leroy	default 23 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_8xx && \
90290cbac0eSChristophe Leroy		      (PIN_TLB_DATA || PIN_TLB_TEXT)
903bcf77a70SChristophe Leroy	default 19 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_8xx
904bcf77a70SChristophe Leroy	default 24 if STRICT_KERNEL_RWX && PPC_85xx
905bcf77a70SChristophe Leroy	default PAGE_SHIFT
906dfc3095cSChristophe Leroy	help
907d3e5bab9SArnd Bergmann	  On Book3S 32 (603+), DBATs are used to map kernel text and rodata RO.
9080f4a9041SChristophe Leroy	  Smaller is the alignment, greater is the number of necessary DBATs.
9090f4a9041SChristophe Leroy
9100f4a9041SChristophe Leroy	  On 8xx, large pages (512kb or 8M) are used to map kernel linear
911166d97d9SChristophe Leroy	  memory. Aligning to 8M reduces TLB misses as only 8M pages are used
9128f54a6f7SChristophe Leroy	  in that case. If PIN_TLB is selected, it must be aligned to 8M as
9138f54a6f7SChristophe Leroy	  8M pages will be pinned.
914da1adea0SChristophe Leroy
915da1adea0SChristophe Leroyconfig ARCH_FORCE_MAX_ORDER
9168f54a6f7SChristophe Leroy	int "Order of maximal physically contiguous allocations"
9170192445cSZi Yan	range 7 8 if PPC64 && PPC_64K_PAGES
9186fc54303SMike Rapoport (IBM)	default "8" if PPC64 && PPC_64K_PAGES
919358e526aSMichael Ellerman	range 12 12 if PPC64 && !PPC_64K_PAGES
92023baf831SKirill A. Shutemov	default "12" if PPC64 && !PPC_64K_PAGES
921358e526aSMichael Ellerman	range 8 10 if PPC32 && PPC_16K_PAGES
92223baf831SKirill A. Shutemov	default "8" if PPC32 && PPC_16K_PAGES
923358e526aSMichael Ellerman	range 6 10 if PPC32 && PPC_64K_PAGES
92423baf831SKirill A. Shutemov	default "6" if PPC32 && PPC_64K_PAGES
925358e526aSMichael Ellerman	range 4 10 if PPC32 && PPC_256K_PAGES
92623baf831SKirill A. Shutemov	default "4" if PPC32 && PPC_256K_PAGES
927358e526aSMichael Ellerman	range 10 12
92823baf831SKirill A. Shutemov	default "10"
929ff9e8f41SMichael Ellerman	help
93023baf831SKirill A. Shutemov	  The kernel page allocator limits the size of maximal physically
93153bcddb9SStephen Rothwell	  contiguous allocations. The limit is called MAX_PAGE_ORDER and it
9326fc54303SMike Rapoport (IBM)	  defines the maximal power of two of number of pages that can be
9335e0a760bSKirill A. Shutemov	  allocated as a single contiguous block. This option allows
9346fc54303SMike Rapoport (IBM)	  overriding the default setting when ability to allocate very
9356fc54303SMike Rapoport (IBM)	  large blocks of physically contiguous memory is required.
9366fc54303SMike Rapoport (IBM)
9376fc54303SMike Rapoport (IBM)	  The page size is not necessarily 4KB.  For example, on 64-bit
93853bcddb9SStephen Rothwell	  systems, 64KB pages can be enabled via CONFIG_PPC_64K_PAGES.  Keep
93953bcddb9SStephen Rothwell	  this in mind when choosing a value for this option.
94053bcddb9SStephen Rothwell
94153bcddb9SStephen Rothwell	  Don't change if unsure.
94253bcddb9SStephen Rothwell
9436fc54303SMike Rapoport (IBM)config PPC_SUBPAGE_PROT
9446fc54303SMike Rapoport (IBM)	bool "Support setting protections for 4k subpages (subpage_prot syscall)"
945fa28237cSPaul Mackerras	default n
94663396adaSNicholas Piggin	depends on PPC_64S_HASH_MMU && PPC_64K_PAGES
94763396adaSNicholas Piggin	help
948c2857374SNicholas Piggin	  This option adds support for system call to allow user programs
949fa28237cSPaul Mackerras	  to set access permissions (read/write, readonly, or no access)
95063396adaSNicholas Piggin	  on the 4k subpages of each 64k page.
951fa28237cSPaul Mackerras
952fa28237cSPaul Mackerras	  If unsure, say N here.
953fa28237cSPaul Mackerras
95463396adaSNicholas Pigginconfig PPC_PROT_SAO_LPAR
95563396adaSNicholas Piggin	bool "Support PROT_SAO mappings in LPARs"
9569b725a90SShawn Anastasio	depends on PPC_BOOK3S_64
9579b725a90SShawn Anastasio	help
9589b725a90SShawn Anastasio	  This option adds support for PROT_SAO mappings from userspace
9599b725a90SShawn Anastasio	  inside LPARs on supported CPUs.
9609b725a90SShawn Anastasio
9619b725a90SShawn Anastasio	  This may cause issues when performing guest migration from
9629b725a90SShawn Anastasio	  a CPU that supports SAO to one that does not.
9639b725a90SShawn Anastasio
9649b725a90SShawn Anastasio	  If unsure, say N here.
9659b725a90SShawn Anastasio
9669b725a90SShawn Anastasioconfig PPC_COPRO_BASE
9679b725a90SShawn Anastasio	bool
968e83d0169SIan Munsie
969e83d0169SIan Munsieconfig SCHED_SMT
970e83d0169SIan Munsie	bool "SMT (Hyperthreading) scheduler support"
97114cf11afSPaul Mackerras	depends on PPC64 && SMP
97214cf11afSPaul Mackerras	help
97314cf11afSPaul Mackerras	  SMT scheduler support improves the CPU scheduler's decision making
97414cf11afSPaul Mackerras	  when dealing with POWER5 cpus at a cost of slightly increased
97514cf11afSPaul Mackerras	  overhead in some places. If unsure say N here.
97614cf11afSPaul Mackerras
97714cf11afSPaul Mackerrasconfig PPC_DENORMALISATION
97814cf11afSPaul Mackerras	bool "PowerPC denormalisation exception handling"
979b92a66a6SMichael Neuling	depends on PPC_BOOK3S_64
980b92a66a6SMichael Neuling	default "y" if PPC_POWERNV
981b92a66a6SMichael Neuling	help
9824e90a2a7SAnton Blanchard	  Add support for handling denormalisation of single precision
9834f44e8aeSEnrico Weigelt, metux IT consult	  values.  Useful for bare metal only.  If unsure say Y here.
984b92a66a6SMichael Neuling
985b92a66a6SMichael Neulingconfig CMDLINE
986b92a66a6SMichael Neuling	string "Initial kernel command string"
98714cf11afSPaul Mackerras	default ""
988f134a7ceSChris Packham	help
989cbe46bd4SChristophe Leroy	  On some platforms, there is currently no way for the boot loader to
99014cf11afSPaul Mackerras	  pass arguments to the kernel. For these platforms, you can supply
99114cf11afSPaul Mackerras	  some command-line options at build time by entering them here.  In
99214cf11afSPaul Mackerras	  most cases you will need to specify the root device here.
99314cf11afSPaul Mackerras
99414cf11afSPaul Mackerraschoice
99514cf11afSPaul Mackerras	prompt "Kernel command line type"
996d79fbb3aSChris Packham	depends on CMDLINE != ""
997b9d73218SMasahiro Yamada	default CMDLINE_FROM_BOOTLOADER
998b9d73218SMasahiro Yamada
999d79fbb3aSChris Packhamconfig CMDLINE_FROM_BOOTLOADER
1000d79fbb3aSChris Packham	bool "Use bootloader kernel arguments if available"
1001d79fbb3aSChris Packham	help
1002d79fbb3aSChris Packham	  Uses the command-line options passed by the boot loader. If
1003d79fbb3aSChris Packham	  the boot loader doesn't provide any, the default kernel command
1004d79fbb3aSChris Packham	  string provided in CMDLINE will be used.
1005d79fbb3aSChris Packham
1006d79fbb3aSChris Packhamconfig CMDLINE_EXTEND
1007d79fbb3aSChris Packham	bool "Extend bootloader kernel arguments"
1008d79fbb3aSChris Packham	help
1009d79fbb3aSChris Packham	  The command-line arguments provided by the boot loader will be
1010d79fbb3aSChris Packham	  appended to the default kernel command string.
1011d79fbb3aSChris Packham
1012d79fbb3aSChris Packhamconfig CMDLINE_FORCE
1013d79fbb3aSChris Packham	bool "Always use the default kernel command string"
1014eb3b80f6SSebastian Siewior	help
1015eb3b80f6SSebastian Siewior	  Always use the default kernel command string, even if the boot
1016eb3b80f6SSebastian Siewior	  loader passes other arguments to the kernel.
1017eb3b80f6SSebastian Siewior	  This is useful if you cannot or don't want to change the
1018eb3b80f6SSebastian Siewior	  command-line options your boot loader passes to the kernel.
1019eb3b80f6SSebastian Siewior
1020eb3b80f6SSebastian Siewiorendchoice
1021eb3b80f6SSebastian Siewior
1022d79fbb3aSChris Packhamconfig EXTRA_TARGETS
1023d79fbb3aSChris Packham	string "Additional default image types"
1024c356aa45SGrant Likely	help
1025c356aa45SGrant Likely	  List additional targets to be built by the bootwrapper here (separated
1026c356aa45SGrant Likely	  by spaces).  This is useful for targets that depend of device tree
1027c356aa45SGrant Likely	  files in the .dts directory.
1028c356aa45SGrant Likely
1029c356aa45SGrant Likely	  Targets in this list will be build as part of the default build
1030c356aa45SGrant Likely	  target, or when the user does a 'make zImage' or a
1031c356aa45SGrant Likely	  'make zImage.initrd'.
1032c356aa45SGrant Likely
1033c356aa45SGrant Likely	  If unsure, leave blank
1034c356aa45SGrant Likely
1035c356aa45SGrant Likelyconfig ARCH_WANTS_FREEZER_CONTROL
1036c356aa45SGrant Likely	def_bool y
1037b28f5081SJohannes Berg	depends on ADB_PMU
1038b28f5081SJohannes Berg
1039b28f5081SJohannes Bergsource "kernel/power/Kconfig"
1040b28f5081SJohannes Berg
10418636a1f9SMasahiro Yamadaconfig PPC_MEM_KEYS
104214cf11afSPaul Mackerras	prompt "PowerPC Memory Protection Keys"
104392e3da3cSRam Pai	def_bool y
104492e3da3cSRam Pai	depends on PPC_BOOK3S_64
104592e3da3cSRam Pai	depends on PPC_64S_HASH_MMU
104692e3da3cSRam Pai	select ARCH_USES_HIGH_VMA_FLAGS
1047c2857374SNicholas Piggin	select ARCH_HAS_PKEYS
104892e3da3cSRam Pai	help
104992e3da3cSRam Pai	  Memory Protection Keys provides a mechanism for enforcing
105092e3da3cSRam Pai	  page-based protections, but without requiring modification of the
105192e3da3cSRam Pai	  page tables when an application changes protection domains.
105292e3da3cSRam Pai
105392e3da3cSRam Pai	  For details, see Documentation/core-api/protection-keys.rst
105492e3da3cSRam Pai
10551eecbcdcSMauro Carvalho Chehab	  If unsure, say y.
105692e3da3cSRam Pai
105792e3da3cSRam Paiconfig ARCH_PKEY_BITS
105892e3da3cSRam Pai	int
105912930e3aSJoey Gouly	default 5
106012930e3aSJoey Gouly
106112930e3aSJoey Goulyconfig PPC_SECURE_BOOT
106212930e3aSJoey Gouly	prompt "Enable secure boot support"
10631a8916eeSNayna Jain	bool
10641a8916eeSNayna Jain	depends on PPC_POWERNV || PPC_PSERIES
10651a8916eeSNayna Jain	depends on IMA_ARCH_POLICY
10665c5e46daSDaniel Axtens	imply IMA_SECURE_AND_OR_TRUSTED_BOOT
10674238fad3SNayna Jain	select PSERIES_PLPKS if PPC_PSERIES
10689e2b4be3SNayna Jain	help
106946b2cbebSAndrew Donnellan	  Systems with firmware secure boot enabled need to define security
10701a8916eeSNayna Jain	  policies to extend secure boot to the OS. This config allows a user
10711a8916eeSNayna Jain	  to enable OS secure boot on systems that have firmware support for
10721a8916eeSNayna Jain	  it. If in doubt say N.
10731a8916eeSNayna Jain
10741a8916eeSNayna Jainconfig PPC_SECVAR_SYSFS
10751a8916eeSNayna Jain	bool "Enable sysfs interface for POWER secure variables"
1076bd5d9c74SNayna Jain	default y
1077bd5d9c74SNayna Jain	depends on PPC_SECURE_BOOT
1078bd5d9c74SNayna Jain	depends on SYSFS
1079bd5d9c74SNayna Jain	help
1080bd5d9c74SNayna Jain	  POWER secure variables are managed and controlled by firmware.
1081bd5d9c74SNayna Jain	  These variables are exposed to userspace via sysfs to enable
1082bd5d9c74SNayna Jain	  read/write operations on these variables. Say Y if you have
1083bd5d9c74SNayna Jain	  secure boot enabled and want to expose variables to userspace.
1084bd5d9c74SNayna Jain
1085bd5d9c74SNayna Jainendmenu
1086bd5d9c74SNayna Jain
108714cf11afSPaul Mackerrasconfig ISA_DMA_API
108814cf11afSPaul Mackerras	bool
108914cf11afSPaul Mackerras	default PCI
109014cf11afSPaul Mackerras
10913d066d77SStephen Rothwellmenu "Bus options"
109214cf11afSPaul Mackerras
109314cf11afSPaul Mackerrasconfig ISA
109414cf11afSPaul Mackerras	bool "Support for ISA-bus hardware"
109514cf11afSPaul Mackerras	depends on PPC_CHRP
109614cf11afSPaul Mackerras	select PPC_I8259
1097933ee711SPaul Bolle	help
1098f9bd170aSPaul Mackerras	  Find out whether you have ISA slots on your motherboard.  ISA is the
109914cf11afSPaul Mackerras	  name of a bus system, i.e. the way the CPU talks to the other stuff
110014cf11afSPaul Mackerras	  inside your box.  If you have an Apple machine, say N here; if you
110114cf11afSPaul Mackerras	  have an IBM RS/6000 or pSeries machine, say Y.  If you have an
110214cf11afSPaul Mackerras	  embedded board, consult your board documentation.
1103933ee711SPaul Bolle
1104933ee711SPaul Bolleconfig GENERIC_ISA_DMA
110514cf11afSPaul Mackerras	bool
110614cf11afSPaul Mackerras	depends on ISA_DMA_API
110714cf11afSPaul Mackerras	default y
11081927445aSAnton Vorontsov
110914cf11afSPaul Mackerrasconfig PPC_INDIRECT_PCI
111014cf11afSPaul Mackerras	bool
111125635c71SPaul Mackerras	depends on PCI
111225635c71SPaul Mackerras	default y if 44x
111325635c71SPaul Mackerras
1114e939da89SMichael Ellermanconfig SBUS
111525635c71SPaul Mackerras	bool
111614cf11afSPaul Mackerras
111714cf11afSPaul Mackerrasconfig FSL_SOC
111814cf11afSPaul Mackerras	bool
111908264cbcSKumar Gala
112008264cbcSKumar Galaconfig FSL_PCI
112108264cbcSKumar Gala	bool
112255c44991SRoy Zang	select ARCH_HAS_DMA_SET_MASK
112355c44991SRoy Zang	select PPC_INDIRECT_PCI
112411ddce15SChristoph Hellwig	select PCI_QUIRKS
112555c44991SRoy Zang
1126d0839118SKumar Galaconfig FSL_PMC
112755c44991SRoy Zang	bool
11284ffd6952SAnton Vorontsov	default y
11294ffd6952SAnton Vorontsov	depends on SUSPEND && (PPC_85xx || PPC_86xx)
11304ffd6952SAnton Vorontsov	help
11314ffd6952SAnton Vorontsov	  Freescale MPC85xx/MPC86xx power management controller support
11324ffd6952SAnton Vorontsov	  (suspend/resume). For MPC83xx see platforms/83xx/suspend.c
11334ffd6952SAnton Vorontsov
11344ffd6952SAnton Vorontsovconfig PPC4xx_CPM
11354ffd6952SAnton Vorontsov	bool
1136d164f6d4SVictor Gallardo	default y
1137d164f6d4SVictor Gallardo	depends on SUSPEND && 44x
1138d164f6d4SVictor Gallardo	help
1139e939da89SMichael Ellerman	  PPC4xx Clock Power Management (CPM) support (suspend/resume).
1140d164f6d4SVictor Gallardo	  It also enables support for two different idle states (idle-wait
1141d164f6d4SVictor Gallardo	  and idle-doze).
1142d164f6d4SVictor Gallardo
1143d164f6d4SVictor Gallardoconfig FSL_LBC
1144d164f6d4SVictor Gallardo	bool "Freescale Local Bus support"
1145acaa7aa3SAnton Vorontsov	help
11463ab8f2a2SRoy Zang	  Enables reporting of errors from the Freescale local bus
1147acaa7aa3SAnton Vorontsov	  controller.  Also contains some common code used by
11483ab8f2a2SRoy Zang	  drivers for specific local bus peripherals.
11493ab8f2a2SRoy Zang
11503ab8f2a2SRoy Zangconfig FSL_GTM
1151acaa7aa3SAnton Vorontsov	bool
115283ff9dcfSAnton Vorontsov	depends on PPC_83xx || QUICC_ENGINE || CPM2
115383ff9dcfSAnton Vorontsov	help
115483ff9dcfSAnton Vorontsov	  Freescale General-purpose Timers support
115583ff9dcfSAnton Vorontsov
115683ff9dcfSAnton Vorontsovconfig FSL_RIO
115783ff9dcfSAnton Vorontsov	bool "Freescale Embedded SRIO Controller support"
1158388b78adSAlexandre Bounine	depends on RAPIDIO = y && HAVE_RAPIDIO
1159388b78adSAlexandre Bounine	default "n"
11601753d50cSChristoph Hellwig	help
1161388b78adSAlexandre Bounine	  Include support for RapidIO controller on Freescale embedded
11624f44e8aeSEnrico Weigelt, metux IT consult	  processors (MPC8548, MPC8641, etc).
1163388b78adSAlexandre Bounine
1164388b78adSAlexandre Bounineendmenu
1165388b78adSAlexandre Bounine
116614cf11afSPaul Mackerrasconfig NONSTATIC_KERNEL
116714cf11afSPaul Mackerras	bool
11680f890c8dSSuzuki Poulose
11690f890c8dSSuzuki Poulosemenu "Advanced setup"
11700f890c8dSSuzuki Poulose	depends on PPC32
117114cf11afSPaul Mackerras
117214cf11afSPaul Mackerrasconfig ADVANCED_OPTIONS
117314cf11afSPaul Mackerras	bool "Prompt for advanced kernel configuration options"
117414cf11afSPaul Mackerras	help
117514cf11afSPaul Mackerras	  This option will enable prompting for a variety of advanced kernel
117614cf11afSPaul Mackerras	  configuration options.  These options can cause the kernel to not
117714cf11afSPaul Mackerras	  work if they are set incorrectly, but can be used to optimize certain
117814cf11afSPaul Mackerras	  aspects of kernel memory management.
117914cf11afSPaul Mackerras
118014cf11afSPaul Mackerras	  Unless you know what you are doing, say N here.
118114cf11afSPaul Mackerras
118214cf11afSPaul Mackerrascomment "Default settings for advanced configuration options are used"
118314cf11afSPaul Mackerras	depends on !ADVANCED_OPTIONS
118414cf11afSPaul Mackerras
118514cf11afSPaul Mackerrasconfig LOWMEM_SIZE_BOOL
118614cf11afSPaul Mackerras	bool "Set maximum low memory"
118714cf11afSPaul Mackerras	depends on ADVANCED_OPTIONS
118814cf11afSPaul Mackerras	help
118914cf11afSPaul Mackerras	  This option allows you to set the maximum amount of memory which
119014cf11afSPaul Mackerras	  will be used as "low memory", that is, memory which the kernel can
119114cf11afSPaul Mackerras	  access directly, without having to set up a kernel virtual mapping.
119214cf11afSPaul Mackerras	  This can be useful in optimizing the layout of kernel virtual
119314cf11afSPaul Mackerras	  memory.
119414cf11afSPaul Mackerras
119514cf11afSPaul Mackerras	  Say N here unless you know what you are doing.
119614cf11afSPaul Mackerras
119714cf11afSPaul Mackerrasconfig LOWMEM_SIZE
119814cf11afSPaul Mackerras	hex "Maximum low memory size (in bytes)" if LOWMEM_SIZE_BOOL
119914cf11afSPaul Mackerras	default "0x30000000"
120014cf11afSPaul Mackerras
120114cf11afSPaul Mackerrasconfig LOWMEM_CAM_NUM_BOOL
120214cf11afSPaul Mackerras	bool "Set number of CAMs to use to map low memory"
120396051465STrent Piepho	depends on ADVANCED_OPTIONS && PPC_85xx
120496051465STrent Piepho	help
1205dfc3095cSChristophe Leroy	  This option allows you to set the maximum number of CAM slots that
120696051465STrent Piepho	  will be used to map low memory.  There are a limited number of slots
120796051465STrent Piepho	  available and even more limited number that will fit in the L1 MMU.
120896051465STrent Piepho	  However, using more entries will allow mapping more low memory.  This
120996051465STrent Piepho	  can be useful in optimizing the layout of kernel virtual memory.
121096051465STrent Piepho
121196051465STrent Piepho	  Say N here unless you know what you are doing.
121296051465STrent Piepho
121396051465STrent Piephoconfig LOWMEM_CAM_NUM
121496051465STrent Piepho	depends on PPC_85xx
121596051465STrent Piepho	int "Number of CAMs to use to map low memory" if LOWMEM_CAM_NUM_BOOL
1216dfc3095cSChristophe Leroy	default 3 if !STRICT_KERNEL_RWX
121796051465STrent Piepho	default 9 if DATA_SHIFT >= 24
121849e3d8eaSChristophe Leroy	default 12 if DATA_SHIFT >= 22
121949e3d8eaSChristophe Leroy	default 15
122049e3d8eaSChristophe Leroy
122149e3d8eaSChristophe Leroyconfig DYNAMIC_MEMSTART
122296051465STrent Piepho	bool "Enable page aligned dynamic load address for kernel"
12230f890c8dSSuzuki Poulose	depends on ADVANCED_OPTIONS && FLATMEM && (PPC_85xx || 44x)
1224642e56ffSKees Cook	select NONSTATIC_KERNEL
1225dfc3095cSChristophe Leroy	help
12260f890c8dSSuzuki Poulose	  This option enables the kernel to be loaded at any page aligned
122737dd2badSKumar Gala	  physical address. The kernel creates a mapping from KERNELBASE to
12280f890c8dSSuzuki Poulose	  the address where the kernel is loaded. The page size here implies
12290f890c8dSSuzuki Poulose	  the TLB page size of the mapping for kernel on the particular platform.
12300f890c8dSSuzuki Poulose	  Please refer to the init code for finding the TLB page size.
12310f890c8dSSuzuki Poulose
12320f890c8dSSuzuki Poulose	  DYNAMIC_MEMSTART is an easy way of implementing pseudo-RELOCATABLE
123337dd2badSKumar Gala	  kernel image, where the only restriction is the page aligned kernel
12340f890c8dSSuzuki Poulose	  load address. When this option is enabled, the compile time physical
12350f890c8dSSuzuki Poulose	  address CONFIG_PHYSICAL_START is ignored.
12360f890c8dSSuzuki Poulose
12370f890c8dSSuzuki Poulose	  This option is overridden by CONFIG_RELOCATABLE
123837dd2badSKumar Gala
12399c5f7d39SSuzuki Pouloseconfig PAGE_OFFSET_BOOL
12409c5f7d39SSuzuki Poulose	bool "Set custom page offset address"
124137dd2badSKumar Gala	depends on ADVANCED_OPTIONS
124237dd2badSKumar Gala	help
124337dd2badSKumar Gala	  This option allows you to set the kernel virtual address at which
124437dd2badSKumar Gala	  the kernel will map low memory.  This can be useful in optimizing
124537dd2badSKumar Gala	  the virtual memory layout of the system.
124637dd2badSKumar Gala
124737dd2badSKumar Gala	  Say N here unless you know what you are doing.
124837dd2badSKumar Gala
124937dd2badSKumar Galaconfig PAGE_OFFSET
125037dd2badSKumar Gala	hex "Virtual address of memory base" if PAGE_OFFSET_BOOL
125137dd2badSKumar Gala	default "0xc0000000"
125237dd2badSKumar Gala
125337dd2badSKumar Galaconfig KERNEL_START_BOOL
125437dd2badSKumar Gala	bool "Set custom kernel base address"
125514cf11afSPaul Mackerras	depends on ADVANCED_OPTIONS
125614cf11afSPaul Mackerras	help
125714cf11afSPaul Mackerras	  This option allows you to set the kernel virtual address at which
125814cf11afSPaul Mackerras	  the kernel will be loaded.  Normally this should match PAGE_OFFSET
125914cf11afSPaul Mackerras	  however there are times (like kdump) that one might not want them
126037dd2badSKumar Gala	  to be the same.
126137dd2badSKumar Gala
126237dd2badSKumar Gala	  Say N here unless you know what you are doing.
126314cf11afSPaul Mackerras
126414cf11afSPaul Mackerrasconfig KERNEL_START
126514cf11afSPaul Mackerras	hex "Virtual address of kernel base" if KERNEL_START_BOOL
126614cf11afSPaul Mackerras	default PAGE_OFFSET if PAGE_OFFSET_BOOL
126714cf11afSPaul Mackerras	default "0xc2000000" if CRASH_DUMP && !NONSTATIC_KERNEL
126837dd2badSKumar Gala	default "0xc0000000"
12690f890c8dSSuzuki Poulose
127014cf11afSPaul Mackerrasconfig PHYSICAL_START_BOOL
127114cf11afSPaul Mackerras	bool "Set physical address where the kernel is loaded"
127237dd2badSKumar Gala	depends on ADVANCED_OPTIONS && FLATMEM && PPC_85xx
127337dd2badSKumar Gala	help
1274dfc3095cSChristophe Leroy	  This gives the physical address where the kernel is loaded.
127537dd2badSKumar Gala
127637dd2badSKumar Gala	  Say N here unless you know what you are doing.
127737dd2badSKumar Gala
127837dd2badSKumar Galaconfig PHYSICAL_START
127937dd2badSKumar Gala	hex "Physical address where the kernel is loaded" if PHYSICAL_START_BOOL
128037dd2badSKumar Gala	default "0x02000000" if PPC_BOOK3S && CRASH_DUMP && !NONSTATIC_KERNEL
128137dd2badSKumar Gala	default "0x00000000"
128226598f28SChristophe Leroy
128337dd2badSKumar Galaconfig PHYSICAL_ALIGN
128437dd2badSKumar Gala	hex
128537dd2badSKumar Gala	default "0x04000000" if PPC_85xx
128637dd2badSKumar Gala	help
1287dfc3095cSChristophe Leroy	  This value puts the alignment restrictions on physical address
128837dd2badSKumar Gala	  where kernel is loaded and run from. Kernel is compiled for an
128937dd2badSKumar Gala	  address which meets above alignment restriction.
129037dd2badSKumar Gala
129137dd2badSKumar Galaconfig TASK_SIZE_BOOL
129237dd2badSKumar Gala	bool "Set custom user task size"
129314cf11afSPaul Mackerras	depends on ADVANCED_OPTIONS
129414cf11afSPaul Mackerras	help
129514cf11afSPaul Mackerras	  This option allows you to set the amount of virtual address space
129614cf11afSPaul Mackerras	  allocated to user tasks.  This can be useful in optimizing the
129714cf11afSPaul Mackerras	  virtual memory layout of the system.
129814cf11afSPaul Mackerras
129914cf11afSPaul Mackerras	  Say N here unless you know what you are doing.
130014cf11afSPaul Mackerras
130114cf11afSPaul Mackerrasconfig TASK_SIZE
130214cf11afSPaul Mackerras	hex "Size of user task space" if TASK_SIZE_BOOL
130314cf11afSPaul Mackerras	default "0x80000000" if PPC_8xx
130414cf11afSPaul Mackerras	default "0xb0000000" if PPC_BOOK3S_32 && EXECMEM
1305933ee711SPaul Bolle	default "0xc0000000"
13062f2b9a3aSChristophe Leroy
13074d9e5510SKumar Galaconfig MODULES_SIZE_BOOL
1308c5eec4dfSChristophe Leroy	bool "Set custom size for modules/execmem area"
1309c5eec4dfSChristophe Leroy	depends on EXECMEM && ADVANCED_OPTIONS
1310c5eec4dfSChristophe Leroy	help
1311c5eec4dfSChristophe Leroy	  This option allows you to set the size of kernel virtual address
1312c5eec4dfSChristophe Leroy	  space dedicated for modules/execmem.
1313c5eec4dfSChristophe Leroy	  For the time being it is only for 8xx and book3s/32. Other
1314c5eec4dfSChristophe Leroy	  platform share it with vmalloc space.
13152f2b9a3aSChristophe Leroy
13162f2b9a3aSChristophe Leroy	  Say N here unless you know what you are doing.
1317c5eec4dfSChristophe Leroy
1318c5eec4dfSChristophe Leroyconfig MODULES_SIZE
1319c5eec4dfSChristophe Leroy	int "Size of modules/execmem area (In Mbytes)" if MODULES_SIZE_BOOL
1320c5eec4dfSChristophe Leroy	range 1 256 if EXECMEM
1321c5eec4dfSChristophe Leroy	default 64 if EXECMEM && PPC_BOOK3S_32
1322c5eec4dfSChristophe Leroy	default 32 if EXECMEM && PPC_8xx
13232f2b9a3aSChristophe Leroy	default 0
1324c5eec4dfSChristophe Leroy
1325c5eec4dfSChristophe Leroyendmenu
1326c5eec4dfSChristophe Leroy
132714cf11afSPaul Mackerrasconfig PPC64_PROC_SYSTEMCFG
132814cf11afSPaul Mackerras	def_bool y
1329c22c06b4SThomas Weißschuh	depends on PPC64 && PROC_FS
1330c22c06b4SThomas Weißschuh	help
1331c22c06b4SThomas Weißschuh	  This option enables the presence of /proc/ppc64/systemcfg through
1332c22c06b4SThomas Weißschuh	  which the systemcfg page can be accessed.
1333c22c06b4SThomas Weißschuh	  This interface only exists for backwards-compatibility.
1334c22c06b4SThomas Weißschuh
1335c22c06b4SThomas Weißschuhif PPC64
1336c22c06b4SThomas Weißschuh# This value must have zeroes in the bottom 60 bits otherwise lots will break
1337cabb5587SStephen Rothwellconfig PAGE_OFFSET
1338bdbc29c1SPaul Mackerras	hex
133937dd2badSKumar Gala	default "0xc000000000000000"
1340cabb5587SStephen Rothwellconfig KERNEL_START
1341eeb2d218SStephen Rothwell	hex
134237dd2badSKumar Gala	default "0xc000000000000000"
134337dd2badSKumar Galaconfig PHYSICAL_START
134437dd2badSKumar Gala	hex
134537dd2badSKumar Gala	default "0x00000000"
134637dd2badSKumar Galaendif
134737dd2badSKumar Gala
1348cabb5587SStephen Rothwellconfig PPC_LIB_RHEAP
1349cabb5587SStephen Rothwell	bool
13501088a209SSylvain Munaut
13511088a209SSylvain Munautsource "arch/powerpc/kvm/Kconfig"
13521088a209SSylvain Munaut
1353bbf45ba5SHollis Blanchardsource "kernel/livepatch/Kconfig"
135485baa095SMichael Ellerman