X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fppc64%2Fkernel%2FpSeries_htab.c;h=dcafb219b5dc8c08814d76759bf36ac1dc8144e3;hb=9bf4aaab3e101692164d49b7ca357651eb691cb6;hp=8f556f3c9df7f740ae917228fee7af45ce078261;hpb=db216c3d5e4c040e557a50f8f5d35d5c415e8c1c;p=linux-2.6.git diff --git a/arch/ppc64/kernel/pSeries_htab.c b/arch/ppc64/kernel/pSeries_htab.c index 8f556f3c9..dcafb219b 100644 --- a/arch/ppc64/kernel/pSeries_htab.c +++ b/arch/ppc64/kernel/pSeries_htab.c @@ -198,7 +198,6 @@ 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) @@ -222,10 +221,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_irqsave(&pSeries_tlbie_lock, flags); + spin_lock(&pSeries_tlbie_lock); tlbie(va, large); if (!(cur_cpu_spec->cpu_features & CPU_FTR_LOCKLESS_TLBIE)) - spin_unlock_irqrestore(&pSeries_tlbie_lock, flags); + spin_unlock(&pSeries_tlbie_lock); } return ret; @@ -275,6 +274,7 @@ 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,11 +292,12 @@ 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_irqsave(&pSeries_tlbie_lock, flags); + spin_lock(&pSeries_tlbie_lock); tlbie(va, large); if (!(cur_cpu_spec->cpu_features & CPU_FTR_LOCKLESS_TLBIE)) - spin_unlock_irqrestore(&pSeries_tlbie_lock, flags); + spin_unlock(&pSeries_tlbie_lock); } + local_irq_restore(flags); } static void pSeries_flush_hash_range(unsigned long context, @@ -311,6 +312,8 @@ 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) && @@ -363,7 +366,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_irqsave(&pSeries_tlbie_lock, flags); + spin_lock(&pSeries_tlbie_lock); asm volatile("ptesync":::"memory"); @@ -373,8 +376,10 @@ 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_irqrestore(&pSeries_tlbie_lock, flags); + spin_unlock(&pSeries_tlbie_lock); } + + local_irq_restore(flags); } void hpte_init_pSeries(void)