powerpc: Use patch_exception to update the debug exception handler
authorKevin Hao <haokexin@gmail.com>
Sat, 11 May 2013 23:26:23 +0000 (07:26 +0800)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 2 Dec 2013 03:06:55 +0000 (14:06 +1100)
Signed-off-by: Kevin Hao <haokexin@gmail.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/setup_64.c

index 4085aaa9478fd90eff1f1ce149d661bc7488284f..5760b9bea9364e0e704a801f61ce7a9d93bdaea4 100644 (file)
@@ -520,9 +520,6 @@ static void __init irqstack_early_init(void)
 #ifdef CONFIG_PPC_BOOK3E
 static void __init exc_lvl_early_init(void)
 {
-       extern unsigned int interrupt_base_book3e;
-       extern unsigned int exc_debug_debug_book3e;
-
        unsigned int i;
 
        for_each_possible_cpu(i) {
@@ -535,8 +532,7 @@ static void __init exc_lvl_early_init(void)
        }
 
        if (cpu_has_feature(CPU_FTR_DEBUG_LVL_EXC))
-               patch_branch(&interrupt_base_book3e + (0x040 / 4) + 1,
-                            (unsigned long)&exc_debug_debug_book3e, 0);
+               patch_exception(0x040, exc_debug_debug_book3e);
 }
 #else
 #define exc_lvl_early_init()