X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fppc64%2Fkernel%2FpSeries_htab.c;h=8f556f3c9df7f740ae917228fee7af45ce078261;hb=4df52aa9a6dd8cb5fff67da03cdfa58a3c607912;hp=dcafb219b5dc8c08814d76759bf36ac1dc8144e3;hpb=a91482bdcc2e0f6035702e46f1b99043a0893346;p=linux-2.6.git diff --git a/arch/ppc64/kernel/pSeries_htab.c b/arch/ppc64/kernel/pSeries_htab.c index dcafb219b..8f556f3c9 100644 --- a/arch/ppc64/kernel/pSeries_htab.c +++ b/arch/ppc64/kernel/pSeries_htab.c @@ -198,6 +198,7 @@ static long pSeries_hpte_updatepp(unsigned long slot, unsigned long newpp, HPTE *hptep = htab_data.htab + slot; Hpte_dword0 dw0; unsigned long avpn = va >> 23; + unsigned long flags; int ret = 0; if (large) @@ -221,10 +222,10 @@ static long pSeries_hpte_updatepp(unsigned long slot, unsigned long newpp, tlbiel(va); } else { if (!(cur_cpu_spec->cpu_features & CPU_FTR_LOCKLESS_TLBIE)) - spin_lock(&pSeries_tlbie_lock); + spin_lock_irqsave(&pSeries_tlbie_lock, flags); tlbie(va, large); if (!(cur_cpu_spec->cpu_features & CPU_FTR_LOCKLESS_TLBIE)) - spin_unlock(&pSeries_tlbie_lock); + spin_unlock_irqrestore(&pSeries_tlbie_lock, flags); } return ret; @@ -274,7 +275,6 @@ static void pSeries_hpte_invalidate(unsigned long slot, unsigned long va, if (large) avpn &= ~0x1UL; - local_irq_save(flags); pSeries_lock_hpte(hptep); dw0 = hptep->dw0.dw0; @@ -292,12 +292,11 @@ static void pSeries_hpte_invalidate(unsigned long slot, unsigned long va, tlbiel(va); } else { if (!(cur_cpu_spec->cpu_features & CPU_FTR_LOCKLESS_TLBIE)) - spin_lock(&pSeries_tlbie_lock); + spin_lock_irqsave(&pSeries_tlbie_lock, flags); tlbie(va, large); if (!(cur_cpu_spec->cpu_features & CPU_FTR_LOCKLESS_TLBIE)) - spin_unlock(&pSeries_tlbie_lock); + spin_unlock_irqrestore(&pSeries_tlbie_lock, flags); } - local_irq_restore(flags); } static void pSeries_flush_hash_range(unsigned long context, @@ -312,8 +311,6 @@ static void pSeries_flush_hash_range(unsigned long context, /* XXX fix for large ptes */ unsigned long large = 0; - local_irq_save(flags); - j = 0; for (i = 0; i < number; i++) { if ((batch->addr[i] >= USER_START) && @@ -366,7 +363,7 @@ static void pSeries_flush_hash_range(unsigned long context, } else { /* XXX double check that it is safe to take this late */ if (!(cur_cpu_spec->cpu_features & CPU_FTR_LOCKLESS_TLBIE)) - spin_lock(&pSeries_tlbie_lock); + spin_lock_irqsave(&pSeries_tlbie_lock, flags); asm volatile("ptesync":::"memory"); @@ -376,10 +373,8 @@ static void pSeries_flush_hash_range(unsigned long context, asm volatile("eieio; tlbsync; ptesync":::"memory"); if (!(cur_cpu_spec->cpu_features & CPU_FTR_LOCKLESS_TLBIE)) - spin_unlock(&pSeries_tlbie_lock); + spin_unlock_irqrestore(&pSeries_tlbie_lock, flags); } - - local_irq_restore(flags); } void hpte_init_pSeries(void)