diff options
Diffstat (limited to 'arch/ppc64/kernel/setup.c')
-rw-r--r-- | arch/ppc64/kernel/setup.c | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/arch/ppc64/kernel/setup.c b/arch/ppc64/kernel/setup.c index 9e70ac90dec..0a47a5ef428 100644 --- a/arch/ppc64/kernel/setup.c +++ b/arch/ppc64/kernel/setup.c | |||
@@ -344,6 +344,7 @@ static void __init setup_cpu_maps(void) | |||
344 | extern struct machdep_calls pSeries_md; | 344 | extern struct machdep_calls pSeries_md; |
345 | extern struct machdep_calls pmac_md; | 345 | extern struct machdep_calls pmac_md; |
346 | extern struct machdep_calls maple_md; | 346 | extern struct machdep_calls maple_md; |
347 | extern struct machdep_calls bpa_md; | ||
347 | 348 | ||
348 | /* Ultimately, stuff them in an elf section like initcalls... */ | 349 | /* Ultimately, stuff them in an elf section like initcalls... */ |
349 | static struct machdep_calls __initdata *machines[] = { | 350 | static struct machdep_calls __initdata *machines[] = { |
@@ -356,6 +357,9 @@ static struct machdep_calls __initdata *machines[] = { | |||
356 | #ifdef CONFIG_PPC_MAPLE | 357 | #ifdef CONFIG_PPC_MAPLE |
357 | &maple_md, | 358 | &maple_md, |
358 | #endif /* CONFIG_PPC_MAPLE */ | 359 | #endif /* CONFIG_PPC_MAPLE */ |
360 | #ifdef CONFIG_PPC_BPA | ||
361 | &bpa_md, | ||
362 | #endif | ||
359 | NULL | 363 | NULL |
360 | }; | 364 | }; |
361 | 365 | ||
@@ -679,6 +683,12 @@ void machine_restart(char *cmd) | |||
679 | if (ppc_md.nvram_sync) | 683 | if (ppc_md.nvram_sync) |
680 | ppc_md.nvram_sync(); | 684 | ppc_md.nvram_sync(); |
681 | ppc_md.restart(cmd); | 685 | ppc_md.restart(cmd); |
686 | #ifdef CONFIG_SMP | ||
687 | smp_send_stop(); | ||
688 | #endif | ||
689 | printk(KERN_EMERG "System Halted, OK to turn off power\n"); | ||
690 | local_irq_disable(); | ||
691 | while (1) ; | ||
682 | } | 692 | } |
683 | 693 | ||
684 | EXPORT_SYMBOL(machine_restart); | 694 | EXPORT_SYMBOL(machine_restart); |
@@ -688,6 +698,12 @@ void machine_power_off(void) | |||
688 | if (ppc_md.nvram_sync) | 698 | if (ppc_md.nvram_sync) |
689 | ppc_md.nvram_sync(); | 699 | ppc_md.nvram_sync(); |
690 | ppc_md.power_off(); | 700 | ppc_md.power_off(); |
701 | #ifdef CONFIG_SMP | ||
702 | smp_send_stop(); | ||
703 | #endif | ||
704 | printk(KERN_EMERG "System Halted, OK to turn off power\n"); | ||
705 | local_irq_disable(); | ||
706 | while (1) ; | ||
691 | } | 707 | } |
692 | 708 | ||
693 | EXPORT_SYMBOL(machine_power_off); | 709 | EXPORT_SYMBOL(machine_power_off); |
@@ -697,13 +713,16 @@ void machine_halt(void) | |||
697 | if (ppc_md.nvram_sync) | 713 | if (ppc_md.nvram_sync) |
698 | ppc_md.nvram_sync(); | 714 | ppc_md.nvram_sync(); |
699 | ppc_md.halt(); | 715 | ppc_md.halt(); |
716 | #ifdef CONFIG_SMP | ||
717 | smp_send_stop(); | ||
718 | #endif | ||
719 | printk(KERN_EMERG "System Halted, OK to turn off power\n"); | ||
720 | local_irq_disable(); | ||
721 | while (1) ; | ||
700 | } | 722 | } |
701 | 723 | ||
702 | EXPORT_SYMBOL(machine_halt); | 724 | EXPORT_SYMBOL(machine_halt); |
703 | 725 | ||
704 | unsigned long ppc_proc_freq; | ||
705 | unsigned long ppc_tb_freq; | ||
706 | |||
707 | static int ppc64_panic_event(struct notifier_block *this, | 726 | static int ppc64_panic_event(struct notifier_block *this, |
708 | unsigned long event, void *ptr) | 727 | unsigned long event, void *ptr) |
709 | { | 728 | { |
@@ -1080,11 +1099,11 @@ void __init setup_arch(char **cmdline_p) | |||
1080 | static void ppc64_do_msg(unsigned int src, const char *msg) | 1099 | static void ppc64_do_msg(unsigned int src, const char *msg) |
1081 | { | 1100 | { |
1082 | if (ppc_md.progress) { | 1101 | if (ppc_md.progress) { |
1083 | char buf[32]; | 1102 | char buf[128]; |
1084 | 1103 | ||
1085 | sprintf(buf, "%08x \n", src); | 1104 | sprintf(buf, "%08X\n", src); |
1086 | ppc_md.progress(buf, 0); | 1105 | ppc_md.progress(buf, 0); |
1087 | sprintf(buf, "%-16s", msg); | 1106 | snprintf(buf, 128, "%s", msg); |
1088 | ppc_md.progress(buf, 0); | 1107 | ppc_md.progress(buf, 0); |
1089 | } | 1108 | } |
1090 | } | 1109 | } |
@@ -1118,7 +1137,7 @@ void ppc64_dump_msg(unsigned int src, const char *msg) | |||
1118 | } | 1137 | } |
1119 | 1138 | ||
1120 | /* This should only be called on processor 0 during calibrate decr */ | 1139 | /* This should only be called on processor 0 during calibrate decr */ |
1121 | void setup_default_decr(void) | 1140 | void __init setup_default_decr(void) |
1122 | { | 1141 | { |
1123 | struct paca_struct *lpaca = get_paca(); | 1142 | struct paca_struct *lpaca = get_paca(); |
1124 | 1143 | ||