Merge master.kernel.org:/home/rmk/linux-2.6-serial
[pandora-kernel.git] / arch / powerpc / kernel / setup-common.c
index 684ab1d..499c386 100644 (file)
@@ -12,7 +12,6 @@
 
 #undef DEBUG
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/string.h>
 #include <linux/sched.h>
@@ -27,7 +26,7 @@
 #include <linux/ioport.h>
 #include <linux/console.h>
 #include <linux/utsname.h>
-#include <linux/tty.h>
+#include <linux/screen_info.h>
 #include <linux/root_dev.h>
 #include <linux/notifier.h>
 #include <linux/cpu.h>
@@ -443,6 +442,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 +456,7 @@ static int __init early_xmon(char *p)
                        return 0;
        }
        xmon_init(1);
-       debugger(NULL);
+       do_early_xmon = 1;
 
        return 0;
 }
@@ -524,3 +524,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);
+}