Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> writes:
I need the patch below to run a multi-platform kernel on my Amiga 4000/040, else nf_get_id crashes with e.g.:
Does that help? (Completely untested!) --- linux/arch/m68k/kernel/traps.c.~1.33.~ 2008-05-08 11:23:16.000000000 +0200 +++ linux/arch/m68k/kernel/traps.c 2008-05-19 23:46:15.000000000 +0200 @@ -1018,8 +1018,28 @@ void dump_stack(void) EXPORT_SYMBOL(dump_stack); +extern const int frame_extra_sizes[]; /* in m68k/kernel/signal.c */ + void bad_super_trap (struct frame *fp) { + const struct exception_table_entry *fixup; + + /* Are we prepared to handle this kernel fault? */ + fixup = search_exception_tables(fp->ptregs.pc); + if (fixup) { + struct pt_regs *regs, *tregs; + /* Create a new four word stack frame, discarding the old + one. */ + regs = &fp->ptregs; + regs->stkadj = frame_extra_sizes[regs->format]; + tregs = (struct pt_regs *)((ulong)regs + regs->stkadj); + tregs->vector = regs->vector; + tregs->format = 0; + tregs->pc = fixup->fixup; + tregs->sr = regs->sr; + return; + } + console_verbose(); if (fp->ptregs.vector < 4 * ARRAY_SIZE(vec_names)) printk ("*** %s *** FORMAT=%X\n", Andreas. -- Andreas Schwab, SuSE Labs, schwab@xxxxxxx SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." -- 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