Skip to contentSkip to conversation

fix signal trampoline cache flushing

PARISC Kyle McMartin 2 participants 3 messages Apr 15, 2008 – Apr 21, 2008 PA-RISC architecture

lore
Share & tools
lore
#0 lore raw

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
index 58fccc9..06213d1 100644
@@ -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
#1 lore raw
Quoted 11 lines · Kyle McMartin

diff --git a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c index 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.

#2 lore raw
Quoted 13 lines · Carlos O'Donell
Quoted 11 lines · Kyle McMartin

diff --git a/arch/parisc/kernel/signal.c b/arch/parisc/kernel/signal.c index 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.