patch-2.3.99-pre9 linux/arch/ppc/kernel/traps.c

Next file: linux/arch/ppc/mbxboot/Makefile
Previous file: linux/arch/ppc/kernel/time.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre8/linux/arch/ppc/kernel/traps.c linux/arch/ppc/kernel/traps.c
@@ -91,7 +91,7 @@
 	{
 #if defined(CONFIG_8xx) && defined(CONFIG_PCI)
 		/* the qspan pci read routines can cause machine checks -- Cort */
-		bad_page_fault(regs,regs->dar);
+		bad_page_fault(regs, regs->dar);
 		return;
 #endif
 #if defined(CONFIG_XMON) || defined(CONFIG_KGDB)
@@ -214,8 +214,6 @@
 {
 	int fixed;
 
-	if (regs->msr & MSR_FP)
-		giveup_fpu(current);
 	fixed = fix_alignment(regs);
 	if (fixed == 1) {
 		regs->nip += 4;	/* skip over emulated instruction */
@@ -223,7 +221,10 @@
 	}
 	if (fixed == -EFAULT) {
 		/* fixed == -EFAULT means the operand address was bad */
-		bad_page_fault(regs, regs->dar);
+		if (user_mode(regs))
+			force_sig(SIGSEGV, current);
+		else
+			bad_page_fault(regs, regs->dar);
 		return;
 	}
 	_exception(SIGBUS, regs);	

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