aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc64/kernel/setup.c
diff options
context:
space:
mode:
authorAnton Altaparmakov <aia21@cantab.net>2005-06-25 09:27:27 -0400
committerAnton Altaparmakov <aia21@cantab.net>2005-06-25 09:27:27 -0400
commit38b22b6e9f46ab8f73ef5734f0e0a000766a9258 (patch)
tree2ccc41ef55918d3af43e444bde7648562a031559 /arch/ppc64/kernel/setup.c
parent3357d4c75f1fb67e7304998c4ad4e9a9fed66fa4 (diff)
parentb3e112bcc19abd8e9657dca34a87316786e096f3 (diff)
Automerge with /usr/src/ntfs-2.6.git.
Diffstat (limited to 'arch/ppc64/kernel/setup.c')
-rw-r--r--arch/ppc64/kernel/setup.c34
1 files changed, 27 insertions, 7 deletions
diff --git a/arch/ppc64/kernel/setup.c b/arch/ppc64/kernel/setup.c
index 8e439a817642..0a47a5ef428d 100644
--- a/arch/ppc64/kernel/setup.c
+++ b/arch/ppc64/kernel/setup.c
@@ -344,6 +344,7 @@ static void __init setup_cpu_maps(void)
344extern struct machdep_calls pSeries_md; 344extern struct machdep_calls pSeries_md;
345extern struct machdep_calls pmac_md; 345extern struct machdep_calls pmac_md;
346extern struct machdep_calls maple_md; 346extern struct machdep_calls maple_md;
347extern 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... */
349static struct machdep_calls __initdata *machines[] = { 350static 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
684EXPORT_SYMBOL(machine_restart); 694EXPORT_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
693EXPORT_SYMBOL(machine_power_off); 709EXPORT_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
702EXPORT_SYMBOL(machine_halt); 724EXPORT_SYMBOL(machine_halt);
703 725
704unsigned long ppc_proc_freq;
705unsigned long ppc_tb_freq;
706
707static int ppc64_panic_event(struct notifier_block *this, 726static int ppc64_panic_event(struct notifier_block *this,
708 unsigned long event, void *ptr) 727 unsigned long event, void *ptr)
709{ 728{
@@ -1055,6 +1074,7 @@ void __init setup_arch(char **cmdline_p)
1055 1074
1056 /* set up the bootmem stuff with available memory */ 1075 /* set up the bootmem stuff with available memory */
1057 do_init_bootmem(); 1076 do_init_bootmem();
1077 sparse_init();
1058 1078
1059 /* initialize the syscall map in systemcfg */ 1079 /* initialize the syscall map in systemcfg */
1060 setup_syscall_map(); 1080 setup_syscall_map();
@@ -1079,11 +1099,11 @@ void __init setup_arch(char **cmdline_p)
1079static void ppc64_do_msg(unsigned int src, const char *msg) 1099static void ppc64_do_msg(unsigned int src, const char *msg)
1080{ 1100{
1081 if (ppc_md.progress) { 1101 if (ppc_md.progress) {
1082 char buf[32]; 1102 char buf[128];
1083 1103
1084 sprintf(buf, "%08x \n", src); 1104 sprintf(buf, "%08X\n", src);
1085 ppc_md.progress(buf, 0); 1105 ppc_md.progress(buf, 0);
1086 sprintf(buf, "%-16s", msg); 1106 snprintf(buf, 128, "%s", msg);
1087 ppc_md.progress(buf, 0); 1107 ppc_md.progress(buf, 0);
1088 } 1108 }
1089} 1109}
@@ -1117,7 +1137,7 @@ void ppc64_dump_msg(unsigned int src, const char *msg)
1117} 1137}
1118 1138
1119/* This should only be called on processor 0 during calibrate decr */ 1139/* This should only be called on processor 0 during calibrate decr */
1120void setup_default_decr(void) 1140void __init setup_default_decr(void)
1121{ 1141{
1122 struct paca_struct *lpaca = get_paca(); 1142 struct paca_struct *lpaca = get_paca();
1123 1143