Skip to contentSkip to conversation

linux-2.6.3_ia64-cyclone_A2.patch

PATCH In review john stultz 2 participants 8 messages Feb 18, 2004

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux-2.6.3_ia64-cyclone_A2.patch

David,
This patch provides access to the cyclone time source found on IBM EXA
based systems (x450 and x455). This is needed on multi-node systems where the CPU ITCs are not synchronized, causing possible time inconsistencies.

This release fixes one last minor think-o and ran overnight without any time inconsistencies (when used in conjunction w/ the time-interpolator-fix_A0 patch).

Please consider for inclusion into your tree.

thanks
-john

arch/ia64/Kconfig +6 -0
diff -Nru a/arch/ia64/Kconfig b/arch/ia64/Kconfig
@@ -245,6 +245,12 @@
 	  Say Y here to enable machine check support for IA-64.  If you're
 	  unsure, answer Y.
 
+config IA64_CYCLONE
+	bool "Support Cyclone(EXA) Time Source"
+	help
+		Say Y here to enable support for IBM EXA Cyclone time source.
+		If you're unsure, answer N.
+	
 config PM
 	bool "Power Management support"
 	depends on IA64_GENERIC || IA64_DIG || IA64_HP_ZX1
arch/ia64/kernel/Makefile +1 -0
diff -Nru a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile
@@ -18,6 +18,7 @@
 obj-$(CONFIG_MODULES)		+= module.o
 obj-$(CONFIG_SMP)		+= smp.o smpboot.o
 obj-$(CONFIG_PERFMON)		+= perfmon_default_smpl.o
+obj-$(CONFIG_IA64_CYCLONE)	+= cyclone.o
 
 # The gate DSO image is built using a special linker script.
 targets += gate.so gate-syms.o
arch/ia64/kernel/acpi.c +22 -0
diff -Nru a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
@@ -49,6 +49,8 @@
 #include <asm/page.h>
 #include <asm/system.h>
 #include <asm/numa.h>
+#include <asm/sal.h>
+#include <asm/cyclone.h>
 
 
 #define PREFIX			"ACPI: "
@@ -304,6 +306,22 @@
 	return 0;
 }
 
+/* Hook from generic ACPI tables.c */
+void __init acpi_madt_oem_check(char *oem_id, char *oem_table_id)
+{
+	if (!strncmp(oem_id, "IBM", 3) &&
+	    (!strncmp(oem_table_id, "SERMOW", 6))){
+
+		/* Unfortunatly ITC_DRIFT is not yet part of the
+		 * official SAL spec, so the ITC_DRIFT bit is not
+		 * set by the BIOS on this hardware.
+		 */
+		sal_platform_features |= IA64_SAL_PLATFORM_FEATURE_ITC_DRIFT;
+		
+		/*Start cyclone clock*/
+		cyclone_setup(0);
+	}
+}
 
 static int __init
 acpi_parse_madt (unsigned long phys_addr, unsigned long size)
@@ -327,6 +345,10 @@
 		ipi_base_addr = (unsigned long) ioremap(acpi_madt->lapic_address, 0);
 
 	printk(KERN_INFO PREFIX "Local APIC address 0x%lx\n", ipi_base_addr);
+
+	acpi_madt_oem_check(acpi_madt->header.oem_id,
+		acpi_madt->header.oem_table_id);
+
 	return 0;
 }
 
arch/ia64/kernel/cyclone.c new file +158 -0

158 lines not on this page · raw message

include/asm-ia64/cyclone.h new file +15 -0
diff -Nru a/include/asm-ia64/cyclone.h b/include/asm-ia64/cyclone.h
@@ -0,0 +1,15 @@
+#ifndef ASM_IA64_CYCLONE_H
+#define ASM_IA64_CYCLONE_H
+
+#ifdef	CONFIG_IA64_CYCLONE
+extern int use_cyclone;
+extern int __init cyclone_setup(char*);
+#else	/* CONFIG_IA64_CYCLONE */
+#define use_cyclone 0
+static inline void cyclone_setup(char* s)
+{
+	printk(KERN_ERR "Cyclone Counter: System not configured"
+					" w/ CONFIG_IA64_CYCLONE.\n");
+}
+#endif	/* CONFIG_IA64_CYCLONE */
+#endif	/* !ASM_IA64_CYCLONE_H */
#1 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · john stultz

john> This patch provides access to the cyclone time source found on IBM EXA john> based systems (x450 and x455). This is needed on multi-node systems john> where the CPU ITCs are not synchronized, causing possible time john> inconsistencies.

john> This release fixes one last minor think-o and ran overnight without any john> time inconsistencies (when used in conjunction w/ the john> time-interpolator-fix_A0 patch).

john> Please consider for inclusion into your tree.

