diff options
author | Kumar Gala <galak@kernel.crashing.org> | 2006-05-05 01:02:08 -0400 |
---|---|---|
committer | Kumar Gala <galak@kernel.crashing.org> | 2006-05-05 01:02:08 -0400 |
commit | 7e990266c845d7f712c96013891aaf74baef198f (patch) | |
tree | 92bc569003abdfd53b53f1081132469d92497ded /arch/powerpc/kernel/setup-common.c | |
parent | 5a43ee65620d628ba04deecf241b63b2410b97f2 (diff) |
powerpc: provide ppc_md.panic() for both ppc32 & ppc64
Allow boards to provide a panic callback on ppc32. Moved the code to sets
this up into setup-common.c so its shared between ppc32 & ppc64. Also moved
do_init_bootmem prototype into setup.h.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/setup-common.c')
-rw-r--r-- | arch/powerpc/kernel/setup-common.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index 684ab1d49c65..88de557fe046 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c | |||
@@ -524,3 +524,20 @@ int check_legacy_ioport(unsigned long base_port) | |||
524 | return ppc_md.check_legacy_ioport(base_port); | 524 | return ppc_md.check_legacy_ioport(base_port); |
525 | } | 525 | } |
526 | EXPORT_SYMBOL(check_legacy_ioport); | 526 | EXPORT_SYMBOL(check_legacy_ioport); |
527 | |||
528 | static int ppc_panic_event(struct notifier_block *this, | ||
529 | unsigned long event, void *ptr) | ||
530 | { | ||
531 | ppc_md.panic(ptr); /* May not return */ | ||
532 | return NOTIFY_DONE; | ||
533 | } | ||
534 | |||
535 | static struct notifier_block ppc_panic_block = { | ||
536 | .notifier_call = ppc_panic_event, | ||
537 | .priority = INT_MIN /* may not return; must be done last */ | ||
538 | }; | ||
539 | |||
540 | void __init setup_panic(void) | ||
541 | { | ||
542 | atomic_notifier_chain_register(&panic_notifier_list, &ppc_panic_block); | ||
543 | } | ||