fix signal trampoline cache flushing
The signal trampolines were accidently flushing the kernel I$ instead of the users. Fix that up, and also add a missing user D$ flush while we're at it.
---
Sorry, I thought I submitted this for 2.6.25 ages ago.
arch/parisc/kernel/signal.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
arch/parisc/kernel/signal.c +2 -1
@@ -534,7 +534,8 @@ insert_restart_trampoline(struct pt_regs *regs)* Flushing one cacheline is cheap. * "sync" on bigger (> 4 way) boxes is not. */ -flush_icache_range (regs->gr[30 ], regs->gr[30 ] +4 ); +flush_user_dcache_range (regs->gr[30 ], regs->gr[30 ] +4 ); +flush_user_icache_range (regs->gr[30 ], regs->gr[30 ] +4 ); regs->gr[31 ] = regs->gr[30 ] +8 ;/* Preserve original r28. */
Signature · 1 line
1.5.5
Quoted 11 lines · Kyle McMartin
diff --git
a/arch/parisc/kernel/signal.cb/arch/parisc/kernel/signal.cindex 58fccc9..06213d1 100644
---a/arch/parisc/kernel/signal.c
+++b/arch/parisc/kernel/signal.c
@@ -534,7 +534,8 @@insert_restart_trampoline(struct pt_regs *regs)
* Flushing one cacheline is cheap.
* "sync" on bigger (> 4 way) boxes is not. */- flush_icache_range(regs->gr[30], regs->gr[30] + 4); + flush_user_dcache_range(regs->gr[30], regs->gr[30] + 4); + flush_user_icache_range(regs->gr[30], regs->gr[30] + 4);
We also have a restartable syscall trampoline (I think this is unique to PA), does that one also need fixing?
Cheers,
Carlos.
Quoted 13 lines · Carlos O'Donell
Quoted 11 lines · Kyle McMartin
diff --git
a/arch/parisc/kernel/signal.cb/arch/parisc/kernel/signal.cindex 58fccc9..06213d1 100644
---a/arch/parisc/kernel/signal.c
+++b/arch/parisc/kernel/signal.c
@@ -534,7 +534,8 @@insert_restart_trampoline(struct pt_regs *regs)
* Flushing one cacheline is cheap.
* "sync" on bigger (> 4 way) boxes is not. */- flush_icache_range(regs->gr[30], regs->gr[30] + 4); + flush_user_dcache_range(regs->gr[30], regs->gr[30] + 4); + flush_user_icache_range(regs->gr[30], regs->gr[30] + 4);
Quoted 3 lines
We also have a restartable syscall trampoline (I think this is unique to PA), does that one also need fixing?
no.