The current patch looks mostly fine to me (apart from the trailing whitespace again). I'm wondering though whether cyclone.c should go into arch/ia64/ibm/SOMEWHERE, like we do for the SGI and HP platform-specific code. Or, if Cyclone sharable with your x86-based platforms, perhaps it should even go somewhere in drivers?

	--david
#2 lore raw
In reply to john stultz

Out of curiosity: what's the latency behavior for Cyclone? Do all nodes access a single (shared) counter or is the counter replicated on each node and driven by a common clock? My understanding that for SGI's platform it's the latter.

	--david
#3 lore raw
In reply to john stultz
Quoted 11 lines · David Mosberger
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · john stultz

john> This patch provides access to the cyclone time source found on IBM EXA john> based systems (x450 and x455). This is needed on multi-node systems john> where the CPU ITCs are not synchronized, causing possible time john> inconsistencies.

john> This release fixes one last minor think-o and ran overnight without any john> time inconsistencies (when used in conjunction w/ the john> time-interpolator-fix_A0 patch).

Quoted 7 lines

john> Please consider for inclusion into your tree.

The current patch looks mostly fine to me (apart from the trailing whitespace again). I'm wondering though whether cyclone.c should go into arch/ia64/ibm/SOMEWHERE, like we do for the SGI and HP platform-specific code. Or, if Cyclone sharable with your x86-based platforms, perhaps it should even go somewhere in drivers?

Gah! Where is this trailing whitespace? I went through this patch specifically eliminating any I could find. Perhaps my mail client is trying to irritate me.

The code, while similar, isn't quite shareable w/ ia32. However, I'd be up for moving it to a separate IBM directory if you'd prefer, although for just a single file it seems like overkill.

thanks
-john

#4 lore raw
In reply to john stultz
Quoted 4 lines · David Mosberger

Out of curiosity: what's the latency behavior for Cyclone? Do all nodes access a single (shared) counter or is the counter replicated on each node and driven by a common clock? My understanding that for SGI's platform it's the latter.

Unfortunately there is no replicated clock on this hardware, so all nodes access the first counter on the first node. Not great, but correct and slow is better then fast and wrong.

thanks
-john

#5 lore raw
In reply to john stultz
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · john stultz

John> Unfortunately there is no replicated clock on this hardware, John> so all nodes access the first counter on the first node. Not John> great, but correct and slow is better then fast and wrong.

OK, thanks for the info. I'll try to keep this in mind should there be timestamping questions again (as there was recently in the scheduler).

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · john stultz

John> Gah! Where is this trailing whitespace?

I already deleted the whitespace (my editor is showing it in bright red, so it's kind a hard to ignore ;-).

John> I went through this patch specifically eliminating any I could John> find. Perhaps my mail client is trying to irritate me.

The whitespace wasn't systematic, so i doubt it was the mailer. Any chance the mail contained an old patch?

John> The code, while similar, isn't quite shareable w/ John> ia32. However, I'd be up for moving it to a separate IBM John> directory if you'd prefer, although for just a single file it John> seems like overkill.

I don't feel very strongly about it. If you expect there to be other IBM-platform specific files in the future, it would make sense to create an ibm subdirectory. It's really your call.

	--david
#6 lore raw
In reply to john stultz
Quoted 4 lines · David Mosberger
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · john stultz

John> Gah! Where is this trailing whitespace?

Quoted 8 lines

I already deleted the whitespace (my editor is showing it in bright red, so it's kind a hard to ignore ;-).

John> I went through this patch specifically eliminating any I could John> find. Perhaps my mail client is trying to irritate me.

The whitespace wasn't systematic, so i doubt it was the mailer. Any chance the mail contained an old patch?

No, I just checked what I sent you and its the right patch. Using vi "set list", I still don't see any within the context of the patch, although I notice my message had trailing whitespace.

Quoted 8 lines

John> The code, while similar, isn't quite shareable w/ John> ia32. However, I'd be up for moving it to a separate IBM John> directory if you'd prefer, although for just a single file it John> seems like overkill.

I don't feel very strongly about it. If you expect there to be other IBM-platform specific files in the future, it would make sense to create an ibm subdirectory. It's really your call.

I don't believe there are any current plans that would call for new IBM platform specific files. So I prefer the patch as it was sent (modulo, of course, the cursed trailing whitespace).

thanks
-john

#7 lore raw
In reply to john stultz
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · john stultz

John> I don't believe there are any current plans that would call for new IBM John> platform specific files. So I prefer the patch as it was sent (modulo, John> of course, the cursed trailing whitespace).

OK, in that case can you just resend me the patch (in private mail) so I'm sure I'm starting with the right patch. Perhaps I was looking at an old mail by accident.

	--david