]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
powerpc/fsl-booke: Fix problem with _tlbil_va being interrupted
authorKumar Gala <galak@kernel.crashing.org>
Sat, 13 Dec 2008 23:01:37 +0000 (17:01 -0600)
committerKumar Gala <galak@kernel.crashing.org>
Sat, 13 Dec 2008 23:02:47 +0000 (17:02 -0600)
An example calling sequence which we did see:

copy_user_highpage -> kmap_atomic -> flush_tlb_page -> _tlbil_va

We got interrupted after setting up the MAS registers before the
tlbwe and the interrupt handler that caused the interrupt also did
a kmap_atomic (ide code) and thus on returning from the interrupt
the MAS registers no longer contained the proper values.

Since we dont save/restore MAS registers for normal interrupts we
need to disable interrupts in _tlbil_va to ensure atomicity.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
arch/powerpc/kernel/misc_32.S

index bdc8b0e860e5e1b25cc3dafe23455ec1a738812b..d108715129e264524854cac071748dcfbd313f6c 100644 (file)
@@ -479,6 +479,8 @@ _GLOBAL(_tlbil_pid)
  * (no broadcast)
  */
 _GLOBAL(_tlbil_va)
+       mfmsr   r10
+       wrteei  0
        slwi    r4,r4,16
        mtspr   SPRN_MAS6,r4            /* assume AS=0 for now */
        tlbsx   0,r3
@@ -490,6 +492,7 @@ _GLOBAL(_tlbil_va)
        tlbwe
        msync
        isync
+       wrtee   r10
        blr
 #endif /* CONFIG_FSL_BOOKE */