]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
SPARC64: Fix __get_cpu_var in preemption-enabled area.
authorDavid S. Miller <davem@davemloft.net>
Mon, 7 Apr 2008 07:25:35 +0000 (00:25 -0700)
committerChris Wright <chrisw@sous-sol.org>
Sat, 19 Apr 2008 01:53:27 +0000 (18:53 -0700)
Upstream commit: 69072f6e8e4bd4799d2a54e4ff8771d0657512c1

Reported by Mariusz Kozlowski.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
arch/sparc64/mm/tlb.c

index 3f10fc921b00e1bfb6279f8ccf00986ad7619089..a0f000b293de6ab3c26f2267ee8d7d40c0fe1d6f 100644 (file)
@@ -23,10 +23,11 @@ DEFINE_PER_CPU(struct mmu_gather, mmu_gathers) = { 0, };
 
 void flush_tlb_pending(void)
 {
-       struct mmu_gather *mp = &__get_cpu_var(mmu_gathers);
+       struct mmu_gather *mp;
 
        preempt_disable();
 
+       mp = &__get_cpu_var(mmu_gathers);
        if (mp->tlb_nr) {
                flush_tsb_user(mp);