powerpc/mm: Fix switch_mmu_context to iterate of the proper list of cpus
PATCH 1/1 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.
--- arch/powerpc/mm/mmu_context_nohash.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-)
arch/powerpc/mm/mmu_context_nohash.c +5 -4
@@ -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 */
@@ -268,9 +268,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 */
Signature · 1 line
1.6.0.6
Quoted 3 lines · Kumar Gala
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.
Have the powerpoint demons corrupted him already??
josh
Quoted 6 lines · Josh Boyer
Quoted 3 lines · Kumar Gala
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.
Have the powerpoint demons corrupted him already??
No I think one of his kids gave him swine flu.
cheers
Quoted 9 lines · Michael Ellerman
Quoted 6 lines · Josh Boyer
Quoted 3 lines · Kumar Gala
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.
Have the powerpoint demons corrupted him already??
No I think one of his kids gave him swine flu.
Whew. You can recover from that at least ;)
josh