From 825423e4c4f18289df2393951cfd2a7a31fc0464 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Wed, 31 Jan 2001 22:22:27 +0000 Subject: Merge with Linux 2.4.1. --- arch/ppc/mm/fault.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'arch/ppc/mm/fault.c') diff --git a/arch/ppc/mm/fault.c b/arch/ppc/mm/fault.c index b6da2cdfc..97bb6dbc1 100644 --- a/arch/ppc/mm/fault.c +++ b/arch/ppc/mm/fault.c @@ -48,7 +48,7 @@ unsigned long pte_errors = 0; /* updated by do_page_fault() */ unsigned int probingmem = 0; extern void die_if_kernel(char *, struct pt_regs *, long); -void bad_page_fault(struct pt_regs *, unsigned long); +void bad_page_fault(struct pt_regs *, unsigned long, int sig); void do_page_fault(struct pt_regs *, unsigned long, unsigned long); /* @@ -96,7 +96,7 @@ void do_page_fault(struct pt_regs *regs, unsigned long address, #endif /* CONFIG_XMON || CONFIG_KGDB */ if (in_interrupt() || mm == NULL) { - bad_page_fault(regs, address); + bad_page_fault(regs, address, SIGSEGV); return; } down(&mm->mmap_sem); @@ -182,7 +182,7 @@ bad_area: return; } - bad_page_fault(regs, address); + bad_page_fault(regs, address, SIGSEGV); return; /* @@ -194,7 +194,7 @@ out_of_memory: printk("VM: killing process %s\n", current->comm); if (user_mode(regs)) do_exit(SIGKILL); - bad_page_fault(regs, address); + bad_page_fault(regs, address, SIGKILL); return; do_sigbus: @@ -205,7 +205,7 @@ do_sigbus: info.si_addr = (void *)address; force_sig_info (SIGBUS, &info, current); if (!user_mode(regs)) - bad_page_fault(regs, address); + bad_page_fault(regs, address, SIGBUS); } /* @@ -214,8 +214,10 @@ do_sigbus: * in traps.c. */ void -bad_page_fault(struct pt_regs *regs, unsigned long address) +bad_page_fault(struct pt_regs *regs, unsigned long address, int sig) { + extern void die(const char *,struct pt_regs *,long); + unsigned long fixup; /* Are we prepared to handle this fault? */ @@ -225,14 +227,11 @@ bad_page_fault(struct pt_regs *regs, unsigned long address) } /* kernel has accessed a bad area */ - show_regs(regs); #if defined(CONFIG_XMON) || defined(CONFIG_KGDB) if (debugger_kernel_faults) debugger(regs); #endif - print_backtrace( (unsigned long *)regs->gpr[1] ); - panic("kernel access of bad area pc %lx lr %lx address %lX tsk %s/%d", - regs->nip,regs->link,address,current->comm,current->pid); + die("kernel access of bad area", regs, sig); } #ifdef CONFIG_8xx -- cgit v1.2.3