On Wed, 21 May 2008, Andreas Schwab wrote:
Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> writes:
On Mon, 19 May 2008, Andreas Schwab wrote:
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!)
Thanks!
It helps for the call in nfeth_init().
It doesn't help for the call in setup_arch(), as trap_init() hasn't been
called yet.
Does it work to set up the trap vector for illegal insn in
base_trap_init?
Yes it does! Can I have your S-o-B?
--- linux/arch/m68k/kernel/traps.c.~1.33.~ 2008-05-08 11:23:16.000000000 +0200
+++ linux/arch/m68k/kernel/traps.c 2008-05-21 09:43:52.000000000 +0200
@@ -50,6 +50,7 @@ asmlinkage void fpu_emu(void);
e_vector vectors[256] = {
[VEC_BUSERR] = buserr,
+ [VEC_ILLEGAL] = trap, /* needed for nf_init */
[VEC_SYS] = system_call,
};
@@ -1018,8 +1019,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",
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
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