Merge master.kernel.org:/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog
[pandora-kernel.git] / arch / powerpc / kernel / setup-common.c
index 684ab1d..bd32812 100644 (file)
@@ -443,6 +443,7 @@ void __init smp_setup_cpu_maps(void)
 }
 #endif /* CONFIG_SMP */
 
+int __initdata do_early_xmon;
 #ifdef CONFIG_XMON
 static int __init early_xmon(char *p)
 {
@@ -456,7 +457,7 @@ static int __init early_xmon(char *p)
                        return 0;
        }
        xmon_init(1);
-       debugger(NULL);
+       do_early_xmon = 1;
 
        return 0;
 }
@@ -524,3 +525,20 @@ int check_legacy_ioport(unsigned long base_port)
        return ppc_md.check_legacy_ioport(base_port);
 }
 EXPORT_SYMBOL(check_legacy_ioport);
+
+static int ppc_panic_event(struct notifier_block *this,
+                             unsigned long event, void *ptr)
+{
+       ppc_md.panic(ptr);  /* May not return */
+       return NOTIFY_DONE;
+}
+
+static struct notifier_block ppc_panic_block = {
+       .notifier_call = ppc_panic_event,
+       .priority = INT_MIN /* may not return; must be done last */
+};
+
+void __init setup_panic(void)
+{
+       atomic_notifier_chain_register(&panic_notifier_list, &ppc_panic_block);
+}