aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2006-05-18 19:23:47 -0400
committerPaul Mackerras <paulus@samba.org>2006-05-18 19:23:47 -0400
commit877fbae3d51ba792639535bfc0f428154b8da605 (patch)
treea9cb1827e31a5e82c5473c0357eb6b3a7084f201 /arch/powerpc
parentf18fc729cd2d67b76e24206ee3567c1f6983c358 (diff)
parent7e990266c845d7f712c96013891aaf74baef198f (diff)
Merge branch 'for_paulus' of git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/kernel/setup-common.c17
-rw-r--r--arch/powerpc/kernel/setup.h2
-rw-r--r--arch/powerpc/kernel/setup_32.c5
-rw-r--r--arch/powerpc/kernel/setup_64.c18
4 files changed, 23 insertions, 19 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}
526EXPORT_SYMBOL(check_legacy_ioport); 526EXPORT_SYMBOL(check_legacy_ioport);
527
528static 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
535static 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
540void __init setup_panic(void)
541{
542 atomic_notifier_chain_register(&panic_notifier_list, &ppc_panic_block);
543}
diff --git a/arch/powerpc/kernel/setup.h b/arch/powerpc/kernel/setup.h
index 2ebba755272e..e67066c1933e 100644
--- a/arch/powerpc/kernel/setup.h
+++ b/arch/powerpc/kernel/setup.h
@@ -2,5 +2,7 @@
2#define _POWERPC_KERNEL_SETUP_H 2#define _POWERPC_KERNEL_SETUP_H
3 3
4void check_for_initrd(void); 4void check_for_initrd(void);
5void do_init_bootmem(void);
6void setup_panic(void);
5 7
6#endif /* _POWERPC_KERNEL_SETUP_H */ 8#endif /* _POWERPC_KERNEL_SETUP_H */
diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c
index 69ac25701344..88832b3ee661 100644
--- a/arch/powerpc/kernel/setup_32.c
+++ b/arch/powerpc/kernel/setup_32.c
@@ -235,8 +235,6 @@ arch_initcall(ppc_init);
235/* Warning, IO base is not yet inited */ 235/* Warning, IO base is not yet inited */
236void __init setup_arch(char **cmdline_p) 236void __init setup_arch(char **cmdline_p)
237{ 237{
238 extern void do_init_bootmem(void);
239
240 /* so udelay does something sensible, assume <= 1000 bogomips */ 238 /* so udelay does something sensible, assume <= 1000 bogomips */
241 loops_per_jiffy = 500000000 / HZ; 239 loops_per_jiffy = 500000000 / HZ;
242 240
@@ -285,6 +283,9 @@ void __init setup_arch(char **cmdline_p)
285 /* reboot on panic */ 283 /* reboot on panic */
286 panic_timeout = 180; 284 panic_timeout = 180;
287 285
286 if (ppc_md.panic)
287 setup_panic();
288
288 init_mm.start_code = PAGE_OFFSET; 289 init_mm.start_code = PAGE_OFFSET;
289 init_mm.end_code = (unsigned long) _etext; 290 init_mm.end_code = (unsigned long) _etext;
290 init_mm.end_data = (unsigned long) _edata; 291 init_mm.end_data = (unsigned long) _edata;
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index 4467c49903b6..ab6ea37a77aa 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -100,12 +100,6 @@ unsigned long SYSRQ_KEY;
100#endif /* CONFIG_MAGIC_SYSRQ */ 100#endif /* CONFIG_MAGIC_SYSRQ */
101 101
102 102
103static int ppc64_panic_event(struct notifier_block *, unsigned long, void *);
104static struct notifier_block ppc64_panic_block = {
105 .notifier_call = ppc64_panic_event,
106 .priority = INT_MIN /* may not return; must be done last */
107};
108
109#ifdef CONFIG_SMP 103#ifdef CONFIG_SMP
110 104
111static int smt_enabled_cmdline; 105static int smt_enabled_cmdline;
@@ -456,13 +450,6 @@ void __init setup_system(void)
456 DBG(" <- setup_system()\n"); 450 DBG(" <- setup_system()\n");
457} 451}
458 452
459static int ppc64_panic_event(struct notifier_block *this,
460 unsigned long event, void *ptr)
461{
462 ppc_md.panic((char *)ptr); /* May not return */
463 return NOTIFY_DONE;
464}
465
466#ifdef CONFIG_IRQSTACKS 453#ifdef CONFIG_IRQSTACKS
467static void __init irqstack_early_init(void) 454static void __init irqstack_early_init(void)
468{ 455{
@@ -517,8 +504,6 @@ static void __init emergency_stack_init(void)
517 */ 504 */
518void __init setup_arch(char **cmdline_p) 505void __init setup_arch(char **cmdline_p)
519{ 506{
520 extern void do_init_bootmem(void);
521
522 ppc64_boot_msg(0x12, "Setup Arch"); 507 ppc64_boot_msg(0x12, "Setup Arch");
523 508
524 *cmdline_p = cmd_line; 509 *cmdline_p = cmd_line;
@@ -535,8 +520,7 @@ void __init setup_arch(char **cmdline_p)
535 panic_timeout = 180; 520 panic_timeout = 180;
536 521
537 if (ppc_md.panic) 522 if (ppc_md.panic)
538 atomic_notifier_chain_register(&panic_notifier_list, 523 setup_panic();
539 &ppc64_panic_block);
540 524
541 init_mm.start_code = PAGE_OFFSET; 525 init_mm.start_code = PAGE_OFFSET;
542 init_mm.end_code = (unsigned long) _etext; 526 init_mm.end_code = (unsigned long) _etext;