From 7892d717dce14566d364612cbd01c8f9ff3e6397 Mon Sep 17 00:00:00 2001 From: Jack Steiner Date: Thu, 27 Apr 2006 20:01:05 -0500 Subject: [PATCH] --- yaml --- r: 30985 b: refs/heads/master c: 9d56d878ae12dbb9af744cec2858ed35dffde2b2 h: refs/heads/master i: 30983: 47a8e60af91ea9b92c7f5676b35670b0a1e9d89a v: v3 --- [refs] | 2 +- trunk/arch/ia64/sn/kernel/setup.c | 10 ++++++++-- trunk/include/asm-ia64/sn/sn_sal.h | 10 ++++++++++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 99861b9ca490..679fa39c128c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f1206641ef4a8cb7a7b15b75e8cfdc7c6bfaf213 +refs/heads/master: 9d56d878ae12dbb9af744cec2858ed35dffde2b2 diff --git a/trunk/arch/ia64/sn/kernel/setup.c b/trunk/arch/ia64/sn/kernel/setup.c index 93577abae36d..97579348a549 100644 --- a/trunk/arch/ia64/sn/kernel/setup.c +++ b/trunk/arch/ia64/sn/kernel/setup.c @@ -577,7 +577,8 @@ void __init sn_cpu_init(void) int i; static int wars_have_been_checked; - if (smp_processor_id() == 0 && IS_MEDUSA()) { + cpuid = smp_processor_id(); + if (cpuid == 0 && IS_MEDUSA()) { if (ia64_sn_is_fake_prom()) sn_prom_type = 2; else @@ -596,6 +597,12 @@ void __init sn_cpu_init(void) BUG(); sn_hub_info->as_shift = sn_hub_info->nasid_shift - 2; + /* + * Don't check status. The SAL call is not supported on all PROMs + * but a failure is harmless. + */ + (void) ia64_sn_set_cpu_number(cpuid); + /* * The boot cpu makes this call again after platform initialization is * complete. @@ -607,7 +614,6 @@ void __init sn_cpu_init(void) if (ia64_sn_get_prom_feature_set(i, &sn_prom_features[i]) != 0) break; - cpuid = smp_processor_id(); cpuphyid = get_sapicid(); if (ia64_sn_get_sapic_info(cpuphyid, &nasid, &subnode, &slice)) diff --git a/trunk/include/asm-ia64/sn/sn_sal.h b/trunk/include/asm-ia64/sn/sn_sal.h index cd490b20d592..bd4452bda357 100644 --- a/trunk/include/asm-ia64/sn/sn_sal.h +++ b/trunk/include/asm-ia64/sn/sn_sal.h @@ -85,6 +85,7 @@ #define SN_SAL_GET_PROM_FEATURE_SET 0x02000065 #define SN_SAL_SET_OS_FEATURE_SET 0x02000066 #define SN_SAL_INJECT_ERROR 0x02000067 +#define SN_SAL_SET_CPU_NUMBER 0x02000068 /* * Service-specific constants @@ -1150,4 +1151,13 @@ sn_inject_error(u64 paddr, u64 *data, u64 *ecc) local_irq_restore(irq_flags); return ret_stuff.status; } + +static inline int +ia64_sn_set_cpu_number(int cpu) +{ + struct ia64_sal_retval rv; + + SAL_CALL_NOLOCK(rv, SN_SAL_SET_CPU_NUMBER, cpu, 0, 0, 0, 0, 0, 0); + return rv.status; +} #endif /* _ASM_IA64_SN_SN_SAL_H */