|
@@ -112,8 +112,10 @@ static unsigned int steal_context_smp(unsigned int id)
|
|
|
*/
|
|
|
for_each_cpu(cpu, mm_cpumask(mm)) {
|
|
|
for (i = cpu_first_thread_sibling(cpu);
|
|
|
- i <= cpu_last_thread_sibling(cpu); i++)
|
|
|
- __set_bit(id, stale_map[i]);
|
|
|
+ i <= cpu_last_thread_sibling(cpu); i++) {
|
|
|
+ if (stale_map[i])
|
|
|
+ __set_bit(id, stale_map[i]);
|
|
|
+ }
|
|
|
cpu = i - 1;
|
|
|
}
|
|
|
return id;
|
|
@@ -272,7 +274,8 @@ void switch_mmu_context(struct mm_struct *prev, struct mm_struct *next)
|
|
|
/* XXX This clear should ultimately be part of local_flush_tlb_mm */
|
|
|
for (i = cpu_first_thread_sibling(cpu);
|
|
|
i <= cpu_last_thread_sibling(cpu); i++) {
|
|
|
- __clear_bit(id, stale_map[i]);
|
|
|
+ if (stale_map[i])
|
|
|
+ __clear_bit(id, stale_map[i]);
|
|
|
}
|
|
|
}
|
|
|
|