On Tue, 19 Feb 2008, Roman Zippel wrote:
> ...
> The only missing bit is to skip the writeback, as the fault has to be
> first fixed by the caller, so the patch below should do the trick...
It does indeed do the trick!
Thanks, Roman.
-f
>
> bye, Roman
>
> ---
> arch/m68k/kernel/traps.c | 13 ++++++++++---
> 1 file changed, 10 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
> @@ -477,9 +477,16 @@ static inline void access_error040(struc
> 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, so skip writebacks.
> + */
> + current->thread.signo = SIGBUS;
> + current->thread.faddr = fp->un.fmt7.faddr;
> + if (send_fault_sig(&fp->ptregs) > 0)
> + printk("68040 access error, ssw=%x\n", ssw);
> + return;
> }
>
> do_040writebacks(fp);
> -
> To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
> the body of a message to
majordomo@vger...
> More majordomo info at
http://vger.kernel.org/majordomo-info.html
>
-
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to
majordomo@vger...
More majordomo info at
http://vger.kernel.org/majordomo-info.html
opensubscriber is not affiliated with the authors of this message nor responsible for its content.