* [PATCH] - Pass OS logical cpu number to the SN prom (bios)
@ 2006-04-27 22:08 Jack Steiner
2006-04-27 23:54 ` Keith Owens
2006-04-28 1:01 ` Jack Steiner
0 siblings, 2 replies; 3+ messages in thread
From: Jack Steiner @ 2006-04-27 22:08 UTC (permalink / raw)
To: linux-ia64
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.
This signifinantly simplifies diagnosis of hardware errors on
large systems.
Signed-off-by: Jack Steiner <steiner@sgi.com>
Index: linux/arch/ia64/sn/kernel/setup.c
=================================--- linux.orig/arch/ia64/sn/kernel/setup.c 2006-04-22 08:50:14.567000831 -0500
+++ linux/arch/ia64/sn/kernel/setup.c 2006-04-27 17:02:24.646672915 -0500
@@ -597,6 +597,12 @@ void __init sn_cpu_init(void)
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(smp_processor_id());
+
+ /*
* The boot cpu makes this call again after platform initialization is
* complete.
*/
Index: linux/include/asm-ia64/sn/sn_sal.h
=================================--- linux.orig/include/asm-ia64/sn/sn_sal.h 2006-04-22 08:50:19.858482442 -0500
+++ linux/include/asm-ia64/sn/sn_sal.h 2006-04-27 17:02:24.654672135 -0500
@@ -85,6 +85,7 @@
#define SN_SAL_GET_PROM_FEATURE_SET 0x02000065
#define SN_SAL_SET_OS_FEATURE_SET 0x02000066
+#define SN_SAL_SET_CPU_NUMBER 0x02000068
/*
* Service-specific constants
@@ -1140,4 +1141,13 @@ ia64_sn_set_os_feature(int feature)
return rv.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 */
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] - Pass OS logical cpu number to the SN prom (bios)
2006-04-27 22:08 [PATCH] - Pass OS logical cpu number to the SN prom (bios) Jack Steiner
@ 2006-04-27 23:54 ` Keith Owens
2006-04-28 1:01 ` Jack Steiner
1 sibling, 0 replies; 3+ messages in thread
From: Keith Owens @ 2006-04-27 23:54 UTC (permalink / raw)
To: linux-ia64
Jack Steiner (on Thu, 27 Apr 2006 17:08:58 -0500) wrote:
>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.
>This signifinantly simplifies diagnosis of hardware errors on
>large systems.
>
> Signed-off-by: Jack Steiner <steiner@sgi.com>
>
>
>
>Index: linux/arch/ia64/sn/kernel/setup.c
>=================================>--- linux.orig/arch/ia64/sn/kernel/setup.c 2006-04-22 08:50:14.567000831 -0500
>+++ linux/arch/ia64/sn/kernel/setup.c 2006-04-27 17:02:24.646672915 -0500
>@@ -597,6 +597,12 @@ void __init sn_cpu_init(void)
> 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(smp_processor_id());
>+
>+ /*
> * The boot cpu makes this call again after platform initialization is
> * complete.
> */
Nit pick. sn_cpu_init() defines a cpuid variable which is set to
smp_processor_id(), but smp_processor_id() is used once (twice with
this patch) before cpuid is defined and used. Move the definition of
cpuid to the top of the function and use it throughout.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] - Pass OS logical cpu number to the SN prom (bios)
2006-04-27 22:08 [PATCH] - Pass OS logical cpu number to the SN prom (bios) Jack Steiner
2006-04-27 23:54 ` Keith Owens
@ 2006-04-28 1:01 ` Jack Steiner
1 sibling, 0 replies; 3+ messages in thread
From: Jack Steiner @ 2006-04-28 1:01 UTC (permalink / raw)
To: linux-ia64
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>
---
Add change suggested by Keith...
Index: linux/arch/ia64/sn/kernel/setup.c
=================================--- linux.orig/arch/ia64/sn/kernel/setup.c 2006-04-22 08:50:14.567000831 -0500
+++ linux/arch/ia64/sn/kernel/setup.c 2006-04-27 19:58:16.633858645 -0500
@@ -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
@@ -597,6 +598,12 @@ void __init sn_cpu_init(void)
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))
Index: linux/include/asm-ia64/sn/sn_sal.h
=================================--- linux.orig/include/asm-ia64/sn/sn_sal.h 2006-04-22 08:50:19.858482442 -0500
+++ linux/include/asm-ia64/sn/sn_sal.h 2006-04-27 17:02:24.654672135 -0500
@@ -85,6 +85,7 @@
#define SN_SAL_GET_PROM_FEATURE_SET 0x02000065
#define SN_SAL_SET_OS_FEATURE_SET 0x02000066
+#define SN_SAL_SET_CPU_NUMBER 0x02000068
/*
* Service-specific constants
@@ -1140,4 +1141,13 @@ ia64_sn_set_os_feature(int feature)
return rv.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 */
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-04-28 1:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-27 22:08 [PATCH] - Pass OS logical cpu number to the SN prom (bios) Jack Steiner
2006-04-27 23:54 ` Keith Owens
2006-04-28 1:01 ` Jack Steiner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox