* [PATCH][for 2.6.28] powerpc/fsl-booke: Fix problem with _tlbil_va being interrupted
@ 2008-12-13 23:33 Kumar Gala
2008-12-14 2:46 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 2+ messages in thread
From: Kumar Gala @ 2008-12-13 23:33 UTC (permalink / raw)
To: linuxppc-dev
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 | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S
index bdc8b0e..d108715 100644
--- a/arch/powerpc/kernel/misc_32.S
+++ b/arch/powerpc/kernel/misc_32.S
@@ -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 */
--
1.5.6.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH][for 2.6.28] powerpc/fsl-booke: Fix problem with _tlbil_va being interrupted
2008-12-13 23:33 [PATCH][for 2.6.28] powerpc/fsl-booke: Fix problem with _tlbil_va being interrupted Kumar Gala
@ 2008-12-14 2:46 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Herrenschmidt @ 2008-12-14 2:46 UTC (permalink / raw)
To: Kumar Gala, Paul Mackerras; +Cc: linuxppc-dev
On Sat, 2008-12-13 at 17:33 -0600, Kumar Gala wrote:
> 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>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
Paul, this is a 2.6.28 regression, it should probably go to Linus in
case he hasn't released yet :-)
Cheers,
Ben.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-12-14 2:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-13 23:33 [PATCH][for 2.6.28] powerpc/fsl-booke: Fix problem with _tlbil_va being interrupted Kumar Gala
2008-12-14 2:46 ` Benjamin Herrenschmidt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).