summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-04-07 00:25:35 -0700
committerChris Wright <chrisw@sous-sol.org>2008-04-18 18:53:27 -0700
commit8b337d60a526f4461d681cd537d6b0f2d176f0ad (patch)
treef41296d6608fc78806f018f9a3a38b365ebd96d1
parentd08242303cea836fd2587d776e5c743b3e02ae2a (diff)
downloadkernel-common-8b337d60a526f4461d681cd537d6b0f2d176f0ad.tar.gz
kernel-common-8b337d60a526f4461d681cd537d6b0f2d176f0ad.tar.bz2
kernel-common-8b337d60a526f4461d681cd537d6b0f2d176f0ad.zip
SPARC64: Fix __get_cpu_var in preemption-enabled area.
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>
-rw-r--r--arch/sparc64/mm/tlb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/sparc64/mm/tlb.c b/arch/sparc64/mm/tlb.c
index 3f10fc921b00..a0f000b293de 100644
--- a/arch/sparc64/mm/tlb.c
+++ b/arch/sparc64/mm/tlb.c
@@ -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);