patch-2.1.42 linux/arch/sparc64/kernel/signal.c

Next file: linux/arch/sparc64/kernel/signal32.c
Previous file: linux/arch/sparc64/kernel/setup.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.41/linux/arch/sparc64/kernel/signal.c linux/arch/sparc64/kernel/signal.c
@@ -1,4 +1,4 @@
-/*  $Id: signal.c,v 1.2 1997/05/18 08:42:15 davem Exp $
+/*  $Id: signal.c,v 1.4 1997/05/27 06:28:05 davem Exp $
  *  arch/sparc64/kernel/signal.c
  *
  *  Copyright (C) 1991, 1992  Linus Torvalds
@@ -61,7 +61,7 @@
  */
 asmlinkage void _sigpause_common(unsigned int set, struct pt_regs *regs)
 {
-	unsigned int mask;
+	unsigned long mask;
 
 #ifdef CONFIG_SPARC32_COMPAT
 	if (current->tss.flags & SPARC_FLAG_32BIT) {
@@ -134,7 +134,7 @@
 	struct new_signal_frame *sf;
 	unsigned long tpc, tnpc, tstate;
 	__siginfo_fpu_t *fpu_save;
-	int mask;
+	unsigned long mask;
 
 #ifdef CONFIG_SPARC32_COMPAT
 	if (current->tss.flags & SPARC_FLAG_32BIT) {
@@ -270,8 +270,15 @@
 	regs->tnpc = (regs->tpc + 4);
 
 	/* Flush instruction space. */
-	__asm__ __volatile__ ("flush %0; flush %0 + 4" : : "r" (&(sf->insns[0])));
-		
+	__asm__ __volatile__("
+	membar		#StoreStore
+	stxa		%%g0, [%0] %2
+	stxa		%%g0, [%1] %2
+	flush		%%g4
+	" : /* no outputs */
+	  : "r" (((unsigned long)&(sf->insns[0])) & ~(PAGE_MASK)),
+	    "r" ((((unsigned long)&(sf->insns[0])) & ~(PAGE_MASK)) + PAGE_SIZE),
+	    "i" (ASI_IC_TAG));
 }
 
 static inline void handle_signal(unsigned long signr, struct sigaction *sa,
@@ -323,7 +330,7 @@
 #endif	
 	while ((signr = current->signal & mask) != 0) {
 		signr = ffz(~signr);
-		clear_bit(signr, &current->signal);
+		clear_bit(signr + 32, &current->signal);
 		sa = current->sig->action + signr;
 		signr++;
 		if ((current->flags & PF_PTRACED) && signr != SIGKILL) {

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov