mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-20 02:34:23 +08:00
powerpc/fsl-booke: Fix problem with _tlbil_va being interrupted
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>
This commit is contained in:
parent
ab44f4627e
commit
e5e774d883
@ -479,6 +479,8 @@ _GLOBAL(_tlbil_pid)
|
|||||||
* (no broadcast)
|
* (no broadcast)
|
||||||
*/
|
*/
|
||||||
_GLOBAL(_tlbil_va)
|
_GLOBAL(_tlbil_va)
|
||||||
|
mfmsr r10
|
||||||
|
wrteei 0
|
||||||
slwi r4,r4,16
|
slwi r4,r4,16
|
||||||
mtspr SPRN_MAS6,r4 /* assume AS=0 for now */
|
mtspr SPRN_MAS6,r4 /* assume AS=0 for now */
|
||||||
tlbsx 0,r3
|
tlbsx 0,r3
|
||||||
@ -490,6 +492,7 @@ _GLOBAL(_tlbil_va)
|
|||||||
tlbwe
|
tlbwe
|
||||||
msync
|
msync
|
||||||
isync
|
isync
|
||||||
|
wrtee r10
|
||||||
blr
|
blr
|
||||||
#endif /* CONFIG_FSL_BOOKE */
|
#endif /* CONFIG_FSL_BOOKE */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user