]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
MIPS: Add board_ebase_setup()
authorKevin Cernekee <cernekee@gmail.com>
Wed, 16 Nov 2011 01:25:45 +0000 (01:25 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Wed, 16 Nov 2011 01:25:45 +0000 (01:25 +0000)
Some systems need to relocate the MIPS exception vector base during
trap initialization.  Add a hook to make this possible.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/2959/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/traps.h
arch/mips/kernel/traps.c

index 4edab87eebd276e844d3a0e8bef6a05c3c18d2de..ff74aec3561a3f0a88829db33c15b87887fdcbc9 100644 (file)
@@ -24,6 +24,7 @@ extern int (*board_be_handler)(struct pt_regs *regs, int is_fixup);
 extern void (*board_nmi_handler_setup)(void);
 extern void (*board_ejtag_handler_setup)(void);
 extern void (*board_bind_eic_interrupt)(int irq, int regset);
+extern void (*board_ebase_setup)(void);
 
 extern int register_nmi_notifier(struct notifier_block *nb);
 
index 46b8b7dd5ed831682ab435f5be01bdf5305140fb..c597c53dd3cc0da57066ac39065f142d58fbb545 100644 (file)
@@ -91,6 +91,7 @@ int (*board_be_handler)(struct pt_regs *regs, int is_fixup);
 void (*board_nmi_handler_setup)(void);
 void (*board_ejtag_handler_setup)(void);
 void (*board_bind_eic_interrupt)(int irq, int regset);
+void (*board_ebase_setup)(void);
 
 
 static void show_raw_backtrace(unsigned long reg29)
@@ -1690,6 +1691,8 @@ void __init trap_init(void)
                        ebase += (read_c0_ebase() & 0x3ffff000);
        }
 
+       if (board_ebase_setup)
+               board_ebase_setup();
        per_cpu_trap_init();
 
        /*