patch-2.3.2 linux/arch/alpha/kernel/traps.c

Next file: linux/arch/alpha/mm/init.c
Previous file: linux/arch/alpha/kernel/time.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.1/linux/arch/alpha/kernel/traps.c linux/arch/alpha/kernel/traps.c
@@ -1,5 +1,5 @@
 /*
- * kernel/traps.c
+ * arch/alpha/kernel/traps.c
  *
  * (C) Copyright 1994 Linus Torvalds
  */
@@ -95,6 +95,9 @@
 {
 	if (regs->ps & 8)
 		return;
+#ifdef __SMP__
+	printk("CPU %d ", hard_smp_processor_id());
+#endif
 	printk("%s(%d): %s %ld\n", current->comm, current->pid, str, err);
 	dik_show_regs(regs, r9_15);
 	dik_show_code((unsigned int *)regs->pc);
@@ -128,8 +131,8 @@
 	if (summary & 1) {
 		/* Software-completion summary bit is set, so try to
 		   emulate the instruction.  */
-		if (implver() == IMPLVER_EV6) {
-			/* Whee!  EV6 has precice exceptions.  */
+		if (!amask(AMASK_PRECISE_TRAP)) {
+			/* 21264 (except pass 1) has precise exceptions.  */
 			if (alpha_fp_emul(regs.pc - 4))
 				return;
 		} else {
@@ -138,14 +141,12 @@
 		}
 	}
 
-	lock_kernel();
 #if 0
 	printk("%s: arithmetic trap at %016lx: %02lx %016lx\n",
 		current->comm, regs.pc, summary, write_mask);
 #endif
 	die_if_kernel("Arithmetic fault", &regs, 0, 0);
 	send_sig(SIGFPE, current, 1);
-	unlock_kernel();
 }
 
 asmlinkage void
@@ -235,10 +236,8 @@
 	  unsigned long a2, unsigned long a3, unsigned long a4,
 	  unsigned long a5, struct pt_regs regs)
 {
-	lock_kernel();
 	die_if_kernel("Instruction fault", &regs, type, 0);
 	force_sig(SIGILL, current);
-	unlock_kernel();
 }
 
 
@@ -453,10 +452,8 @@
 		unsigned long newpc;
 		newpc = fixup_exception(una_reg, fixup, pc);
 
-		lock_kernel();
 		printk("Forwarding unaligned exception at %lx (%lx)\n",
 		       pc, newpc);
-		unlock_kernel();
 
 		(&regs)->pc = newpc;
 		return;
@@ -610,11 +607,9 @@
 			cnt = 0;
 		}
 		if (++cnt < 5) {
-			lock_kernel();
 			printk("%s(%d): unaligned trap at %016lx: %p %lx %ld\n",
 			       current->comm, current->pid,
 			       regs->pc - 4, va, opcode, reg);
-			unlock_kernel();
 		}
 		last_time = jiffies;
 	}
@@ -868,16 +863,12 @@
 
 give_sigsegv:
 	regs->pc -= 4;  /* make pc point to faulting insn */
-	lock_kernel();
 	send_sig(SIGSEGV, current, 1);
-	unlock_kernel();
 	return;
 
 give_sigbus:
 	regs->pc -= 4;
-	lock_kernel();
 	send_sig(SIGBUS, current, 1);
-	unlock_kernel();
 	return;
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)