linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/mm: Fix switch_mmu_context to iterate of the proper list of cpus
@ 2009-08-05  3:33 Kumar Gala
  2009-08-05 11:32 ` Josh Boyer
  0 siblings, 1 reply; 4+ messages in thread
From: Kumar Gala @ 2009-08-05  3:33 UTC (permalink / raw)
  To: linuxppc-dev

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>
---
 arch/powerpc/mm/mmu_context_nohash.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/mm/mmu_context_nohash.c b/arch/powerpc/mm/mmu_context_nohash.c
index 6e8d2d9..9859dcd 100644
--- a/arch/powerpc/mm/mmu_context_nohash.c
+++ b/arch/powerpc/mm/mmu_context_nohash.c
@@ -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 */
-- 
1.6.0.6

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] powerpc/mm: Fix switch_mmu_context to iterate of the proper list of cpus
  2009-08-05  3:33 [PATCH] powerpc/mm: Fix switch_mmu_context to iterate of the proper list of cpus Kumar Gala
@ 2009-08-05 11:32 ` Josh Boyer
  2009-08-05 12:52   ` Michael Ellerman
  0 siblings, 1 reply; 4+ messages in thread
From: Josh Boyer @ 2009-08-05 11:32 UTC (permalink / raw)
  To: Kumar Gala; +Cc: linuxppc-dev

On Tue, Aug 04, 2009 at 10:33:32PM -0500, Kumar Gala wrote:
>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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] powerpc/mm: Fix switch_mmu_context to iterate of the proper list of cpus
  2009-08-05 11:32 ` Josh Boyer
@ 2009-08-05 12:52   ` Michael Ellerman
  2009-08-05 13:16     ` Josh Boyer
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Ellerman @ 2009-08-05 12:52 UTC (permalink / raw)
  To: Josh Boyer; +Cc: linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 400 bytes --]

On Wed, 2009-08-05 at 07:32 -0400, Josh Boyer wrote:
> On Tue, Aug 04, 2009 at 10:33:32PM -0500, Kumar Gala wrote:
> >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

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] powerpc/mm: Fix switch_mmu_context to iterate of the proper list of cpus
  2009-08-05 12:52   ` Michael Ellerman
@ 2009-08-05 13:16     ` Josh Boyer
  0 siblings, 0 replies; 4+ messages in thread
From: Josh Boyer @ 2009-08-05 13:16 UTC (permalink / raw)
  To: Michael Ellerman; +Cc: linuxppc-dev

On Wed, Aug 05, 2009 at 10:52:22PM +1000, Michael Ellerman wrote:
>On Wed, 2009-08-05 at 07:32 -0400, Josh Boyer wrote:
>> On Tue, Aug 04, 2009 at 10:33:32PM -0500, Kumar Gala wrote:
>> >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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-08-05 13:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-05  3:33 [PATCH] powerpc/mm: Fix switch_mmu_context to iterate of the proper list of cpus Kumar Gala
2009-08-05 11:32 ` Josh Boyer
2009-08-05 12:52   ` Michael Ellerman
2009-08-05 13:16     ` Josh Boyer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).