diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/include/asm/cputhreads.h | 8 | ||||
-rw-r--r-- | arch/powerpc/mm/tlb_nohash.c | 4 |
2 files changed, 9 insertions, 3 deletions
diff --git a/arch/powerpc/include/asm/cputhreads.h b/arch/powerpc/include/asm/cputhreads.h index ba42e46ea58e..ea9623147b87 100644 --- a/arch/powerpc/include/asm/cputhreads.h +++ b/arch/powerpc/include/asm/cputhreads.h | |||
@@ -94,6 +94,14 @@ static inline int cpu_last_thread_sibling(int cpu) | |||
94 | return cpu | (threads_per_core - 1); | 94 | return cpu | (threads_per_core - 1); |
95 | } | 95 | } |
96 | 96 | ||
97 | static inline u32 get_tensr(void) | ||
98 | { | ||
99 | #ifdef CONFIG_BOOKE | ||
100 | if (cpu_has_feature(CPU_FTR_SMT)) | ||
101 | return mfspr(SPRN_TENSR); | ||
102 | #endif | ||
103 | return 1; | ||
104 | } | ||
97 | 105 | ||
98 | 106 | ||
99 | #endif /* _ASM_POWERPC_CPUTHREADS_H */ | 107 | #endif /* _ASM_POWERPC_CPUTHREADS_H */ |
diff --git a/arch/powerpc/mm/tlb_nohash.c b/arch/powerpc/mm/tlb_nohash.c index bb04e4df3100..f4668488512c 100644 --- a/arch/powerpc/mm/tlb_nohash.c +++ b/arch/powerpc/mm/tlb_nohash.c | |||
@@ -640,9 +640,7 @@ static void early_init_this_mmu(void) | |||
640 | * transient mapping would cause problems. | 640 | * transient mapping would cause problems. |
641 | */ | 641 | */ |
642 | #ifdef CONFIG_SMP | 642 | #ifdef CONFIG_SMP |
643 | if (cpu != boot_cpuid && | 643 | if (hweight32(get_tensr()) > 1) |
644 | (cpu != cpu_first_thread_sibling(cpu) || | ||
645 | cpu == cpu_first_thread_sibling(boot_cpuid))) | ||
646 | map = false; | 644 | map = false; |
647 | #endif | 645 | #endif |
648 | 646 | ||