mirror of
https://github.com/adulau/aha.git
synced 2025-01-01 05:36:24 +00:00
powerpc/mm: Fix switch_mmu_context to iterate of the proper list of cpus
Introduced a temporary variable into our iterating over the list cpus that are threads on the same core. For some reason Ben forgot how for loops work. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
parent
af984b8165
commit
67050b5c3e
1 changed files with 5 additions and 4 deletions
|
@ -190,7 +190,7 @@ static void context_check_map(void) { }
|
|||
|
||||
void switch_mmu_context(struct mm_struct *prev, struct mm_struct *next)
|
||||
{
|
||||
unsigned int id, cpu = smp_processor_id();
|
||||
unsigned int i, id, cpu = smp_processor_id();
|
||||
unsigned long *map;
|
||||
|
||||
/* No lockless fast path .. yet */
|
||||
|
@ -269,9 +269,10 @@ void switch_mmu_context(struct mm_struct *prev, struct mm_struct *next)
|
|||
local_flush_tlb_mm(next);
|
||||
|
||||
/* XXX This clear should ultimately be part of local_flush_tlb_mm */
|
||||
for (cpu = cpu_first_thread_in_core(cpu);
|
||||
cpu <= cpu_last_thread_in_core(cpu); cpu++)
|
||||
__clear_bit(id, stale_map[cpu]);
|
||||
for (i = cpu_first_thread_in_core(cpu);
|
||||
i <= cpu_last_thread_in_core(cpu); i++) {
|
||||
__clear_bit(id, stale_map[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/* Flick the MMU and release lock */
|
||||
|
|
Loading…
Reference in a new issue