Skip to content

Commit

Permalink
[IA64-SGI] - Pass OS logical cpu number to the SN prom (bios)
Browse files Browse the repository at this point in the history
Pass the OS logical cpu number to the PROM. This allows PROM
to log the OS logical cpu number in error records viewed thru POD.

Signed-off-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
  • Loading branch information
Jack Steiner authored and Tony Luck committed Jun 28, 2006
1 parent f120664 commit 9d56d87
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
10 changes: 8 additions & 2 deletions arch/ia64/sn/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.
Expand All @@ -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))
Expand Down
10 changes: 10 additions & 0 deletions include/asm-ia64/sn/sn_sal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 */

0 comments on commit 9d56d87

Please sign in to comment.