summaryrefslogtreecommitdiffstats
path: root/arch/ppc/mm/fault.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2001-01-31 22:22:27 +0000
committerRalf Baechle <ralf@linux-mips.org>2001-01-31 22:22:27 +0000
commit825423e4c4f18289df2393951cfd2a7a31fc0464 (patch)
tree4ad80e981c3d9effa910d2247d118d254f9a5d09 /arch/ppc/mm/fault.c
parentc4693dc4856ab907a5c02187a8d398861bebfc7e (diff)
Merge with Linux 2.4.1.
Diffstat (limited to 'arch/ppc/mm/fault.c')
-rw-r--r--arch/ppc/mm/fault.c19
1 files changed, 9 insertions, 10 deletions
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