aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/ia64/sn/kernel/setup.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/ia64/sn/kernel/setup.c b/arch/ia64/sn/kernel/setup.c
index a934ad069425..8571e52c2efd 100644
--- a/arch/ia64/sn/kernel/setup.c
+++ b/arch/ia64/sn/kernel/setup.c
@@ -580,7 +580,7 @@ void __cpuinit sn_cpu_init(void)
580 int slice; 580 int slice;
581 int cnode; 581 int cnode;
582 int i; 582 int i;
583 static int wars_have_been_checked; 583 static int wars_have_been_checked, set_cpu0_number;
584 584
585 cpuid = smp_processor_id(); 585 cpuid = smp_processor_id();
586 if (cpuid == 0 && IS_MEDUSA()) { 586 if (cpuid == 0 && IS_MEDUSA()) {
@@ -605,8 +605,16 @@ void __cpuinit sn_cpu_init(void)
605 /* 605 /*
606 * Don't check status. The SAL call is not supported on all PROMs 606 * Don't check status. The SAL call is not supported on all PROMs
607 * but a failure is harmless. 607 * but a failure is harmless.
608 * Architechtuallly, cpu_init is always called twice on cpu 0. We
609 * should set cpu_number on cpu 0 once.
608 */ 610 */
609 (void) ia64_sn_set_cpu_number(cpuid); 611 if (cpuid == 0) {
612 if (!set_cpu0_number) {
613 (void) ia64_sn_set_cpu_number(cpuid);
614 set_cpu0_number = 1;
615 }
616 } else
617 (void) ia64_sn_set_cpu_number(cpuid);
610 618
611 /* 619 /*
612 * The boot cpu makes this call again after platform initialization is 620 * The boot cpu makes this call again after platform initialization is