On Mon, 28 Apr 2008, Geert Uytterhoeven wrote:
Roman: As the new mac_esp driver just went into mainline through the SCSI tree, can you please take a look at http://linux-m68k-cvs.ubb.ca/~geert/linux-m68k-patches-2.6/m68k-skip-writebacks-for-bus-errors.diff and add your S-oB, so I can put it on the fast track to Linus?
I've committed the updated version of this patch below. bye, Roman [PATCH] handle 68040 bus faults Fix 68040 bus fault handling, so the standard kernel accepting handling can be used for i/o probing. Contrary to normal access faults there is nothing to fix, but at least we have to disable writebacks to avoid recursive faults. Signed-off-by: Roman Zippel <zippel@xxxxxxxxxxxxxx> --- arch/m68k/kernel/traps.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) Index: linux-2.6/arch/m68k/kernel/traps.c =================================================================== --- linux-2.6.orig/arch/m68k/kernel/traps.c +++ linux-2.6/arch/m68k/kernel/traps.c @@ -468,15 +468,26 @@ static inline void access_error040(struc * (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=%x)\n", + ssw, fp->un.fmt7.faddr); + goto disable_wb; } do_040writebacks(fp); -- To unsubscribe from this list: send the line "unsubscribe linux-m68k" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html