xref: /linux/arch/powerpc/Kconfig (revision 39231e8d6ba7f794b566fd91ebd88c0834a23b98)
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
1251e338f4dSSabyrzhan Tasbolatov	select ARCH_NEEDS_DEFER_KASAN		if PPC_RADIX_MMU
12641b7a347SDaniel Axtens	select ARCH_DISABLE_KASAN_INLINE	if PPC_RADIX_MMU
127c00a60d6SJiaxun Yang	select ARCH_DMA_DEFAULT_COHERENT	if !NOT_COHERENT_CACHE
12891024b3cSAnshuman Khandual	select ARCH_ENABLE_MEMORY_HOTPLUG
12991024b3cSAnshuman Khandual	select ARCH_ENABLE_MEMORY_HOTREMOVE
130c6b05f4eSChristophe Leroy	select ARCH_HAS_COPY_MC			if PPC64
1312792d84eSKees Cook	select ARCH_HAS_CURRENT_STACK_POINTER
1326bf752daSChristophe Leroy	select ARCH_HAS_DEBUG_VIRTUAL
133937c49d1SAneesh Kumar K.V	select ARCH_HAS_DEBUG_VM_PGTABLE
134e0847283SChristophe Leroy	select ARCH_HAS_DEBUG_WX		if STRICT_KERNEL_RWX
135a7d2475aSMichael Ellerman	select ARCH_HAS_DEVMEM_IS_ALLOWED
136c6b05f4eSChristophe Leroy	select ARCH_HAS_DMA_MAP_DIRECT 		if PPC_PSERIES
137de6c85bfSChristoph Hellwig	select ARCH_HAS_DMA_OPS			if PPC64
1386974f0c4SDaniel Micay	select ARCH_HAS_FORTIFY_SOURCE
139a7d2475aSMichael Ellerman	select ARCH_HAS_GCOV_PROFILE_ALL
140*39231e8dSDavid Hildenbrand (Red Hat)	select ARCH_HAS_GIGANTIC_PAGE		if ARCH_SUPPORTS_HUGETLBFS
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
151f9aad622SAnshuman Khandual	select ARCH_HAS_PTDUMP
152c6b05f4eSChristophe Leroy	select ARCH_HAS_PTE_SPECIAL
153b4645ffcSChristophe Leroy	select ARCH_HAS_SCALED_CPUTIME		if VIRT_CPU_ACCOUNTING_NATIVE && PPC_BOOK3S_64
1541f9ad21cSRussell Currey	select ARCH_HAS_SET_MEMORY
155e939da89SMichael Ellerman	select ARCH_HAS_STRICT_KERNEL_RWX	if (PPC_BOOK3S || PPC_8xx) && !HIBERNATION
156dfc3095cSChristophe Leroy	select ARCH_HAS_STRICT_KERNEL_RWX	if PPC_85xx && !HIBERNATION && !RANDOMIZE_BASE
1570670010fSChristophe Leroy	select ARCH_HAS_STRICT_MODULE_RWX	if ARCH_HAS_STRICT_KERNEL_RWX
1587e92e01bSRohan McLure	select ARCH_HAS_SYSCALL_WRAPPER		if !SPU_BASE && !COMPAT
159a7d2475aSMichael Ellerman	select ARCH_HAS_TICK_BROADCAST		if GENERIC_CLOCKEVENTS_BROADCAST
160461cef2aSChristophe Leroy	select ARCH_HAS_UACCESS_FLUSHCACHE
161918327e9SKees Cook	select ARCH_HAS_UBSAN
162223970dfSThomas Weißschuh	select ARCH_HAS_VDSO_ARCH_DATA
163a7d2475aSMichael Ellerman	select ARCH_HAVE_NMI_SAFE_CMPXCHG
164a9c3475dSVignesh Balasubramanian	select ARCH_HAVE_EXTRA_ELF_NOTES        if SPU_BASE
165350e88baSMike Rapoport	select ARCH_KEEP_MEMBLOCK
166603fd64dSAneesh Kumar K.V	select ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE	if PPC_RADIX_MMU
167b7e7c37bSMark Salter	select ARCH_MIGHT_HAVE_PC_PARPORT
168c74e6d3dSMark Salter	select ARCH_MIGHT_HAVE_PC_SERIO
1694ec591e5SChristophe Leroy	select ARCH_OPTIONAL_KERNEL_RWX		if ARCH_HAS_STRICT_KERNEL_RWX
170fdacae8aSChristophe Leroy	select ARCH_OPTIONAL_KERNEL_RWX_DEFAULT
17102a771c9SMichael Ellerman	select ARCH_SPLIT_ARG64			if PPC32
172a1cdef04SChristophe Leroy	select ARCH_STACKWALK
173a7d2475aSMichael Ellerman	select ARCH_SUPPORTS_ATOMIC_RMW
174e939da89SMichael Ellerman	select ARCH_SUPPORTS_DEBUG_PAGEALLOC	if PPC_BOOK3S || PPC_8xx
1757bd291abSPeter Zijlstra	select ARCH_SUPPORTS_SCHED_MC		if SMP
1767bd291abSPeter Zijlstra	select ARCH_SUPPORTS_SCHED_SMT		if PPC64 && SMP
1777bd291abSPeter Zijlstra	select SCHED_MC				if ARCH_SUPPORTS_SCHED_MC
178a7d2475aSMichael Ellerman	select ARCH_USE_BUILTIN_BSWAP
179a7d2475aSMichael Ellerman	select ARCH_USE_CMPXCHG_LOCKREF		if PPC64
180dce44566SAnshuman Khandual	select ARCH_USE_MEMTEST
181aa65ff6bSNicholas Piggin	select ARCH_USE_QUEUED_RWLOCKS		if PPC_QUEUED_SPINLOCKS
182e0fe568eSMichael Ellerman	select ARCH_WANT_DEFAULT_BPF_JIT
18336e5f9eeSChristophe Leroy	select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT
184a7d2475aSMichael Ellerman	select ARCH_WANT_IPC_PARSE_VERSION
18566acd460SNicholas Piggin	select ARCH_WANT_IRQS_OFF_ACTIVATE_MM
18659612b24SNathan Chancellor	select ARCH_WANT_LD_ORPHAN_WARN
187f2b79c0dSAneesh Kumar K.V	select ARCH_WANT_OPTIMIZE_DAX_VMEMMAP	if PPC_RADIX_MMU
188eeaec780SChristophe Leroy	select ARCH_WANTS_MODULES_DATA_IN_VMALLOC	if PPC_BOOK3S_32 || PPC_8xx
18977e58496SPaul E. McKenney	select ARCH_WEAK_RELEASE_ACQUIRE
190d812c0e1SStephen Rothwell	select BINFMT_ELF
19110916706SShile Zhang	select BUILDTIME_TABLE_SORT
192a7d2475aSMichael Ellerman	select CLONE_BACKWARDS
1932eafc474SNicholas Piggin	select CPUMASK_OFFSTACK			if NR_CPUS >= 8192
194a7d2475aSMichael Ellerman	select DCACHE_WORD_ACCESS		if PPC64 && CPU_LITTLE_ENDIAN
195f1565c24SChristoph Hellwig	select DMA_OPS_BYPASS			if PPC64
1960c0c5230SMichael Ellerman	select DYNAMIC_FTRACE			if FUNCTION_TRACER
197a7d2475aSMichael Ellerman	select EDAC_ATOMIC_SCRUB
198a7d2475aSMichael Ellerman	select EDAC_SUPPORT
1990f71dcfbSNaveen N Rao	select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY if ARCH_USING_PATCHABLE_FUNCTION_ENTRY
200b20f98e8SSathvika Vasireddy	select FUNCTION_ALIGNMENT_4B
201a7d2475aSMichael Ellerman	select GENERIC_ATOMIC64			if PPC32
202a7d2475aSMichael Ellerman	select GENERIC_CLOCKEVENTS_BROADCAST	if SMP
203a7d2475aSMichael Ellerman	select GENERIC_CMOS_UPDATE
204a7d2475aSMichael Ellerman	select GENERIC_CPU_AUTOPROBE
205179ab1cbSMichael Ellerman	select GENERIC_CPU_VULNERABILITIES	if PPC_BARRIER_NOSPEC
206265c3491SChristophe Leroy	select GENERIC_EARLY_IOREMAP
20774205b3fSChristophe Leroy	select GENERIC_GETTIMEOFDAY
2080ceef6e9SVaibhav Jain	select GENERIC_IDLE_POLL_SETUP
2098d05554dSChristophe Leroy	select GENERIC_IOREMAP
210a7d2475aSMichael Ellerman	select GENERIC_IRQ_SHOW
211a7d2475aSMichael Ellerman	select GENERIC_IRQ_SHOW_LEVEL
212eb01d42aSChristoph Hellwig	select GENERIC_PCI_IOMAP		if PCI
213a7d2475aSMichael Ellerman	select GENERIC_SMP_IDLE_THREAD
214d4cfb113SPaul Mackerras	select GENERIC_TIME_VSYSCALL
215fcbfe812SNiklas Schnelle	select HAS_IOPORT			if PCI
216a7d2475aSMichael Ellerman	select HAVE_ARCH_AUDITSYSCALL
2178abddd96SNicholas Piggin	select HAVE_ARCH_HUGE_VMALLOC		if HAVE_ARCH_HUGE_VMAP
218a6a8f7c4SChristophe Leroy	select HAVE_ARCH_HUGE_VMAP		if PPC_RADIX_MMU || PPC_8xx
219a7d2475aSMichael Ellerman	select HAVE_ARCH_JUMP_LABEL
220b0b3b2c7SChristophe Leroy	select HAVE_ARCH_JUMP_LABEL_RELATIVE
221d3e5bab9SArnd Bergmann	select HAVE_ARCH_KASAN			if PPC32 && PAGE_SHIFT <= 14
22241b7a347SDaniel Axtens	select HAVE_ARCH_KASAN			if PPC_RADIX_MMU
223c7b9ed7cSChristophe Leroy	select HAVE_ARCH_KASAN			if PPC_BOOK3E_64
22441b7a347SDaniel Axtens	select HAVE_ARCH_KASAN_VMALLOC		if HAVE_ARCH_KASAN
22595567f46SRohan McLure	select HAVE_ARCH_KCSAN
226a5edf981SNicholas Miehlbradt	select HAVE_ARCH_KFENCE			if ARCH_SUPPORTS_DEBUG_PAGEALLOC
227f4a0318fSXiu Jianfeng	select HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET
228ac9c8901SNicholas Miehlbradt	select HAVE_ARCH_WITHIN_STACK_FRAMES
229c6b05f4eSChristophe Leroy	select HAVE_ARCH_KGDB
2309fea59bdSMichael Ellerman	select HAVE_ARCH_MMAP_RND_BITS
2319fea59bdSMichael Ellerman	select HAVE_ARCH_MMAP_RND_COMPAT_BITS	if COMPAT
23220e07af7SFinn Thain	select HAVE_ARCH_NVRAM_OPS
233a7d2475aSMichael Ellerman	select HAVE_ARCH_SECCOMP_FILTER
234a7d2475aSMichael Ellerman	select HAVE_ARCH_TRACEHOOK
2352ff2b7ecSMasahiro Yamada	select HAVE_ASM_MODVERSIONS
2365c4b710aSNicholas Piggin	select HAVE_CONTEXT_TRACKING_USER
237c6b05f4eSChristophe Leroy	select HAVE_C_RECORDMCOUNT
238a7d2475aSMichael Ellerman	select HAVE_DEBUG_KMEMLEAK
239a7d2475aSMichael Ellerman	select HAVE_DEBUG_STACKOVERFLOW
240a7d2475aSMichael Ellerman	select HAVE_DYNAMIC_FTRACE
2410f71dcfbSNaveen N Rao	select HAVE_DYNAMIC_FTRACE_WITH_ARGS	if ARCH_USING_PATCHABLE_FUNCTION_ENTRY || MPROFILE_KERNEL || PPC32
242e717754fSNaveen N Rao	select HAVE_DYNAMIC_FTRACE_WITH_CALL_OPS if PPC_FTRACE_OUT_OF_LINE || (PPC32 && ARCH_USING_PATCHABLE_FUNCTION_ENTRY)
243a52f6043SNaveen N Rao	select HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS if HAVE_DYNAMIC_FTRACE_WITH_CALL_OPS
2440f71dcfbSNaveen N Rao	select HAVE_DYNAMIC_FTRACE_WITH_REGS	if ARCH_USING_PATCHABLE_FUNCTION_ENTRY || MPROFILE_KERNEL || PPC32
24551c66ad8SChristophe Leroy	select HAVE_EBPF_JIT
246ecf8f364SMichael Ellerman	select HAVE_EFFICIENT_UNALIGNED_ACCESS
24725176ad0SDavid Hildenbrand	select HAVE_GUP_FAST
248a762e926SMasami Hiramatsu (Google)	select HAVE_FTRACE_GRAPH_FUNC
2497cec88bfSHari Bathini	select HAVE_FTRACE_REGS_HAVING_PT_REGS
250f01b0eddSNaveen N Rao	select HAVE_FUNCTION_ARG_ACCESS_API
2515b89492cSChristophe Leroy	select HAVE_FUNCTION_DESCRIPTORS	if PPC64_ELF_ABI_V1
2527cd01b08SNaveen N. Rao	select HAVE_FUNCTION_ERROR_INJECTION
253d733f18aSAditya Bodkhe	select HAVE_FUNCTION_GRAPH_FREGS
254a7d2475aSMichael Ellerman	select HAVE_FUNCTION_GRAPH_TRACER
255782f46cbSNaveen N Rao	select HAVE_FUNCTION_TRACER		if !COMPILE_TEST && (PPC64 || (PPC32 && CC_IS_GCC))
256a41de5ccSChristophe Leroy	select HAVE_GCC_PLUGINS
257ab037dd8SChristophe Leroy	select HAVE_GENERIC_VDSO
258c6b05f4eSChristophe Leroy	select HAVE_HARDLOCKUP_DETECTOR_ARCH	if PPC_BOOK3S_64 && SMP
2597ca8fe94SPetr Mladek	select HAVE_HARDLOCKUP_DETECTOR_PERF	if PERF_EVENTS && HAVE_PERF_EVENTS_NMI
260a7d2475aSMichael Ellerman	select HAVE_HW_BREAKPOINT		if PERF_EVENTS && (PPC_BOOK3S || PPC_8xx)
261a7d2475aSMichael Ellerman	select HAVE_IOREMAP_PROT
262c6b05f4eSChristophe Leroy	select HAVE_IRQ_TIME_ACCOUNTING
263a7d2475aSMichael Ellerman	select HAVE_KERNEL_GZIP
2641cc9a21bSChristophe Leroy	select HAVE_KERNEL_LZMA			if DEFAULT_UIMAGE
265264bffadSChristophe Leroy	select HAVE_KERNEL_LZO			if DEFAULT_UIMAGE
266423bfc69SChristian Lamparter	select HAVE_KERNEL_XZ			if PPC_BOOK3S || 44x
267a7d2475aSMichael Ellerman	select HAVE_KPROBES
268ead514d5SNaveen N. Rao	select HAVE_KPROBES_ON_FTRACE
269a7d2475aSMichael Ellerman	select HAVE_KRETPROBES
27060d77ed2SNaveen N Rao	select HAVE_LD_DEAD_CODE_DATA_ELIMINATION if HAVE_OBJTOOL_MCOUNT && (!ARCH_USING_PATCHABLE_FUNCTION_ENTRY || (!CC_IS_GCC || GCC_VERSION >= 110100))
271a4520b25SChristophe Leroy	select HAVE_LIVEPATCH			if HAVE_DYNAMIC_FTRACE_WITH_REGS
272a7d2475aSMichael Ellerman	select HAVE_MOD_ARCH_SPECIFIC
2732104180aSNicholas Piggin	select HAVE_NMI				if PERF_EVENTS || (PPC64 && PPC_BOOK3S)
274eacf4c02SChristophe Leroy	select HAVE_OPTPROBES
2750f71dcfbSNaveen N Rao	select HAVE_OBJTOOL			if ARCH_USING_PATCHABLE_FUNCTION_ENTRY || MPROFILE_KERNEL || PPC32
276c984aef8SSathvika Vasireddy	select HAVE_OBJTOOL_MCOUNT		if HAVE_OBJTOOL
277a7d2475aSMichael Ellerman	select HAVE_PERF_EVENTS
278a7d2475aSMichael Ellerman	select HAVE_PERF_EVENTS_NMI		if PPC64
279a7d2475aSMichael Ellerman	select HAVE_PERF_REGS
280a7d2475aSMichael Ellerman	select HAVE_PERF_USER_STACK_DUMP
2816ad77515SShrikanth Hegde	select HAVE_PREEMPT_DYNAMIC_KEY
28219f1bc3fSAbhishek Dubey	select HAVE_RETHOOK			if KPROBES
283a7d2475aSMichael Ellerman	select HAVE_REGS_AND_STACK_ACCESS_API
284accdd093SChristophe Leroy	select HAVE_RELIABLE_STACKTRACE
285c6b05f4eSChristophe Leroy	select HAVE_RSEQ
28671db948bSNaveen N Rao	select HAVE_SAMPLE_FTRACE_DIRECT	if HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS
28771db948bSNaveen N Rao	select HAVE_SAMPLE_FTRACE_DIRECT_MULTI	if HAVE_DYNAMIC_FTRACE_WITH_DIRECT_CALLS
2887ecd19cfSKefeng Wang	select HAVE_SETUP_PER_CPU_AREA		if PPC64
289cd1a41ceSThomas Gleixner	select HAVE_SOFTIRQ_ON_OWN_STACK
29046e1879dSNathan Chancellor	select HAVE_STACKPROTECTOR		if PPC32 && $(cc-option,$(m32-flag) -mstack-protector-guard=tls -mstack-protector-guard-reg=r2 -mstack-protector-guard-offset=0)
29146e1879dSNathan Chancellor	select HAVE_STACKPROTECTOR		if PPC64 && $(cc-option,$(m64-flag) -mstack-protector-guard=tls -mstack-protector-guard-reg=r13 -mstack-protector-guard-offset=0)
2925c810cedSChristophe Leroy	select HAVE_STATIC_CALL			if PPC32
293f50b4562SChristophe Leroy	select HAVE_STATIC_CALL_INLINE		if PPC32
294a7d2475aSMichael Ellerman	select HAVE_SYSCALL_TRACEPOINTS
295a7d2475aSMichael Ellerman	select HAVE_VIRT_CPU_ACCOUNTING
29601f13550SNicholas Piggin	select HAVE_VIRT_CPU_ACCOUNTING_GEN
29773c58e7eSMichael Ellerman	select HOTPLUG_SMT			if HOTPLUG_CPU
29873c58e7eSMichael Ellerman	select SMT_NUM_THREADS_DYNAMIC
299f96271ceSMichael Ellerman	select HUGETLB_PAGE_SIZE_VARIABLE	if PPC_BOOK3S_64 && HUGETLB_PAGE
300a4ce5a48SChristoph Hellwig	select IOMMU_HELPER			if PPC64
301a7d2475aSMichael Ellerman	select IRQ_DOMAIN
302a7d2475aSMichael Ellerman	select IRQ_FORCED_THREADING
3030a956d52SMike Rapoport (IBM)	select KASAN_VMALLOC			if KASAN && EXECMEM
304e6fe228cSMichael Ellerman	select LOCK_MM_AND_FIND_VMA
305c6b05f4eSChristophe Leroy	select MMU_GATHER_PAGE_SIZE
306c6b05f4eSChristophe Leroy	select MMU_GATHER_RCU_TABLE_FREE
3071e9fdf21SPeter Zijlstra	select MMU_GATHER_MERGE_VMAS
30877f68ebeSNicholas Piggin	select MMU_LAZY_TLB_SHOOTDOWN		if PPC_BOOK3S_64
309a7d2475aSMichael Ellerman	select MODULES_USE_ELF_RELA
31006832fc0SChristoph Hellwig	select NEED_DMA_MAP_STATE		if PPC64 || NOT_COHERENT_CACHE
3117ecd19cfSKefeng Wang	select NEED_PER_CPU_EMBED_FIRST_CHUNK	if PPC64
3127ecd19cfSKefeng Wang	select NEED_PER_CPU_PAGE_FIRST_CHUNK	if PPC64
31386596f0aSChristoph Hellwig	select NEED_SG_DMA_LENGTH
31410f85f43SStephen Rothwell	select OF
315e6ce1324SStephen Neuendorffer	select OF_EARLY_FLATTREE
316a7d2475aSMichael Ellerman	select OLD_SIGACTION			if PPC32
317a7d2475aSMichael Ellerman	select OLD_SIGSUSPEND
3182eac9c2dSChristoph Hellwig	select PCI_DOMAINS			if PCI
319981aa1d3SThomas Gleixner	select PCI_MSI_ARCH_FALLBACKS		if PCI_MSI
32020f1b79dSChristoph Hellwig	select PCI_SYSCALL			if PCI
321a278e7eaSMichael Neuling	select PPC_DAWR				if PPC64
3226e8cef38SArnd Bergmann	select RTC_LIB
323a7d2475aSMichael Ellerman	select SPARSE_IRQ
324c35717c7SRussell Currey	select STRICT_KERNEL_RWX if STRICT_MODULE_RWX
3257ac57a89SCatalin Marinas	select SYSCTL_EXCEPTION_TRACE
326ed1cd6deSChristophe Leroy	select THREAD_INFO_IN_TASK
3274aae683fSMasahiro Yamada	select TRACE_IRQFLAGS_SUPPORT
3288072b39cSChristophe Leroy	select VDSO_GETRANDOM
329a7d2475aSMichael Ellerman	#
330a7d2475aSMichael Ellerman	# Please keep this list sorted alphabetically.
331a7d2475aSMichael Ellerman	#
33214cf11afSPaul Mackerras
333179ab1cbSMichael Ellermanconfig PPC_BARRIER_NOSPEC
334179ab1cbSMichael Ellerman	bool
335179ab1cbSMichael Ellerman	default y
3363e731858SChristophe Leroy	depends on PPC_BOOK3S_64 || PPC_E500
337179ab1cbSMichael Ellerman
338b86cf14fSNicholas Pigginconfig PPC_HAS_LBARX_LHARX
339b86cf14fSNicholas Piggin	bool
340b86cf14fSNicholas Piggin
34114cf11afSPaul Mackerrasconfig EARLY_PRINTK
34214cf11afSPaul Mackerras	bool
34351d3082fSBenjamin Herrenschmidt	default y
34414cf11afSPaul Mackerras
345b71d47c1SJason Baronconfig PANIC_TIMEOUT
346b71d47c1SJason Baron	int
347b71d47c1SJason Baron	default 180
348b71d47c1SJason Baron
34914cf11afSPaul Mackerrasconfig COMPAT
3506e944aedSMichal Suchanek	bool "Enable support for 32bit binaries"
3516e944aedSMichal Suchanek	depends on PPC64
3526e944aedSMichal Suchanek	default y if !CPU_LITTLE_ENDIAN
35348b25c43SChris Metcalf	select ARCH_WANT_OLD_COMPAT_IPC
35409a4d5d0SAl Viro	select COMPAT_OLD_SIGACTION
35514cf11afSPaul Mackerras
356ae1e9130SIngo Molnarconfig SCHED_OMIT_FRAME_POINTER
35714cf11afSPaul Mackerras	bool
35814cf11afSPaul Mackerras	default y
35914cf11afSPaul Mackerras
36014cf11afSPaul Mackerrasconfig ARCH_MAY_HAVE_PC_FDC
36114cf11afSPaul Mackerras	bool
3623484a31fSPranith Kumar	default PCI
36314cf11afSPaul Mackerras
36408264cbcSKumar Galaconfig PPC_UDBG_16550
36508264cbcSKumar Gala	bool
36608264cbcSKumar Gala
36708264cbcSKumar Galaconfig GENERIC_TBSYNC
36808264cbcSKumar Gala	bool
36908264cbcSKumar Gala	default y if PPC32 && SMP
37008264cbcSKumar Gala
371b7472e17SMichael Ellermanconfig AUDIT_ARCH
372b7472e17SMichael Ellerman	bool
373b7472e17SMichael Ellerman	default y
374b7472e17SMichael Ellerman
37573c9ceabSJeremy Fitzhardingeconfig GENERIC_BUG
37673c9ceabSJeremy Fitzhardinge	bool
37773c9ceabSJeremy Fitzhardinge	default y
37873c9ceabSJeremy Fitzhardinge	depends on BUG
37973c9ceabSJeremy Fitzhardinge
3801baa1f70SJordan Nietheconfig GENERIC_BUG_RELATIVE_POINTERS
3811baa1f70SJordan Niethe	def_bool y
3821baa1f70SJordan Niethe	depends on GENERIC_BUG
3831baa1f70SJordan Niethe
384b3028878SJohannes Bergconfig SYS_SUPPORTS_APM_EMULATION
38558da10bbSKumar Gala	default y if PMAC_APM_EMU
386b3028878SJohannes Berg	bool
387b3028878SJohannes Berg
3886c5b59b9SDavid Gibsonconfig EPAPR_BOOT
3896c5b59b9SDavid Gibson	bool
3906c5b59b9SDavid Gibson	help
3916c5b59b9SDavid Gibson	  Used to allow a board to specify it wants an ePAPR compliant wrapper.
3926c5b59b9SDavid Gibson
393f4fc4a5bSKumar Galaconfig DEFAULT_UIMAGE
394f4fc4a5bSKumar Gala	bool
395f4fc4a5bSKumar Gala	help
396f4fc4a5bSKumar Gala	  Used to allow a board to specify it wants a uImage built by default
397f4fc4a5bSKumar Gala
398801e4062SJohannes Bergconfig ARCH_HIBERNATION_POSSIBLE
399801e4062SJohannes Berg	bool
400543b9fd3SJohannes Berg	default y
401543b9fd3SJohannes Berg
402f4cb5700SJohannes Bergconfig ARCH_SUSPEND_POSSIBLE
403f4cb5700SJohannes Berg	def_bool y
4044ffd6952SAnton Vorontsov	depends on ADB_PMU || PPC_EFIKA || PPC_LITE5200 || PPC_83xx || \
405d0832a75SZhao Chenhui		   (PPC_85xx && !PPC_E500MC) || PPC_86xx || PPC_PSERIES \
406e939da89SMichael Ellerman		   || 44x
407f4cb5700SJohannes Berg
4089ca12ac0SNicholas Pigginconfig ARCH_SUSPEND_NONZERO_CPU
4099ca12ac0SNicholas Piggin	def_bool y
4109ca12ac0SNicholas Piggin	depends on PPC_POWERNV || PPC_PSERIES
4119ca12ac0SNicholas Piggin
412ac790d09SAneesh Kumar K.Vconfig ARCH_HAS_ADD_PAGES
413ac790d09SAneesh Kumar K.V	def_bool y
414ac790d09SAneesh Kumar K.V	depends on ARCH_ENABLE_MEMORY_HOTPLUG
415ac790d09SAneesh Kumar K.V
4164c75a6f4SBenjamin Herrenschmidtconfig PPC_DCR_NATIVE
4174c75a6f4SBenjamin Herrenschmidt	bool
4184c75a6f4SBenjamin Herrenschmidt
4194c75a6f4SBenjamin Herrenschmidtconfig PPC_DCR
4204c75a6f4SBenjamin Herrenschmidt	bool
421bd4a8342SMichael Ellerman	depends on PPC_DCR_NATIVE
4224c75a6f4SBenjamin Herrenschmidt	default y
4234c75a6f4SBenjamin Herrenschmidt
4245d2eb73aSPali Rohárconfig PPC_PCI_OF_BUS_MAP
4255d2eb73aSPali Rohár	bool "Use pci_to_OF_bus_map (deprecated)"
4265d2eb73aSPali Rohár	depends on PPC32
4275d2eb73aSPali Rohár	depends on PPC_PMAC || PPC_CHRP
4285d2eb73aSPali Rohár	help
4295d2eb73aSPali Rohár	  This option uses pci_to_OF_bus_map to map OF nodes to PCI devices, which
4305d2eb73aSPali Rohár	  restricts the system to only having 256 PCI buses. On CHRP it also causes
4315d2eb73aSPali Rohár	  the "pci-OF-bus-map" property to be created in the device tree.
4325d2eb73aSPali Rohár
4335d2eb73aSPali Rohár	  If unsure, say "N".
4345d2eb73aSPali Rohár
43556635681SPali Rohárconfig PPC_PCI_BUS_NUM_DOMAIN_DEPENDENT
43656635681SPali Rohár	depends on PPC32
4375d2eb73aSPali Rohár	depends on !PPC_PCI_OF_BUS_MAP
43856635681SPali Rohár	bool "Assign PCI bus numbers from zero individually for each PCI domain"
43934557b75SPali Rohár	default y
44056635681SPali Rohár	help
44156635681SPali Rohár	  By default on PPC32 were PCI bus numbers unique across all PCI domains.
44256635681SPali Rohár	  So system could have only 256 PCI buses independently of available
44356635681SPali Rohár	  PCI domains. When this option is enabled then PCI bus numbers are
44456635681SPali Rohár	  PCI domain dependent and each PCI controller on own domain can have
44556635681SPali Rohár	  256 PCI buses, like it is on other Linux architectures.
44656635681SPali Rohár
4478b7b80b9SAnanth N Mavinakayanahalliconfig ARCH_SUPPORTS_UPROBES
4488b7b80b9SAnanth N Mavinakayanahalli	def_bool y
4498b7b80b9SAnanth N Mavinakayanahalli
450172ae2e7SDave Kleikampconfig PPC_ADV_DEBUG_REGS
451172ae2e7SDave Kleikamp	bool
452e939da89SMichael Ellerman	depends on BOOKE
453172ae2e7SDave Kleikamp	default y
454172ae2e7SDave Kleikamp
455172ae2e7SDave Kleikampconfig PPC_ADV_DEBUG_IACS
456172ae2e7SDave Kleikamp	int
457172ae2e7SDave Kleikamp	depends on PPC_ADV_DEBUG_REGS
458172ae2e7SDave Kleikamp	default 4 if 44x
459172ae2e7SDave Kleikamp	default 2
460172ae2e7SDave Kleikamp
461172ae2e7SDave Kleikampconfig PPC_ADV_DEBUG_DACS
462172ae2e7SDave Kleikamp	int
463172ae2e7SDave Kleikamp	depends on PPC_ADV_DEBUG_REGS
464172ae2e7SDave Kleikamp	default 2
465172ae2e7SDave Kleikamp
466172ae2e7SDave Kleikampconfig PPC_ADV_DEBUG_DVCS
467172ae2e7SDave Kleikamp	int
468172ae2e7SDave Kleikamp	depends on PPC_ADV_DEBUG_REGS
469172ae2e7SDave Kleikamp	default 2 if 44x
470172ae2e7SDave Kleikamp	default 0
471172ae2e7SDave Kleikamp
472172ae2e7SDave Kleikampconfig PPC_ADV_DEBUG_DAC_RANGE
473172ae2e7SDave Kleikamp	bool
474172ae2e7SDave Kleikamp	depends on PPC_ADV_DEBUG_REGS && 44x
475172ae2e7SDave Kleikamp	default y
476172ae2e7SDave Kleikamp
477a278e7eaSMichael Neulingconfig PPC_DAWR
478a278e7eaSMichael Neuling	bool
479a278e7eaSMichael Neuling
48006ef42a1SKirill A. Shutemovconfig PGTABLE_LEVELS
48106ef42a1SKirill A. Shutemov	int
48206ef42a1SKirill A. Shutemov	default 2 if !PPC64
48306ef42a1SKirill A. Shutemov	default 4
48406ef42a1SKirill A. Shutemov
485a2d2e1ecSBenjamin Herrenschmidtsource "arch/powerpc/sysdev/Kconfig"
4864330f5daSKumar Galasource "arch/powerpc/platforms/Kconfig"
48714cf11afSPaul Mackerras
48814cf11afSPaul Mackerrasmenu "Kernel options"
48914cf11afSPaul Mackerras
49014cf11afSPaul Mackerrasconfig HIGHMEM
49114cf11afSPaul Mackerras	bool "High memory support"
49214cf11afSPaul Mackerras	depends on PPC32
49347da42b2SThomas Gleixner	select KMAP_LOCAL
49414cf11afSPaul Mackerras
4958636a1f9SMasahiro Yamadasource "kernel/Kconfig.hz"
49614cf11afSPaul Mackerras
49714cf11afSPaul Mackerrasconfig MATH_EMULATION
49814cf11afSPaul Mackerras	bool "Math emulation"
4997bf5f056SMichael Ellerman	depends on 44x || PPC_8xx || PPC_MPC832x || BOOKE || PPC_MICROWATT
500b6254cedSChristophe Leroy	select PPC_FPU_REGS
5014f44e8aeSEnrico Weigelt, metux IT consult	help
50214cf11afSPaul Mackerras	  Some PowerPC chips designed for embedded applications do not have
50314cf11afSPaul Mackerras	  a floating-point unit and therefore do not implement the
50414cf11afSPaul Mackerras	  floating-point instructions in the PowerPC instruction set.  If you
50514cf11afSPaul Mackerras	  say Y here, the kernel will include code to emulate a floating-point
50614cf11afSPaul Mackerras	  unit, which will allow programs that use floating-point
50714cf11afSPaul Mackerras	  instructions to run.
50814cf11afSPaul Mackerras
5094e63f8edSBenjamin Herrenschmidt	  This is also useful to emulate missing (optional) instructions
5104e63f8edSBenjamin Herrenschmidt	  such as fsqrt on cores that do have an FPU but do not implement
5114e63f8edSBenjamin Herrenschmidt	  them (such as Freescale BookE).
5124e63f8edSBenjamin Herrenschmidt
513e05c0e81SKevin Haochoice
514e05c0e81SKevin Hao	prompt "Math emulation options"
515e05c0e81SKevin Hao	default MATH_EMULATION_FULL
516e05c0e81SKevin Hao	depends on MATH_EMULATION
517e05c0e81SKevin Hao
518e05c0e81SKevin Haoconfig MATH_EMULATION_FULL
519e05c0e81SKevin Hao	bool "Emulate all the floating point instructions"
5204f44e8aeSEnrico Weigelt, metux IT consult	help
521e05c0e81SKevin Hao	  Select this option will enable the kernel to support to emulate
522e05c0e81SKevin Hao	  all the floating point instructions. If your SoC doesn't have
523e05c0e81SKevin Hao	  a FPU, you should select this.
524e05c0e81SKevin Hao
525e05c0e81SKevin Haoconfig MATH_EMULATION_HW_UNIMPLEMENTED
526e05c0e81SKevin Hao	bool "Just emulate the FPU unimplemented instructions"
5274f44e8aeSEnrico Weigelt, metux IT consult	help
528e05c0e81SKevin Hao	  Select this if you know there does have a hardware FPU on your
529e05c0e81SKevin Hao	  SoC, but some floating point instructions are not implemented by that.
530e05c0e81SKevin Hao
531e05c0e81SKevin Haoendchoice
532e05c0e81SKevin Hao
5333d72bbc4SMichael Neulingconfig PPC_TRANSACTIONAL_MEM
5343d72bbc4SMichael Neuling	bool "Transactional Memory support for POWERPC"
5353d72bbc4SMichael Neuling	depends on PPC_BOOK3S_64
5363d72bbc4SMichael Neuling	depends on SMP
5377b37a123SMichael Neuling	select ALTIVEC
5387b37a123SMichael Neuling	select VSX
5394f44e8aeSEnrico Weigelt, metux IT consult	help
5403d72bbc4SMichael Neuling	  Support user-mode Transactional Memory on POWERPC.
5413d72bbc4SMichael Neuling
542013a53f2SAnshuman Khandualconfig PPC_UV
543013a53f2SAnshuman Khandual	bool "Ultravisor support"
544013a53f2SAnshuman Khandual	depends on KVM_BOOK3S_HV_POSSIBLE
545a2db55ddSBharata B Rao	depends on DEVICE_PRIVATE
546013a53f2SAnshuman Khandual	default n
547013a53f2SAnshuman Khandual	help
548013a53f2SAnshuman Khandual	  This option paravirtualizes the kernel to run in POWER platforms that
549013a53f2SAnshuman Khandual	  supports the Protected Execution Facility (PEF). On such platforms,
550013a53f2SAnshuman Khandual	  the ultravisor firmware runs at a privilege level above the
551013a53f2SAnshuman Khandual	  hypervisor.
552013a53f2SAnshuman Khandual
553013a53f2SAnshuman Khandual	  If unsure, say "N".
554013a53f2SAnshuman Khandual
555951eedebSNicholas Pigginconfig LD_HEAD_STUB_CATCH
556951eedebSNicholas Piggin	bool "Reserve 256 bytes to cope with linker stubs in HEAD text" if EXPERT
557951eedebSNicholas Piggin	depends on PPC64
558951eedebSNicholas Piggin	help
559951eedebSNicholas Piggin	  Very large kernels can cause linker branch stubs to be generated by
560951eedebSNicholas Piggin	  code in head_64.S, which moves the head text sections out of their
561951eedebSNicholas Piggin	  specified location. This option can work around the problem.
562951eedebSNicholas Piggin
563951eedebSNicholas Piggin	  If unsure, say "N".
564951eedebSNicholas Piggin
5658c50b72aSTorsten Duweconfig MPROFILE_KERNEL
566aec0ba74SNicholas Piggin	depends on PPC64_ELF_ABI_V2 && FUNCTION_TRACER
567aec0ba74SNicholas Piggin	def_bool $(success,$(srctree)/arch/powerpc/tools/gcc-check-mprofile-kernel.sh $(CC) -mlittle-endian) if CPU_LITTLE_ENDIAN
568aec0ba74SNicholas Piggin	def_bool $(success,$(srctree)/arch/powerpc/tools/gcc-check-mprofile-kernel.sh $(CC) -mbig-endian) if CPU_BIG_ENDIAN
5698c50b72aSTorsten Duwe
5700f71dcfbSNaveen N Raoconfig ARCH_USING_PATCHABLE_FUNCTION_ENTRY
5710f71dcfbSNaveen N Rao	depends on FUNCTION_TRACER && (PPC32 || PPC64_ELF_ABI_V2)
5720f71dcfbSNaveen N Rao	depends on $(cc-option,-fpatchable-function-entry=2)
5730f71dcfbSNaveen N Rao	def_bool y if PPC32
5740f71dcfbSNaveen N Rao	def_bool $(success,$(srctree)/arch/powerpc/tools/gcc-check-fpatchable-function-entry.sh $(CC) -mlittle-endian) if PPC64 && CPU_LITTLE_ENDIAN
5750f71dcfbSNaveen N Rao	def_bool $(success,$(srctree)/arch/powerpc/tools/gcc-check-fpatchable-function-entry.sh $(CC) -mbig-endian) if PPC64 && CPU_BIG_ENDIAN
5760f71dcfbSNaveen N Rao
577eec37961SNaveen N Raoconfig PPC_FTRACE_OUT_OF_LINE
578eec37961SNaveen N Rao	def_bool PPC64 && ARCH_USING_PATCHABLE_FUNCTION_ENTRY
579eec37961SNaveen N Rao	select ARCH_WANTS_PRE_LINK_VMLINUX
580eec37961SNaveen N Rao
581cf9bc0efSNaveen N Raoconfig PPC_FTRACE_OUT_OF_LINE_NUM_RESERVE
582cf9bc0efSNaveen N Rao	int "Number of ftrace out-of-line stubs to reserve within .text"
583cf9bc0efSNaveen N Rao	depends on PPC_FTRACE_OUT_OF_LINE
584cf9bc0efSNaveen N Rao	default 32768
585cf9bc0efSNaveen N Rao	help
586cf9bc0efSNaveen N Rao	  Number of stubs to reserve for use by ftrace. This space is
587cf9bc0efSNaveen N Rao	  reserved within .text, and is distinct from any additional space
588cf9bc0efSNaveen N Rao	  added at the end of .text before the final vmlinux link. Set to
589cf9bc0efSNaveen N Rao	  zero to have stubs only be generated at the end of vmlinux (only
590cf9bc0efSNaveen N Rao	  if the size of vmlinux is less than 32MB). Set to a higher value
591cf9bc0efSNaveen N Rao	  if building vmlinux larger than 48MB.
592cf9bc0efSNaveen N Rao
59314cf11afSPaul Mackerrasconfig HOTPLUG_CPU
59414cf11afSPaul Mackerras	bool "Support for enabling/disabling CPUs"
59540b31360SStephen Rothwell	depends on SMP && (PPC_PSERIES || \
5962f4f1f81Schenhui zhao		PPC_PMAC || PPC_POWERNV || FSL_SOC_BOOKE)
5974f44e8aeSEnrico Weigelt, metux IT consult	help
59814cf11afSPaul Mackerras	  Say Y here to be able to disable and re-enable individual
59914cf11afSPaul Mackerras	  CPUs at runtime on SMP machines.
60014cf11afSPaul Mackerras
60114cf11afSPaul Mackerras	  Say N if you are unsure.
60214cf11afSPaul Mackerras
6030e23347fSRohan McLureconfig INTERRUPT_SANITIZE_REGISTERS
6040e23347fSRohan McLure	bool "Clear gprs on interrupt arrival"
6050e23347fSRohan McLure	depends on PPC64 && ARCH_HAS_SYSCALL_WRAPPER
6067cd882dfSRohan McLure	default PPC_BOOK3E_64 || PPC_PSERIES || PPC_POWERNV
6070e23347fSRohan McLure	help
6080e23347fSRohan McLure	  Reduce the influence of user register state on interrupt handlers and
6090e23347fSRohan McLure	  syscalls through clearing user state from registers before handling
6100e23347fSRohan McLure	  the exception.
6110e23347fSRohan McLure
612aa65ff6bSNicholas Pigginconfig PPC_QUEUED_SPINLOCKS
613c9f34013SNicholas Piggin	bool "Queued spinlocks" if EXPERT
614aa65ff6bSNicholas Piggin	depends on SMP
615c9f34013SNicholas Piggin	default PPC_BOOK3S_64
616aa65ff6bSNicholas Piggin	help
617aa65ff6bSNicholas Piggin	  Say Y here to use queued spinlocks which give better scalability and
618aa65ff6bSNicholas Piggin	  fairness on large SMP and NUMA systems without harming single threaded
619aa65ff6bSNicholas Piggin	  performance.
620aa65ff6bSNicholas Piggin
62112633e80SNathan Fontenotconfig ARCH_CPU_PROBE_RELEASE
62212633e80SNathan Fontenot	def_bool y
62312633e80SNathan Fontenot	depends on HOTPLUG_CPU
62412633e80SNathan Fontenot
625f2296a3dSMahesh Salgaonkarconfig PPC64_SUPPORTS_MEMORY_FAILURE
626f2296a3dSMahesh Salgaonkar	bool "Add support for memory hwpoison"
627f2296a3dSMahesh Salgaonkar	depends on PPC_BOOK3S_64
628f2296a3dSMahesh Salgaonkar	default "y" if PPC_POWERNV
629f2296a3dSMahesh Salgaonkar	select ARCH_SUPPORTS_MEMORY_FAILURE
630f2296a3dSMahesh Salgaonkar
63180bf3c84SEric DeVolderconfig ARCH_SUPPORTS_KEXEC
63280bf3c84SEric DeVolder	def_bool PPC_BOOK3S || PPC_E500 || (44x && !SMP)
63314cf11afSPaul Mackerras
63480bf3c84SEric DeVolderconfig ARCH_SUPPORTS_KEXEC_FILE
635c1ad12eeSArnd Bergmann	def_bool PPC64
63614cf11afSPaul Mackerras
637e6265fe7SEric DeVolderconfig ARCH_SUPPORTS_KEXEC_PURGATORY
638c1ad12eeSArnd Bergmann	def_bool y
639b799a09fSAKASHI Takahiro
64080bf3c84SEric DeVolderconfig ARCH_SELECTS_KEXEC_FILE
64180bf3c84SEric DeVolder	def_bool y
64280bf3c84SEric DeVolder	depends on KEXEC_FILE
64380bf3c84SEric DeVolder	select KEXEC_ELF
64480bf3c84SEric DeVolder	select HAVE_IMA_KEXEC if IMA
64580bf3c84SEric DeVolder
6465017b459SNicholas Pigginconfig PPC64_BIG_ENDIAN_ELF_ABI_V2
6478c5fa3b5SNicholas Piggin	# Option is available to BFD, but LLD does not support ELFv1 so this is
6488c5fa3b5SNicholas Piggin	# always true there.
6498c5fa3b5SNicholas Piggin	prompt "Build big-endian kernel using ELF ABI V2" if LD_IS_BFD && EXPERT
6508c5fa3b5SNicholas Piggin	def_bool y
6515017b459SNicholas Piggin	depends on PPC64 && CPU_BIG_ENDIAN
6525017b459SNicholas Piggin	depends on CC_HAS_ELFV2
6535017b459SNicholas Piggin	help
6545017b459SNicholas Piggin	  This builds the kernel image using the "Power Architecture 64-Bit ELF
6555017b459SNicholas Piggin	  V2 ABI Specification", which has a reduced stack overhead and faster
6565017b459SNicholas Piggin	  function calls. This internal kernel ABI option does not affect
6575017b459SNicholas Piggin          userspace compatibility.
6585017b459SNicholas Piggin
6595017b459SNicholas Piggin	  The V2 ABI is standard for 64-bit little-endian, but for big-endian
6605017b459SNicholas Piggin	  it is less well tested by kernel and toolchain. However some distros
6615017b459SNicholas Piggin	  build userspace this way, and it can produce a functioning kernel.
6625017b459SNicholas Piggin
6634c91bd6eSKevin Haoconfig RELOCATABLE
6644c91bd6eSKevin Hao	bool "Build a relocatable kernel"
665dfc3095cSChristophe Leroy	depends on PPC64 || (FLATMEM && (44x || PPC_85xx))
6664c91bd6eSKevin Hao	select NONSTATIC_KERNEL
6674c91bd6eSKevin Hao	help
6684c91bd6eSKevin Hao	  This builds a kernel image that is capable of running at the
6694c91bd6eSKevin Hao	  location the kernel is loaded at. For ppc32, there is no any
6704c91bd6eSKevin Hao	  alignment restrictions, and this feature is a superset of
6714c91bd6eSKevin Hao	  DYNAMIC_MEMSTART and hence overrides it. For ppc64, we should use
6724c91bd6eSKevin Hao	  16k-aligned base address. The kernel is linked as a
6734c91bd6eSKevin Hao	  position-independent executable (PIE) and contains dynamic relocations
6744c91bd6eSKevin Hao	  which are processed early in the bootup process.
6754c91bd6eSKevin Hao
6764c91bd6eSKevin Hao	  One use is for the kexec on panic case where the recovery kernel
6774c91bd6eSKevin Hao	  must live at a different physical address than the primary
6784c91bd6eSKevin Hao	  kernel.
6794c91bd6eSKevin Hao
6804c91bd6eSKevin Hao	  Note: If CONFIG_RELOCATABLE=y, then the kernel runs from the address
6814c91bd6eSKevin Hao	  it has been loaded at and the compile time physical addresses
6824c91bd6eSKevin Hao	  CONFIG_PHYSICAL_START is ignored.  However CONFIG_PHYSICAL_START
6834c91bd6eSKevin Hao	  setting can still be useful to bootwrappers that need to know the
6844c91bd6eSKevin Hao	  load address of the kernel (eg. u-boot/mkimage).
6854c91bd6eSKevin Hao
6862b0e86ccSJason Yanconfig RANDOMIZE_BASE
6872b0e86ccSJason Yan	bool "Randomize the address of the kernel image"
68873d11498SChristophe Leroy	depends on PPC_85xx && FLATMEM
6892b0e86ccSJason Yan	depends on RELOCATABLE
6902b0e86ccSJason Yan	help
6912b0e86ccSJason Yan	  Randomizes the virtual address at which the kernel image is
6922b0e86ccSJason Yan	  loaded, as a security feature that deters exploit attempts
6932b0e86ccSJason Yan	  relying on knowledge of the location of kernel internals.
6942b0e86ccSJason Yan
6952b0e86ccSJason Yan	  If unsure, say Y.
6962b0e86ccSJason Yan
69770839d20SNicholas Pigginconfig RELOCATABLE_TEST
69870839d20SNicholas Piggin	bool "Test relocatable kernel"
69970839d20SNicholas Piggin	depends on (PPC64 && RELOCATABLE)
70070839d20SNicholas Piggin	help
70170839d20SNicholas Piggin	  This runs the relocatable kernel at the address it was initially
70270839d20SNicholas Piggin	  loaded at, which tends to be non-zero and therefore test the
70370839d20SNicholas Piggin	  relocation code.
70470839d20SNicholas Piggin
70580bf3c84SEric DeVolderconfig ARCH_SUPPORTS_CRASH_DUMP
70680bf3c84SEric DeVolder	def_bool PPC64 || PPC_BOOK3S_32 || PPC_85xx || (44x && !SMP)
70780bf3c84SEric DeVolder
70831daa343SDave Vasilevskyconfig ARCH_DEFAULT_CRASH_DUMP
70931daa343SDave Vasilevsky	bool
71031daa343SDave Vasilevsky	default y if !PPC_BOOK3S_32
71131daa343SDave Vasilevsky
71280bf3c84SEric DeVolderconfig ARCH_SELECTS_CRASH_DUMP
71380bf3c84SEric DeVolder	def_bool y
71480bf3c84SEric DeVolder	depends on CRASH_DUMP
715dfc3095cSChristophe Leroy	select RELOCATABLE if PPC64 || 44x || PPC_85xx
716e8625d46SHaren Myneni
717b741092dSSourabh Jainconfig ARCH_SUPPORTS_CRASH_HOTPLUG
718b741092dSSourabh Jain	def_bool y
719b741092dSSourabh Jain	depends on PPC64
720b741092dSSourabh Jain
721e3185ee4SSourabh Jainconfig ARCH_HAS_GENERIC_CRASHKERNEL_RESERVATION
722e3185ee4SSourabh Jain	def_bool CRASH_RESERVE
723e3185ee4SSourabh Jain
724eb39c880SMahesh Salgaonkarconfig FA_DUMP
725eb39c880SMahesh Salgaonkar	bool "Firmware-assisted dump"
7265c4233ccSHari Bathini	depends on CRASH_DUMP && PPC64 && (PPC_RTAS || PPC_POWERNV)
727242f271cSManish Ahuja	help
728eb39c880SMahesh Salgaonkar	  A robust mechanism to get reliable kernel crash dump with
729eb39c880SMahesh Salgaonkar	  assistance from firmware. This approach does not use kexec,
73022bd0177SHari Bathini	  instead firmware assists in booting the capture kernel
731eb39c880SMahesh Salgaonkar	  while preserving memory contents. Firmware-assisted dump
732eb39c880SMahesh Salgaonkar	  is meant to be a kdump replacement offering robustness and
733eb39c880SMahesh Salgaonkar	  speed not possible without system firmware assistance.
734242f271cSManish Ahuja
73541df5928SHari Bathini	  If unsure, say "y". Only special kernels like petitboot may
73641df5928SHari Bathini	  need to say "N" here.
737242f271cSManish Ahuja
738bec53196SHari Bathiniconfig PRESERVE_FA_DUMP
739bec53196SHari Bathini	bool "Preserve Firmware-assisted dump"
740bec53196SHari Bathini	depends on PPC64 && PPC_POWERNV && !FA_DUMP
741bec53196SHari Bathini	help
742bec53196SHari Bathini	  On a kernel with FA_DUMP disabled, this option helps to preserve
743bec53196SHari Bathini	  crash data from a previously crash'ed kernel. Useful when the next
744bec53196SHari Bathini	  memory preserving kernel boot would process this crash data.
745bec53196SHari Bathini	  Petitboot kernel is the typical usecase for this option.
746bec53196SHari Bathini
7476f713d18SHari Bathiniconfig OPAL_CORE
7486f713d18SHari Bathini	bool "Export OPAL memory as /sys/firmware/opal/core"
7496f713d18SHari Bathini	depends on PPC64 && PPC_POWERNV
7506f713d18SHari Bathini	help
7516f713d18SHari Bathini	  This option uses the MPIPL support in firmware to provide an
7526f713d18SHari Bathini	  ELF core of OPAL memory after a crash. The ELF core is exported
7536f713d18SHari Bathini	  as /sys/firmware/opal/core file which is helpful in debugging
7546f713d18SHari Bathini	  OPAL crashes using GDB.
75514cf11afSPaul Mackerras
75614cf11afSPaul Mackerrasconfig IRQ_ALL_CPUS
75714cf11afSPaul Mackerras	bool "Distribute interrupts on all CPUs by default"
7586cf09b9dSPaul Bolle	depends on SMP
75914cf11afSPaul Mackerras	help
76014cf11afSPaul Mackerras	  This option gives the kernel permission to distribute IRQs across
76114cf11afSPaul Mackerras	  multiple CPUs.  Saying N here will route all IRQs to the first
76214cf11afSPaul Mackerras	  CPU.  Generally saying Y is safe, although some problems have been
76314cf11afSPaul Mackerras	  reported with SMP Power Macintoshes with this option enabled.
76414cf11afSPaul Mackerras
765ffa27b6bSAndy Whitcroftconfig NUMA
766bae80c27SMichael Ellerman	bool "NUMA Memory Allocation and Scheduler Support"
76725395cd2SMichael Ellerman	depends on PPC64 && SMP
7684c28b32bSMichael Ellerman	default y if PPC_PSERIES || PPC_POWERNV
7697ecd19cfSKefeng Wang	select USE_PERCPU_NUMA_NODE_ID
770bae80c27SMichael Ellerman	help
771bae80c27SMichael Ellerman	  Enable NUMA (Non-Uniform Memory Access) support.
772bae80c27SMichael Ellerman
773bae80c27SMichael Ellerman	  The kernel will try to allocate memory used by a CPU on the
774bae80c27SMichael Ellerman	  local memory controller of the CPU and add some more
775bae80c27SMichael Ellerman	  NUMA awareness to the kernel.
776ffa27b6bSAndy Whitcroft
777c80d79d7SYasunori Gotoconfig NODES_SHIFT
778c80d79d7SYasunori Goto	int
779ea55bf29SAnton Blanchard	default "8" if PPC64
780c80d79d7SYasunori Goto	default "4"
781a9ee6cf5SMike Rapoport	depends on NUMA
782c80d79d7SYasunori Goto
78364bb80d8SNishanth Aravamudanconfig HAVE_MEMORYLESS_NODES
78464bb80d8SNishanth Aravamudan	def_bool y
78564bb80d8SNishanth Aravamudan	depends on NUMA
78664bb80d8SNishanth Aravamudan
78714cf11afSPaul Mackerrasconfig ARCH_SELECT_MEMORY_MODEL
78814cf11afSPaul Mackerras	def_bool y
78914cf11afSPaul Mackerras	depends on PPC64
79014cf11afSPaul Mackerras
79114cf11afSPaul Mackerrasconfig ARCH_FLATMEM_ENABLE
79214cf11afSPaul Mackerras	def_bool y
7939100b205SAndy Whitcroft	depends on (PPC64 && !NUMA) || PPC32
79414cf11afSPaul Mackerras
79514cf11afSPaul Mackerrasconfig ARCH_SPARSEMEM_ENABLE
79614cf11afSPaul Mackerras	def_bool y
7979100b205SAndy Whitcroft	depends on PPC64
798d29eff7bSAndy Whitcroft	select SPARSEMEM_VMEMMAP_ENABLE
79945fb6ceaSAnton Blanchard
80045fb6ceaSAnton Blanchardconfig ARCH_SPARSEMEM_DEFAULT
80145fb6ceaSAnton Blanchard	def_bool y
8027b3912f4SMichael Ellerman	depends on PPC_BOOK3S_64
80314cf11afSPaul Mackerras
804f6853eb5SMichael Ellermanconfig ILLEGAL_POINTER_VALUE
805f6853eb5SMichael Ellerman	hex
806f6853eb5SMichael Ellerman	# This is roughly half way between the top of user space and the bottom
807f6853eb5SMichael Ellerman	# of kernel space, which seems about as good as we can get.
808f6853eb5SMichael Ellerman	default 0x5deadbeef0000000 if PPC64
809f6853eb5SMichael Ellerman	default 0
810f6853eb5SMichael Ellerman
8117e9191daSMike Kravetzconfig ARCH_MEMORY_PROBE
8127e9191daSMike Kravetz	def_bool y
8137e9191daSMike Kravetz	depends on MEMORY_HOTPLUG
8147e9191daSMike Kravetz
815ca9153a3SIlya Yanokchoice
816ca9153a3SIlya Yanok	prompt "Page size"
817f22969a6SJoel Stanley	default PPC_64K_PAGES if PPC_BOOK3S_64
818ca9153a3SIlya Yanok	default PPC_4K_PAGES
8193c726f8dSBenjamin Herrenschmidt	help
820ca9153a3SIlya Yanok	  Select the kernel logical page size. Increasing the page size
821ca9153a3SIlya Yanok	  will reduce software overhead at each page boundary, allow
822ca9153a3SIlya Yanok	  hardware prefetch mechanisms to be more effective, and allow
823ca9153a3SIlya Yanok	  larger dma transfers increasing IO efficiency and reducing
824ca9153a3SIlya Yanok	  overhead. However the utilization of memory will increase.
825ca9153a3SIlya Yanok	  For example, each cached file will using a multiple of the
826ca9153a3SIlya Yanok	  page size to hold its contents and the difference between the
827ca9153a3SIlya Yanok	  end of file and the end of page is wasted.
828ca9153a3SIlya Yanok
829ca9153a3SIlya Yanok	  Some dedicated systems, such as software raid serving with
830ca9153a3SIlya Yanok	  accelerated calculations, have shown significant increases.
831ca9153a3SIlya Yanok
832ca9153a3SIlya Yanok	  If you configure a 64 bit kernel for 64k pages but the
833ca9153a3SIlya Yanok	  processor does not support them, then the kernel will simulate
834ca9153a3SIlya Yanok	  them with 4k pages, loading them on demand, but with the
835ca9153a3SIlya Yanok	  reduced software overhead and larger internal fragmentation.
836ca9153a3SIlya Yanok	  For the 32 bit kernel, a large page option will not be offered
837ca9153a3SIlya Yanok	  unless it is supported by the configured processor.
838ca9153a3SIlya Yanok
839ca9153a3SIlya Yanok	  If unsure, choose 4K_PAGES.
840ca9153a3SIlya Yanok
841ca9153a3SIlya Yanokconfig PPC_4K_PAGES
842ca9153a3SIlya Yanok	bool "4k page size"
84319f97c98SAneesh Kumar K.V	select HAVE_ARCH_SOFT_DIRTY if PPC_BOOK3S_64
844d3e5bab9SArnd Bergmann	select HAVE_PAGE_SIZE_4KB
845ca9153a3SIlya Yanok
846ca9153a3SIlya Yanokconfig PPC_16K_PAGES
84755f8b5b8SMichael Ellerman	bool "16k page size"
84855c8fc3fSChristophe Leroy	depends on 44x || PPC_8xx
849d3e5bab9SArnd Bergmann	select HAVE_PAGE_SIZE_16KB
850ca9153a3SIlya Yanok
851ca9153a3SIlya Yanokconfig PPC_64K_PAGES
85255f8b5b8SMichael Ellerman	bool "64k page size"
853bba43630SMichael Ellerman	depends on 44x || PPC_BOOK3S_64
85419f97c98SAneesh Kumar K.V	select HAVE_ARCH_SOFT_DIRTY if PPC_BOOK3S_64
855d3e5bab9SArnd Bergmann	select HAVE_PAGE_SIZE_64KB
856ca9153a3SIlya Yanok
857e1240122SYuri Tikhonovconfig PPC_256K_PAGES
8584eeef098SChristophe Leroy	bool "256k page size (Requires non-standard binutils settings)"
8594eeef098SChristophe Leroy	depends on 44x && !PPC_47x
860d3e5bab9SArnd Bergmann	select HAVE_PAGE_SIZE_256KB
861e1240122SYuri Tikhonov	help
862e1240122SYuri Tikhonov	  Make the page size 256k.
863e1240122SYuri Tikhonov
8644eeef098SChristophe Leroy	  The kernel will only be able to run applications that have been
8654eeef098SChristophe Leroy	  compiled with '-zmax-page-size' set to 256K (the default is 64K) using
8664eeef098SChristophe Leroy	  binutils later than 2.17.50.0.3, or by patching the ELF_MAXPAGESIZE
8674eeef098SChristophe Leroy	  definition from 0x10000 to 0x40000 in older versions.
868e1240122SYuri Tikhonov
869ca9153a3SIlya Yanokendchoice
8703c726f8dSBenjamin Herrenschmidt
87147613407SHamish Martinconfig THREAD_SHIFT
87247613407SHamish Martin	int "Thread shift" if EXPERT
87347613407SHamish Martin	range 13 15
87447613407SHamish Martin	default "15" if PPC_256K_PAGES
87518f14afeSMichael Ellerman	default "15" if PPC_PSERIES || PPC_POWERNV
87647613407SHamish Martin	default "14" if PPC64
87747613407SHamish Martin	default "13"
87847613407SHamish Martin	help
87947613407SHamish Martin	  Used to define the stack size. The default is almost always what you
88047613407SHamish Martin	  want. Only change this if you know what you are doing.
88147613407SHamish Martin
8820f4a9041SChristophe Leroyconfig DATA_SHIFT_BOOL
883da1adea0SChristophe Leroy	bool "Set custom data alignment"
8840f4a9041SChristophe Leroy	depends on ADVANCED_OPTIONS
88590cbac0eSChristophe Leroy	depends on STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE
886bcf77a70SChristophe Leroy	depends on (PPC_8xx && !PIN_TLB_DATA && (!STRICT_KERNEL_RWX || !PIN_TLB_TEXT)) || \
887bcf77a70SChristophe Leroy		   PPC_BOOK3S_32 || PPC_85xx
8880f4a9041SChristophe Leroy	help
8890f4a9041SChristophe Leroy	  This option allows you to set the kernel data alignment. When
8900f4a9041SChristophe Leroy	  RAM is mapped by blocks, the alignment needs to fit the size and
8910f4a9041SChristophe Leroy	  number of possible blocks. The default should be OK for most configs.
8920f4a9041SChristophe Leroy
8930f4a9041SChristophe Leroy	  Say N here unless you know what you are doing.
894166d97d9SChristophe Leroy
895166d97d9SChristophe Leroyconfig DATA_SHIFT
8960f4a9041SChristophe Leroy	int "Data shift" if DATA_SHIFT_BOOL
897166d97d9SChristophe Leroy	default 24 if STRICT_KERNEL_RWX && PPC64
89890cbac0eSChristophe Leroy	range 17 28 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_BOOK3S_32
899f9cb1476SChristophe Leroy	range 14 23 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_8xx
900dfc3095cSChristophe Leroy	range 20 24 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_85xx
90163b2bc61SChristophe Leroy	default 22 if STRICT_KERNEL_RWX && PPC_BOOK3S_32
90290cbac0eSChristophe Leroy	default 18 if (DEBUG_PAGEALLOC || KFENCE) && PPC_BOOK3S_32
903bcf77a70SChristophe Leroy	default 23 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_8xx && \
904bcf77a70SChristophe Leroy		      (PIN_TLB_DATA || PIN_TLB_TEXT)
905bcf77a70SChristophe Leroy	default 19 if (STRICT_KERNEL_RWX || DEBUG_PAGEALLOC || KFENCE) && PPC_8xx
906dfc3095cSChristophe Leroy	default 24 if STRICT_KERNEL_RWX && PPC_85xx
907d3e5bab9SArnd Bergmann	default PAGE_SHIFT
9080f4a9041SChristophe Leroy	help
9090f4a9041SChristophe Leroy	  On Book3S 32 (603+), DBATs are used to map kernel text and rodata RO.
9100f4a9041SChristophe Leroy	  Smaller is the alignment, greater is the number of necessary DBATs.
911166d97d9SChristophe Leroy
912f9cb1476SChristophe Leroy	  On 8xx, large pages (16kb or 512kb or 8M) are used to map kernel
913f9cb1476SChristophe Leroy	  linear memory. Aligning to 8M reduces TLB misses as only 8M pages
914f9cb1476SChristophe Leroy	  are used in that case. If PIN_TLB is selected, it must be aligned
915f9cb1476SChristophe Leroy	  to 8M as 8M pages will be pinned.
9168f54a6f7SChristophe Leroy
9170192445cSZi Yanconfig ARCH_FORCE_MAX_ORDER
9186fc54303SMike Rapoport (IBM)	int "Order of maximal physically contiguous allocations"
919358e526aSMichael Ellerman	range 7 8 if PPC64 && PPC_64K_PAGES
92023baf831SKirill A. Shutemov	default "8" if PPC64 && PPC_64K_PAGES
921358e526aSMichael Ellerman	range 12 12 if PPC64 && !PPC_64K_PAGES
92223baf831SKirill A. Shutemov	default "12" if PPC64 && !PPC_64K_PAGES
923358e526aSMichael Ellerman	range 8 10 if PPC32 && PPC_16K_PAGES
92423baf831SKirill A. Shutemov	default "8" if PPC32 && PPC_16K_PAGES
925358e526aSMichael Ellerman	range 6 10 if PPC32 && PPC_64K_PAGES
92623baf831SKirill A. Shutemov	default "6" if PPC32 && PPC_64K_PAGES
927358e526aSMichael Ellerman	range 4 10 if PPC32 && PPC_256K_PAGES
92823baf831SKirill A. Shutemov	default "4" if PPC32 && PPC_256K_PAGES
929ff9e8f41SMichael Ellerman	range 10 12
93023baf831SKirill A. Shutemov	default "10"
93153bcddb9SStephen Rothwell	help
9326fc54303SMike Rapoport (IBM)	  The kernel page allocator limits the size of maximal physically
9335e0a760bSKirill A. Shutemov	  contiguous allocations. The limit is called MAX_PAGE_ORDER and it
9346fc54303SMike Rapoport (IBM)	  defines the maximal power of two of number of pages that can be
9356fc54303SMike Rapoport (IBM)	  allocated as a single contiguous block. This option allows
9366fc54303SMike Rapoport (IBM)	  overriding the default setting when ability to allocate very
9376fc54303SMike Rapoport (IBM)	  large blocks of physically contiguous memory is required.
93853bcddb9SStephen Rothwell
93953bcddb9SStephen Rothwell	  The page size is not necessarily 4KB.  For example, on 64-bit
94053bcddb9SStephen Rothwell	  systems, 64KB pages can be enabled via CONFIG_PPC_64K_PAGES.  Keep
94153bcddb9SStephen Rothwell	  this in mind when choosing a value for this option.
94253bcddb9SStephen Rothwell
9436fc54303SMike Rapoport (IBM)	  Don't change if unsure.
9446fc54303SMike Rapoport (IBM)
945fa28237cSPaul Mackerrasconfig PPC_SUBPAGE_PROT
94663396adaSNicholas Piggin	bool "Support setting protections for 4k subpages (subpage_prot syscall)"
94763396adaSNicholas Piggin	default n
948c2857374SNicholas Piggin	depends on PPC_64S_HASH_MMU && PPC_64K_PAGES
949fa28237cSPaul Mackerras	help
95063396adaSNicholas Piggin	  This option adds support for system call to allow user programs
951fa28237cSPaul Mackerras	  to set access permissions (read/write, readonly, or no access)
952fa28237cSPaul Mackerras	  on the 4k subpages of each 64k page.
953fa28237cSPaul Mackerras
95463396adaSNicholas Piggin	  If unsure, say N here.
95563396adaSNicholas Piggin
9569b725a90SShawn Anastasioconfig PPC_PROT_SAO_LPAR
9579b725a90SShawn Anastasio	bool "Support PROT_SAO mappings in LPARs"
9589b725a90SShawn Anastasio	depends on PPC_BOOK3S_64
9599b725a90SShawn Anastasio	help
9609b725a90SShawn Anastasio	  This option adds support for PROT_SAO mappings from userspace
9619b725a90SShawn Anastasio	  inside LPARs on supported CPUs.
9629b725a90SShawn Anastasio
9639b725a90SShawn Anastasio	  This may cause issues when performing guest migration from
9649b725a90SShawn Anastasio	  a CPU that supports SAO to one that does not.
9659b725a90SShawn Anastasio
9669b725a90SShawn Anastasio	  If unsure, say N here.
9679b725a90SShawn Anastasio
968e83d0169SIan Munsieconfig PPC_COPRO_BASE
969e83d0169SIan Munsie	bool
970e83d0169SIan Munsie
971b92a66a6SMichael Neulingconfig PPC_DENORMALISATION
972b92a66a6SMichael Neuling	bool "PowerPC denormalisation exception handling"
973b92a66a6SMichael Neuling	depends on PPC_BOOK3S_64
9744e90a2a7SAnton Blanchard	default "y" if PPC_POWERNV
9754f44e8aeSEnrico Weigelt, metux IT consult	help
976b92a66a6SMichael Neuling	  Add support for handling denormalisation of single precision
977b92a66a6SMichael Neuling	  values.  Useful for bare metal only.  If unsure say Y here.
978b92a66a6SMichael Neuling
97914cf11afSPaul Mackerrasconfig CMDLINE
980f134a7ceSChris Packham	string "Initial kernel command string"
981cbe46bd4SChristophe Leroy	default ""
98214cf11afSPaul Mackerras	help
98314cf11afSPaul Mackerras	  On some platforms, there is currently no way for the boot loader to
98414cf11afSPaul Mackerras	  pass arguments to the kernel. For these platforms, you can supply
98514cf11afSPaul Mackerras	  some command-line options at build time by entering them here.  In
98614cf11afSPaul Mackerras	  most cases you will need to specify the root device here.
98714cf11afSPaul Mackerras
988d79fbb3aSChris Packhamchoice
989b9d73218SMasahiro Yamada	prompt "Kernel command line type"
990b9d73218SMasahiro Yamada	depends on CMDLINE != ""
991d79fbb3aSChris Packham	default CMDLINE_FROM_BOOTLOADER
992d79fbb3aSChris Packham
993d79fbb3aSChris Packhamconfig CMDLINE_FROM_BOOTLOADER
994d79fbb3aSChris Packham	bool "Use bootloader kernel arguments if available"
995d79fbb3aSChris Packham	help
996d79fbb3aSChris Packham	  Uses the command-line options passed by the boot loader. If
997d79fbb3aSChris Packham	  the boot loader doesn't provide any, the default kernel command
998d79fbb3aSChris Packham	  string provided in CMDLINE will be used.
999d79fbb3aSChris Packham
1000d79fbb3aSChris Packhamconfig CMDLINE_EXTEND
1001d79fbb3aSChris Packham	bool "Extend bootloader kernel arguments"
1002d79fbb3aSChris Packham	help
1003d79fbb3aSChris Packham	  The command-line arguments provided by the boot loader will be
1004d79fbb3aSChris Packham	  appended to the default kernel command string.
1005d79fbb3aSChris Packham
1006eb3b80f6SSebastian Siewiorconfig CMDLINE_FORCE
1007eb3b80f6SSebastian Siewior	bool "Always use the default kernel command string"
1008eb3b80f6SSebastian Siewior	help
1009eb3b80f6SSebastian Siewior	  Always use the default kernel command string, even if the boot
1010eb3b80f6SSebastian Siewior	  loader passes other arguments to the kernel.
1011eb3b80f6SSebastian Siewior	  This is useful if you cannot or don't want to change the
1012eb3b80f6SSebastian Siewior	  command-line options your boot loader passes to the kernel.
1013eb3b80f6SSebastian Siewior
1014d79fbb3aSChris Packhamendchoice
1015d79fbb3aSChris Packham
1016c356aa45SGrant Likelyconfig EXTRA_TARGETS
1017c356aa45SGrant Likely	string "Additional default image types"
1018c356aa45SGrant Likely	help
1019c356aa45SGrant Likely	  List additional targets to be built by the bootwrapper here (separated
1020c356aa45SGrant Likely	  by spaces).  This is useful for targets that depend of device tree
1021c356aa45SGrant Likely	  files in the .dts directory.
1022c356aa45SGrant Likely
1023c356aa45SGrant Likely	  Targets in this list will be build as part of the default build
1024c356aa45SGrant Likely	  target, or when the user does a 'make zImage' or a
1025c356aa45SGrant Likely	  'make zImage.initrd'.
1026c356aa45SGrant Likely
1027c356aa45SGrant Likely	  If unsure, leave blank
1028c356aa45SGrant Likely
1029b28f5081SJohannes Bergconfig ARCH_WANTS_FREEZER_CONTROL
1030b28f5081SJohannes Berg	def_bool y
1031b28f5081SJohannes Berg	depends on ADB_PMU
1032b28f5081SJohannes Berg
10338636a1f9SMasahiro Yamadasource "kernel/power/Kconfig"
103414cf11afSPaul Mackerras
103592e3da3cSRam Paiconfig PPC_MEM_KEYS
103692e3da3cSRam Pai	prompt "PowerPC Memory Protection Keys"
103792e3da3cSRam Pai	def_bool y
103892e3da3cSRam Pai	depends on PPC_BOOK3S_64
1039c2857374SNicholas Piggin	depends on PPC_64S_HASH_MMU
104092e3da3cSRam Pai	select ARCH_USES_HIGH_VMA_FLAGS
104192e3da3cSRam Pai	select ARCH_HAS_PKEYS
104292e3da3cSRam Pai	help
104392e3da3cSRam Pai	  Memory Protection Keys provides a mechanism for enforcing
104492e3da3cSRam Pai	  page-based protections, but without requiring modification of the
104592e3da3cSRam Pai	  page tables when an application changes protection domains.
104692e3da3cSRam Pai
10471eecbcdcSMauro Carvalho Chehab	  For details, see Documentation/core-api/protection-keys.rst
104892e3da3cSRam Pai
104992e3da3cSRam Pai	  If unsure, say y.
105092e3da3cSRam Pai
105112930e3aSJoey Goulyconfig ARCH_PKEY_BITS
105212930e3aSJoey Gouly	int
105312930e3aSJoey Gouly	default 5
105412930e3aSJoey Gouly
10551a8916eeSNayna Jainconfig PPC_SECURE_BOOT
10561a8916eeSNayna Jain	prompt "Enable secure boot support"
10571a8916eeSNayna Jain	bool
10585c5e46daSDaniel Axtens	depends on PPC_POWERNV || PPC_PSERIES
10594238fad3SNayna Jain	depends on IMA_ARCH_POLICY
10609e2b4be3SNayna Jain	imply IMA_SECURE_AND_OR_TRUSTED_BOOT
106146b2cbebSAndrew Donnellan	select PSERIES_PLPKS if PPC_PSERIES
10621a8916eeSNayna Jain	help
10631a8916eeSNayna Jain	  Systems with firmware secure boot enabled need to define security
10641a8916eeSNayna Jain	  policies to extend secure boot to the OS. This config allows a user
10651a8916eeSNayna Jain	  to enable OS secure boot on systems that have firmware support for
10661a8916eeSNayna Jain	  it. If in doubt say N.
10671a8916eeSNayna Jain
1068bd5d9c74SNayna Jainconfig PPC_SECVAR_SYSFS
1069bd5d9c74SNayna Jain	bool "Enable sysfs interface for POWER secure variables"
1070bd5d9c74SNayna Jain	default y
1071bd5d9c74SNayna Jain	depends on PPC_SECURE_BOOT
1072bd5d9c74SNayna Jain	depends on SYSFS
1073bd5d9c74SNayna Jain	help
1074bd5d9c74SNayna Jain	  POWER secure variables are managed and controlled by firmware.
1075bd5d9c74SNayna Jain	  These variables are exposed to userspace via sysfs to enable
1076bd5d9c74SNayna Jain	  read/write operations on these variables. Say Y if you have
1077bd5d9c74SNayna Jain	  secure boot enabled and want to expose variables to userspace.
1078bd5d9c74SNayna Jain
107914cf11afSPaul Mackerrasendmenu
108014cf11afSPaul Mackerras
108114cf11afSPaul Mackerrasconfig ISA_DMA_API
108214cf11afSPaul Mackerras	bool
10833d066d77SStephen Rothwell	default PCI
108414cf11afSPaul Mackerras
108514cf11afSPaul Mackerrasmenu "Bus options"
108614cf11afSPaul Mackerras
108714cf11afSPaul Mackerrasconfig ISA
108814cf11afSPaul Mackerras	bool "Support for ISA-bus hardware"
1089933ee711SPaul Bolle	depends on PPC_CHRP
1090f9bd170aSPaul Mackerras	select PPC_I8259
109114cf11afSPaul Mackerras	help
109214cf11afSPaul Mackerras	  Find out whether you have ISA slots on your motherboard.  ISA is the
109314cf11afSPaul Mackerras	  name of a bus system, i.e. the way the CPU talks to the other stuff
109414cf11afSPaul Mackerras	  inside your box.  If you have an Apple machine, say N here; if you
1095933ee711SPaul Bolle	  have an IBM RS/6000 or pSeries machine, say Y.  If you have an
1096933ee711SPaul Bolle	  embedded board, consult your board documentation.
109714cf11afSPaul Mackerras
109814cf11afSPaul Mackerrasconfig GENERIC_ISA_DMA
109914cf11afSPaul Mackerras	bool
11001927445aSAnton Vorontsov	depends on ISA_DMA_API
110114cf11afSPaul Mackerras	default y
110214cf11afSPaul Mackerras
110325635c71SPaul Mackerrasconfig PPC_INDIRECT_PCI
110425635c71SPaul Mackerras	bool
110525635c71SPaul Mackerras	depends on PCI
1106e939da89SMichael Ellerman	default y if 44x
110725635c71SPaul Mackerras
110814cf11afSPaul Mackerrasconfig SBUS
110914cf11afSPaul Mackerras	bool
111014cf11afSPaul Mackerras
111108264cbcSKumar Galaconfig FSL_SOC
111208264cbcSKumar Gala	bool
111308264cbcSKumar Gala
111455c44991SRoy Zangconfig FSL_PCI
111555c44991SRoy Zang	bool
111611ddce15SChristoph Hellwig	select ARCH_HAS_DMA_SET_MASK
111755c44991SRoy Zang	select PPC_INDIRECT_PCI
1118d0839118SKumar Gala	select PCI_QUIRKS
111955c44991SRoy Zang
11204ffd6952SAnton Vorontsovconfig FSL_PMC
11214ffd6952SAnton Vorontsov	bool
11224ffd6952SAnton Vorontsov	default y
11234ffd6952SAnton Vorontsov	depends on SUSPEND && (PPC_85xx || PPC_86xx)
11244ffd6952SAnton Vorontsov	help
11254ffd6952SAnton Vorontsov	  Freescale MPC85xx/MPC86xx power management controller support
11264ffd6952SAnton Vorontsov	  (suspend/resume). For MPC83xx see platforms/83xx/suspend.c
11274ffd6952SAnton Vorontsov
1128d164f6d4SVictor Gallardoconfig PPC4xx_CPM
1129d164f6d4SVictor Gallardo	bool
1130d164f6d4SVictor Gallardo	default y
1131e939da89SMichael Ellerman	depends on SUSPEND && 44x
1132d164f6d4SVictor Gallardo	help
1133d164f6d4SVictor Gallardo	  PPC4xx Clock Power Management (CPM) support (suspend/resume).
1134d164f6d4SVictor Gallardo	  It also enables support for two different idle states (idle-wait
1135d164f6d4SVictor Gallardo	  and idle-doze).
1136d164f6d4SVictor Gallardo
1137acaa7aa3SAnton Vorontsovconfig FSL_LBC
11383ab8f2a2SRoy Zang	bool "Freescale Local Bus support"
1139acaa7aa3SAnton Vorontsov	help
11403ab8f2a2SRoy Zang	  Enables reporting of errors from the Freescale local bus
11413ab8f2a2SRoy Zang	  controller.  Also contains some common code used by
11423ab8f2a2SRoy Zang	  drivers for specific local bus peripherals.
1143acaa7aa3SAnton Vorontsov
114483ff9dcfSAnton Vorontsovconfig FSL_GTM
114583ff9dcfSAnton Vorontsov	bool
114683ff9dcfSAnton Vorontsov	depends on PPC_83xx || QUICC_ENGINE || CPM2
114783ff9dcfSAnton Vorontsov	help
114883ff9dcfSAnton Vorontsov	  Freescale General-purpose Timers support
114983ff9dcfSAnton Vorontsov
1150388b78adSAlexandre Bounineconfig FSL_RIO
1151388b78adSAlexandre Bounine	bool "Freescale Embedded SRIO Controller support"
11521753d50cSChristoph Hellwig	depends on RAPIDIO = y && HAVE_RAPIDIO
1153388b78adSAlexandre Bounine	default "n"
11544f44e8aeSEnrico Weigelt, metux IT consult	help
1155388b78adSAlexandre Bounine	  Include support for RapidIO controller on Freescale embedded
1156388b78adSAlexandre Bounine	  processors (MPC8548, MPC8641, etc).
1157388b78adSAlexandre Bounine
115814cf11afSPaul Mackerrasendmenu
115914cf11afSPaul Mackerras
11600f890c8dSSuzuki Pouloseconfig NONSTATIC_KERNEL
11610f890c8dSSuzuki Poulose	bool
11620f890c8dSSuzuki Poulose
116314cf11afSPaul Mackerrasmenu "Advanced setup"
116414cf11afSPaul Mackerras	depends on PPC32
116514cf11afSPaul Mackerras
116614cf11afSPaul Mackerrasconfig ADVANCED_OPTIONS
116714cf11afSPaul Mackerras	bool "Prompt for advanced kernel configuration options"
116814cf11afSPaul Mackerras	help
116914cf11afSPaul Mackerras	  This option will enable prompting for a variety of advanced kernel
117014cf11afSPaul Mackerras	  configuration options.  These options can cause the kernel to not
117114cf11afSPaul Mackerras	  work if they are set incorrectly, but can be used to optimize certain
117214cf11afSPaul Mackerras	  aspects of kernel memory management.
117314cf11afSPaul Mackerras
117414cf11afSPaul Mackerras	  Unless you know what you are doing, say N here.
117514cf11afSPaul Mackerras
117614cf11afSPaul Mackerrascomment "Default settings for advanced configuration options are used"
117714cf11afSPaul Mackerras	depends on !ADVANCED_OPTIONS
117814cf11afSPaul Mackerras
117914cf11afSPaul Mackerrasconfig LOWMEM_SIZE_BOOL
118014cf11afSPaul Mackerras	bool "Set maximum low memory"
118114cf11afSPaul Mackerras	depends on ADVANCED_OPTIONS
118214cf11afSPaul Mackerras	help
118314cf11afSPaul Mackerras	  This option allows you to set the maximum amount of memory which
118414cf11afSPaul Mackerras	  will be used as "low memory", that is, memory which the kernel can
118514cf11afSPaul Mackerras	  access directly, without having to set up a kernel virtual mapping.
118614cf11afSPaul Mackerras	  This can be useful in optimizing the layout of kernel virtual
118714cf11afSPaul Mackerras	  memory.
118814cf11afSPaul Mackerras
118914cf11afSPaul Mackerras	  Say N here unless you know what you are doing.
119014cf11afSPaul Mackerras
119114cf11afSPaul Mackerrasconfig LOWMEM_SIZE
119214cf11afSPaul Mackerras	hex "Maximum low memory size (in bytes)" if LOWMEM_SIZE_BOOL
119314cf11afSPaul Mackerras	default "0x30000000"
119414cf11afSPaul Mackerras
119596051465STrent Piephoconfig LOWMEM_CAM_NUM_BOOL
119696051465STrent Piepho	bool "Set number of CAMs to use to map low memory"
1197dfc3095cSChristophe Leroy	depends on ADVANCED_OPTIONS && PPC_85xx
119896051465STrent Piepho	help
119996051465STrent Piepho	  This option allows you to set the maximum number of CAM slots that
120096051465STrent Piepho	  will be used to map low memory.  There are a limited number of slots
120196051465STrent Piepho	  available and even more limited number that will fit in the L1 MMU.
120296051465STrent Piepho	  However, using more entries will allow mapping more low memory.  This
120396051465STrent Piepho	  can be useful in optimizing the layout of kernel virtual memory.
120496051465STrent Piepho
120596051465STrent Piepho	  Say N here unless you know what you are doing.
120696051465STrent Piepho
120796051465STrent Piephoconfig LOWMEM_CAM_NUM
1208dfc3095cSChristophe Leroy	depends on PPC_85xx
120996051465STrent Piepho	int "Number of CAMs to use to map low memory" if LOWMEM_CAM_NUM_BOOL
121049e3d8eaSChristophe Leroy	default 3 if !STRICT_KERNEL_RWX
121149e3d8eaSChristophe Leroy	default 9 if DATA_SHIFT >= 24
121249e3d8eaSChristophe Leroy	default 12 if DATA_SHIFT >= 22
121349e3d8eaSChristophe Leroy	default 15
121496051465STrent Piepho
12150f890c8dSSuzuki Pouloseconfig DYNAMIC_MEMSTART
1216642e56ffSKees Cook	bool "Enable page aligned dynamic load address for kernel"
1217dfc3095cSChristophe Leroy	depends on ADVANCED_OPTIONS && FLATMEM && (PPC_85xx || 44x)
12180f890c8dSSuzuki Poulose	select NONSTATIC_KERNEL
121937dd2badSKumar Gala	help
12200f890c8dSSuzuki Poulose	  This option enables the kernel to be loaded at any page aligned
12210f890c8dSSuzuki Poulose	  physical address. The kernel creates a mapping from KERNELBASE to
12220f890c8dSSuzuki Poulose	  the address where the kernel is loaded. The page size here implies
12230f890c8dSSuzuki Poulose	  the TLB page size of the mapping for kernel on the particular platform.
12240f890c8dSSuzuki Poulose	  Please refer to the init code for finding the TLB page size.
122537dd2badSKumar Gala
12260f890c8dSSuzuki Poulose	  DYNAMIC_MEMSTART is an easy way of implementing pseudo-RELOCATABLE
12270f890c8dSSuzuki Poulose	  kernel image, where the only restriction is the page aligned kernel
12280f890c8dSSuzuki Poulose	  load address. When this option is enabled, the compile time physical
12290f890c8dSSuzuki Poulose	  address CONFIG_PHYSICAL_START is ignored.
123037dd2badSKumar Gala
12319c5f7d39SSuzuki Poulose	  This option is overridden by CONFIG_RELOCATABLE
12329c5f7d39SSuzuki Poulose
123337dd2badSKumar Galaconfig PAGE_OFFSET_BOOL
123437dd2badSKumar Gala	bool "Set custom page offset address"
123537dd2badSKumar Gala	depends on ADVANCED_OPTIONS
123637dd2badSKumar Gala	help
123737dd2badSKumar Gala	  This option allows you to set the kernel virtual address at which
123837dd2badSKumar Gala	  the kernel will map low memory.  This can be useful in optimizing
123937dd2badSKumar Gala	  the virtual memory layout of the system.
124037dd2badSKumar Gala
124137dd2badSKumar Gala	  Say N here unless you know what you are doing.
124237dd2badSKumar Gala
124337dd2badSKumar Galaconfig PAGE_OFFSET
124437dd2badSKumar Gala	hex "Virtual address of memory base" if PAGE_OFFSET_BOOL
124537dd2badSKumar Gala	default "0xc0000000"
124637dd2badSKumar Gala
124714cf11afSPaul Mackerrasconfig KERNEL_START_BOOL
124814cf11afSPaul Mackerras	bool "Set custom kernel base address"
124914cf11afSPaul Mackerras	depends on ADVANCED_OPTIONS
125014cf11afSPaul Mackerras	help
125114cf11afSPaul Mackerras	  This option allows you to set the kernel virtual address at which
125237dd2badSKumar Gala	  the kernel will be loaded.  Normally this should match PAGE_OFFSET
125337dd2badSKumar Gala	  however there are times (like kdump) that one might not want them
125437dd2badSKumar Gala	  to be the same.
125514cf11afSPaul Mackerras
125614cf11afSPaul Mackerras	  Say N here unless you know what you are doing.
125714cf11afSPaul Mackerras
125814cf11afSPaul Mackerrasconfig KERNEL_START
125914cf11afSPaul Mackerras	hex "Virtual address of kernel base" if KERNEL_START_BOOL
126037dd2badSKumar Gala	default PAGE_OFFSET if PAGE_OFFSET_BOOL
12610f890c8dSSuzuki Poulose	default "0xc2000000" if CRASH_DUMP && !NONSTATIC_KERNEL
126214cf11afSPaul Mackerras	default "0xc0000000"
126314cf11afSPaul Mackerras
126437dd2badSKumar Galaconfig PHYSICAL_START_BOOL
126537dd2badSKumar Gala	bool "Set physical address where the kernel is loaded"
1266dfc3095cSChristophe Leroy	depends on ADVANCED_OPTIONS && FLATMEM && PPC_85xx
126737dd2badSKumar Gala	help
126837dd2badSKumar Gala	  This gives the physical address where the kernel is loaded.
126937dd2badSKumar Gala
127037dd2badSKumar Gala	  Say N here unless you know what you are doing.
127137dd2badSKumar Gala
127237dd2badSKumar Galaconfig PHYSICAL_START
127337dd2badSKumar Gala	hex "Physical address where the kernel is loaded" if PHYSICAL_START_BOOL
127426598f28SChristophe Leroy	default "0x02000000" if PPC_BOOK3S && CRASH_DUMP && !NONSTATIC_KERNEL
127537dd2badSKumar Gala	default "0x00000000"
127637dd2badSKumar Gala
127737dd2badSKumar Galaconfig PHYSICAL_ALIGN
127837dd2badSKumar Gala	hex
1279dfc3095cSChristophe Leroy	default "0x04000000" if PPC_85xx
128037dd2badSKumar Gala	help
128137dd2badSKumar Gala	  This value puts the alignment restrictions on physical address
128237dd2badSKumar Gala	  where kernel is loaded and run from. Kernel is compiled for an
128337dd2badSKumar Gala	  address which meets above alignment restriction.
128437dd2badSKumar Gala
128514cf11afSPaul Mackerrasconfig TASK_SIZE_BOOL
128614cf11afSPaul Mackerras	bool "Set custom user task size"
128714cf11afSPaul Mackerras	depends on ADVANCED_OPTIONS
128814cf11afSPaul Mackerras	help
128914cf11afSPaul Mackerras	  This option allows you to set the amount of virtual address space
129014cf11afSPaul Mackerras	  allocated to user tasks.  This can be useful in optimizing the
129114cf11afSPaul Mackerras	  virtual memory layout of the system.
129214cf11afSPaul Mackerras
129314cf11afSPaul Mackerras	  Say N here unless you know what you are doing.
129414cf11afSPaul Mackerras
129514cf11afSPaul Mackerrasconfig TASK_SIZE
129614cf11afSPaul Mackerras	hex "Size of user task space" if TASK_SIZE_BOOL
1297933ee711SPaul Bolle	default "0x80000000" if PPC_8xx
12982f2b9a3aSChristophe Leroy	default "0xb0000000" if PPC_BOOK3S_32 && EXECMEM
12994d9e5510SKumar Gala	default "0xc0000000"
1300c5eec4dfSChristophe Leroy
1301c5eec4dfSChristophe Leroyconfig MODULES_SIZE_BOOL
1302c5eec4dfSChristophe Leroy	bool "Set custom size for modules/execmem area"
1303c5eec4dfSChristophe Leroy	depends on EXECMEM && ADVANCED_OPTIONS
1304c5eec4dfSChristophe Leroy	help
1305c5eec4dfSChristophe Leroy	  This option allows you to set the size of kernel virtual address
1306c5eec4dfSChristophe Leroy	  space dedicated for modules/execmem.
13072f2b9a3aSChristophe Leroy	  For the time being it is only for 8xx and book3s/32. Other
13082f2b9a3aSChristophe Leroy	  platform share it with vmalloc space.
1309c5eec4dfSChristophe Leroy
1310c5eec4dfSChristophe Leroy	  Say N here unless you know what you are doing.
1311c5eec4dfSChristophe Leroy
1312c5eec4dfSChristophe Leroyconfig MODULES_SIZE
1313c5eec4dfSChristophe Leroy	int "Size of modules/execmem area (In Mbytes)" if MODULES_SIZE_BOOL
1314c5eec4dfSChristophe Leroy	range 1 256 if EXECMEM
13152f2b9a3aSChristophe Leroy	default 64 if EXECMEM && PPC_BOOK3S_32
1316c5eec4dfSChristophe Leroy	default 32 if EXECMEM && PPC_8xx
1317c5eec4dfSChristophe Leroy	default 0
1318c5eec4dfSChristophe Leroy
131914cf11afSPaul Mackerrasendmenu
132014cf11afSPaul Mackerras
1321c22c06b4SThomas Weißschuhconfig PPC64_PROC_SYSTEMCFG
1322c22c06b4SThomas Weißschuh	def_bool y
1323c22c06b4SThomas Weißschuh	depends on PPC64 && PROC_FS
1324c22c06b4SThomas Weißschuh	help
1325c22c06b4SThomas Weißschuh	  This option enables the presence of /proc/ppc64/systemcfg through
1326c22c06b4SThomas Weißschuh	  which the systemcfg page can be accessed.
1327c22c06b4SThomas Weißschuh	  This interface only exists for backwards-compatibility.
1328c22c06b4SThomas Weißschuh
1329cabb5587SStephen Rothwellif PPC64
1330bdbc29c1SPaul Mackerras# This value must have zeroes in the bottom 60 bits otherwise lots will break
133137dd2badSKumar Galaconfig PAGE_OFFSET
1332cabb5587SStephen Rothwell	hex
1333eeb2d218SStephen Rothwell	default "0xc000000000000000"
133437dd2badSKumar Galaconfig KERNEL_START
133537dd2badSKumar Gala	hex
133637dd2badSKumar Gala	default "0xc000000000000000"
133737dd2badSKumar Galaconfig PHYSICAL_START
133837dd2badSKumar Gala	hex
133937dd2badSKumar Gala	default "0x00000000"
1340cabb5587SStephen Rothwellendif
1341cabb5587SStephen Rothwell
13421088a209SSylvain Munautconfig PPC_LIB_RHEAP
13431088a209SSylvain Munaut	bool
13441088a209SSylvain Munaut
1345bbf45ba5SHollis Blanchardsource "arch/powerpc/kvm/Kconfig"
134685baa095SMichael Ellerman
134785baa095SMichael Ellermansource "kernel/livepatch/Kconfig"
1348