diff options
author | Jay Lan <jlan@sgi.com> | 2006-12-11 18:39:23 -0500 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2006-12-12 13:09:39 -0500 |
commit | adf142e379bd20ad906a7e36f722eaabb3b44b0c (patch) | |
tree | bcd0e2054bdaf023e211169bd46bb334b6cdcb11 /arch/ia64/sn/kernel/setup.c | |
parent | 3640543df26fd38f31f0c6decc35c07be2a6307c (diff) |
[IA64] Do not call SN_SAL_SET_CPU_NUMBER twice on cpu 0
This is an SN specific patch.
Architectually, cpu_init is always called twice on cpu 0
and thus resulted in two SN_SAL_SET_CPU_NUMBER calls.
This was harmless in production kernel; however, it can
cause problem on booting up a crashdump kernel at Altix.
Here is the patch that detects the second sn_cpu_init
call and skips the second call to SN_SAL_SET_CPU_NUMBER.
Signed-Off-By: Jay Lan <jlan@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/sn/kernel/setup.c')
-rw-r--r-- | arch/ia64/sn/kernel/setup.c | 12 |
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 |