Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc: Define config option for processors with broadcast TLBIE

Power ISA v3.0 (and later) implementations in the Linux Compliancy
Subset and lower are not required to implement broadcast TLBIE, and in
fact Microwatt doesn't.

To avoid the need to specify "disable_tlbie" on the kernel command
line on SMP Microwatt systems, this defines a config option that
asserts that the platform implements broadcast TLBIE. This option is
selected by the pseries and powernv platforms, but not by microwatt.
Note that this option is only relevant when the radix MMU is being
used, so platforms without a radix MMU don't need it.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/Z5xtvdozEfEmRyeI@thinks.paulus.ozlabs.org

authored by

Paul Mackerras and committed by
Madhavan Srinivasan
3d45a3d0 2b0a438d

+17 -2
+2 -2
arch/powerpc/mm/book3s64/pgtable.c
··· 587 587 /* 588 588 * Does the CPU support tlbie? 589 589 */ 590 - bool tlbie_capable __read_mostly = true; 590 + bool tlbie_capable __read_mostly = IS_ENABLED(CONFIG_PPC_RADIX_BROADCAST_TLBIE); 591 591 EXPORT_SYMBOL(tlbie_capable); 592 592 593 593 /* ··· 595 595 * address spaces? tlbie may still be used for nMMU accelerators, and for KVM 596 596 * guest address spaces. 597 597 */ 598 - bool tlbie_enabled __read_mostly = true; 598 + bool tlbie_enabled __read_mostly = IS_ENABLED(CONFIG_PPC_RADIX_BROADCAST_TLBIE); 599 599 600 600 static int __init setup_disable_tlbie(char *str) 601 601 {
+13
arch/powerpc/platforms/Kconfig.cputype
··· 449 449 450 450 If you're unsure, say Y. 451 451 452 + config PPC_RADIX_BROADCAST_TLBIE 453 + bool 454 + depends on PPC_RADIX_MMU 455 + help 456 + Power ISA v3.0 and later implementations in the Linux Compliancy Subset 457 + and lower are not required to implement broadcast TLBIE instructions. 458 + Platforms with CPUs that do implement TLBIE broadcast, that is, where 459 + a TLB invalidation instruction performed on one CPU operates on the 460 + TLBs of all CPUs in the system, should select this option. If this 461 + option is selected, the disable_tlbie kernel command line option can 462 + be used to cause global TLB invalidations to be done via IPIs; without 463 + it, IPIs will be used unconditionally. 464 + 452 465 config PPC_KERNEL_PREFIXED 453 466 depends on PPC_HAVE_PREFIXED_SUPPORT 454 467 depends on CC_HAS_PREFIXED
+1
arch/powerpc/platforms/powernv/Kconfig
··· 17 17 select MMU_NOTIFIER 18 18 select FORCE_SMP 19 19 select ARCH_SUPPORTS_PER_VMA_LOCK 20 + select PPC_RADIX_BROADCAST_TLBIE 20 21 default y 21 22 22 23 config OPAL_PRD
+1
arch/powerpc/platforms/pseries/Kconfig
··· 23 23 select FORCE_SMP 24 24 select SWIOTLB 25 25 select ARCH_SUPPORTS_PER_VMA_LOCK 26 + select PPC_RADIX_BROADCAST_TLBIE 26 27 default y 27 28 28 29 config PARAVIRT