diff options
-rw-r--r-- | arch/x86/kernel/tlb_32.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/arch/x86/kernel/tlb_32.c b/arch/x86/kernel/tlb_32.c index ec53818f4e38..d37bbfcb813d 100644 --- a/arch/x86/kernel/tlb_32.c +++ b/arch/x86/kernel/tlb_32.c | |||
@@ -125,9 +125,8 @@ void native_flush_tlb_others(const struct cpumask *cpumask, | |||
125 | struct mm_struct *mm, unsigned long va) | 125 | struct mm_struct *mm, unsigned long va) |
126 | { | 126 | { |
127 | /* | 127 | /* |
128 | * - mask must exist :) | 128 | * mm must exist :) |
129 | */ | 129 | */ |
130 | BUG_ON(cpumask_empty(cpumask)); | ||
131 | BUG_ON(!mm); | 130 | BUG_ON(!mm); |
132 | 131 | ||
133 | /* | 132 | /* |
@@ -138,14 +137,18 @@ void native_flush_tlb_others(const struct cpumask *cpumask, | |||
138 | spin_lock(&tlbstate_lock); | 137 | spin_lock(&tlbstate_lock); |
139 | 138 | ||
140 | cpumask_andnot(flush_cpumask, cpumask, cpumask_of(smp_processor_id())); | 139 | cpumask_andnot(flush_cpumask, cpumask, cpumask_of(smp_processor_id())); |
141 | #ifdef CONFIG_HOTPLUG_CPU | ||
142 | /* If a CPU which we ran on has gone down, OK. */ | ||
143 | cpumask_and(flush_cpumask, flush_cpumask, cpu_online_mask); | 140 | cpumask_and(flush_cpumask, flush_cpumask, cpu_online_mask); |
141 | |||
142 | /* | ||
143 | * If a task whose mm mask we are looking at has descheduled and | ||
144 | * has cleared its presence from the mask, or if a CPU which we ran | ||
145 | * on has gone down then there might be no flush work left: | ||
146 | */ | ||
144 | if (unlikely(cpumask_empty(flush_cpumask))) { | 147 | if (unlikely(cpumask_empty(flush_cpumask))) { |
145 | spin_unlock(&tlbstate_lock); | 148 | spin_unlock(&tlbstate_lock); |
146 | return; | 149 | return; |
147 | } | 150 | } |
148 | #endif | 151 | |
149 | flush_mm = mm; | 152 | flush_mm = mm; |
150 | flush_va = va; | 153 | flush_va = va; |
151 | 154 | ||