From 1e33eafe0fa1c7f79becb3ba34e7029465876928 Mon Sep 17 00:00:00 2001 From: Roman Zippel Date: Mon, 5 May 2008 21:25:48 +0200 Subject: [PATCH] --- yaml --- r: 96017 b: refs/heads/master c: 3b17f136bf32984eb0faeb116bcd44ffe3503782 h: refs/heads/master i: 96015: 854bab70fe4d6ff572a690572ef5bb71a633e455 v: v3 --- [refs] | 2 +- trunk/arch/m68k/kernel/traps.c | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index cfe6bd109abb..b4bdcc7f8b1f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4933d07531711e399d8d578036aa9fc1be2f9b20 +refs/heads/master: 3b17f136bf32984eb0faeb116bcd44ffe3503782 diff --git a/trunk/arch/m68k/kernel/traps.c b/trunk/arch/m68k/kernel/traps.c index fd4858e2dd63..75b8340b254b 100644 --- a/trunk/arch/m68k/kernel/traps.c +++ b/trunk/arch/m68k/kernel/traps.c @@ -468,15 +468,26 @@ static inline void access_error040(struct frame *fp) * (if do_page_fault didn't fix the mapping, * the writeback won't do good) */ +disable_wb: #ifdef DEBUG printk(".. disabling wb2\n"); #endif if (fp->un.fmt7.wb2a == fp->un.fmt7.faddr) fp->un.fmt7.wb2s &= ~WBV_040; + if (fp->un.fmt7.wb3a == fp->un.fmt7.faddr) + fp->un.fmt7.wb3s &= ~WBV_040; } - } else if (send_fault_sig(&fp->ptregs) > 0) { - printk("68040 access error, ssw=%x\n", ssw); - trap_c(fp); + } else { + /* In case of a bus error we either kill the process or expect + * the kernel to catch the fault, which then is also responsible + * for cleaning up the mess. + */ + current->thread.signo = SIGBUS; + current->thread.faddr = fp->un.fmt7.faddr; + if (send_fault_sig(&fp->ptregs) >= 0) + printk("68040 bus error (ssw=%x, faddr=%lx)\n", ssw, + fp->un.fmt7.faddr); + goto disable_wb; } do_040writebacks(fp);