diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-generic/tlb.h | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/include/asm-generic/tlb.h b/include/asm-generic/tlb.h index 0b7dc666fecf..778990a36b41 100644 --- a/include/asm-generic/tlb.h +++ b/include/asm-generic/tlb.h @@ -44,18 +44,12 @@ extern mmu_gather_t mmu_gathers[NR_CPUS]; static inline mmu_gather_t *tlb_gather_mmu(struct mm_struct *mm) { mmu_gather_t *tlb = &mmu_gathers[smp_processor_id()]; - unsigned long nr; tlb->mm = mm; tlb->freed = 0; - /* Use fast mode if this MM only exists on this CPU */ - nr = ~0UL; -#ifdef CONFIG_SMP - if (mm->cpu_vm_mask != (1<<smp_processor_id())) - nr = 0UL; -#endif - tlb->nr = nr; + /* Use fast mode if only one CPU is online */ + tlb->nr = smp_num_cpus > 1 ? 0UL : ~0UL; return tlb; } |
