X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fpowerpc%2Fkernel%2Fsetup-common.c;fp=arch%2Fpowerpc%2Fkernel%2Fsetup-common.c;h=499c3861074f708e39cdd2ff9509d13c6938bb9c;hb=16c70f8c1b54b61c3b951b6fb220df250fe09b32;hp=684ab1d49c65366d62930c22346cb3581e588e71;hpb=4e76c8a9fa413ccc09d3f7f664183dcce3555d57;p=linux-2.6.git diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index 684ab1d49..499c38610 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c @@ -12,7 +12,6 @@ #undef DEBUG -#include #include #include #include @@ -27,7 +26,7 @@ #include #include #include -#include +#include #include #include #include @@ -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); +}