Skip to content

Commit 3d45a3d

Browse files
paulusmackmaddy-kerneldev
authored andcommitted
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
1 parent 2b0a438 commit 3d45a3d

File tree

4 files changed

+17
-2
lines changed

4 files changed

+17
-2
lines changed

arch/powerpc/mm/book3s64/pgtable.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -587,15 +587,15 @@ int pmd_move_must_withdraw(struct spinlock *new_pmd_ptl,
587587
/*
588588
* Does the CPU support tlbie?
589589
*/
590-
bool tlbie_capable __read_mostly = true;
590+
bool tlbie_capable __read_mostly = IS_ENABLED(CONFIG_PPC_RADIX_BROADCAST_TLBIE);
591591
EXPORT_SYMBOL(tlbie_capable);
592592

593593
/*
594594
* Should tlbie be used for management of CPU TLBs, for kernel and process
595595
* address spaces? tlbie may still be used for nMMU accelerators, and for KVM
596596
* guest address spaces.
597597
*/
598-
bool tlbie_enabled __read_mostly = true;
598+
bool tlbie_enabled __read_mostly = IS_ENABLED(CONFIG_PPC_RADIX_BROADCAST_TLBIE);
599599

600600
static int __init setup_disable_tlbie(char *str)
601601
{

arch/powerpc/platforms/Kconfig.cputype

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,19 @@ config PPC_RADIX_MMU_DEFAULT
449449

450450
If you're unsure, say Y.
451451

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+
452465
config PPC_KERNEL_PREFIXED
453466
depends on PPC_HAVE_PREFIXED_SUPPORT
454467
depends on CC_HAS_PREFIXED

arch/powerpc/platforms/powernv/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ config PPC_POWERNV
1717
select MMU_NOTIFIER
1818
select FORCE_SMP
1919
select ARCH_SUPPORTS_PER_VMA_LOCK
20+
select PPC_RADIX_BROADCAST_TLBIE
2021
default y
2122

2223
config OPAL_PRD

arch/powerpc/platforms/pseries/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ config PPC_PSERIES
2323
select FORCE_SMP
2424
select SWIOTLB
2525
select ARCH_SUPPORTS_PER_VMA_LOCK
26+
select PPC_RADIX_BROADCAST_TLBIE
2627
default y
2728

2829
config PARAVIRT

0 commit comments

Comments
 (0)