MIPS: Provide more elevant interface cu2_notifier for CP2 extensions.
[sfrench/cifs-2.6.git] / arch / mips / kernel / traps.c
index 8bdd6a663c7fe2284b69bfd4627acdd77364ca63..1515b673179d45248259edb131da92675d00b6e2 100644 (file)
@@ -907,11 +907,6 @@ static int default_cu2_call(struct notifier_block *nfb, unsigned long action,
        return NOTIFY_OK;
 }
 
-static struct notifier_block default_cu2_notifier = {
-       .notifier_call  = default_cu2_call,
-       .priority       = 0x80000000,           /* Run last  */
-};
-
 asmlinkage void do_cpu(struct pt_regs *regs)
 {
        unsigned int __user *epc;
@@ -976,7 +971,7 @@ asmlinkage void do_cpu(struct pt_regs *regs)
 
        case 2:
                raw_notifier_call_chain(&cu2_chain, CU2_EXCEPTION, regs);
-               break;
+               return;
 
        case 3:
                break;
@@ -1734,5 +1729,5 @@ void __init trap_init(void)
 
        sort_extable(__start___dbe_table, __stop___dbe_table);
 
-       register_cu2_notifier(&default_cu2_notifier);
+       cu2_notifier(default_cu2_call, 0x80000000);     /* Run last  */
 }