Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=adf142e379bd20ad906a7e36f722eaabb3b44b0c
Commit:     adf142e379bd20ad906a7e36f722eaabb3b44b0c
Parent:     3640543df26fd38f31f0c6decc35c07be2a6307c
Author:     Jay Lan <[EMAIL PROTECTED]>
AuthorDate: Mon Dec 11 15:39:23 2006 -0800
Committer:  Tony Luck <[EMAIL PROTECTED]>
CommitDate: Tue Dec 12 10:09:39 2006 -0800

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Tony Luck <[EMAIL PROTECTED]>
---
 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 a934ad0..8571e52 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)
        int slice;
        int cnode;
        int i;
-       static int wars_have_been_checked;
+       static int wars_have_been_checked, set_cpu0_number;
 
        cpuid = smp_processor_id();
        if (cpuid == 0 && IS_MEDUSA()) {
@@ -605,8 +605,16 @@ void __cpuinit sn_cpu_init(void)
        /*
         * Don't check status. The SAL call is not supported on all PROMs
         * but a failure is harmless.
+        * Architechtuallly, cpu_init is always called twice on cpu 0. We
+        * should set cpu_number on cpu 0 once.
         */
-       (void) ia64_sn_set_cpu_number(cpuid);
+       if (cpuid == 0) {
+               if (!set_cpu0_number) {
+                       (void) ia64_sn_set_cpu_number(cpuid);
+                       set_cpu0_number = 1;
+               }
+       } else
+               (void) ia64_sn_set_cpu_number(cpuid);
 
        /*
         * The boot cpu makes this call again after platform initialization is
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to