linux-2.4.20-pre7_cyclone-timer_B1
PATCH 1/1 linux-2.4.20-pre7_cyclone-timer_B1
Marcelo, All,
Here is my next rev of the cyclone-timer patch, which applies on top of
James Cleverdon's most recent 2.4 summit patch. Couple of new things in this patch, which are:
o Autodetection works. No more "cyclone" boot option!
- Bummed off of James' autodetection code.
o Cyclone based __udelay (Suggested by Alan, way back)
o Patch does not change userspace access to the rdtsc instruction
- Works w/ & w/o "notsc" option.
- I'm straddling the fence on this one.
o A couple of minor cleanups and fixes
Marcelo: Please consider this... well, actually, please first consider James' patch (Message-ID: <[email protected]>) for inclusion, then mine afterward. :)
Matt, Hubert: I'll send the backports Monday after whatever feedback/flames have hit my inbox.
thanks
-john
Documentation/Configure.help +4 -1
@@ -259,7 +259,10 @@ In particular, it is needed for the x440 boxen and helps with performance on x360s. (The x440 is a NUMA box, even for the 4-CPU - model. The x360 is a non-NUMA system.) + model. The x360 is a non-NUMA system.) Additionally, this patch + uses a performance counter on the cyclone chipset for gettimeofday + calculations, which avoids internal time skew between cpus caused + by unsynced TSCs. If you don't have any of these computers, you may safely say N.
arch/i386/config.in +5 -3
@@ -220,9 +220,11 @@ dep_bool 'Summit Architecture support' CONFIG_SUMMIT $CONFIG_MULTIQUAD fi -bool 'Unsynced TSC support' CONFIG_X86_TSC_DISABLE -if [ "$CONFIG_X86_TSC_DISABLE" != "y" -a "$CONFIG_X86_HAS_TSC" = "y" ]; then - define_bool CONFIG_X86_TSC y +if [ "$CONFIG_MULTIQUAD" != "y" ]; then + bool 'Unsynced TSC support' CONFIG_X86_TSC_DISABLE + if [ "$CONFIG_X86_TSC_DISABLE" != "y" -a "$CONFIG_X86_HAS_TSC" = "y" ]; then + define_bool CONFIG_X86_TSC y + fi fi if [ "$CONFIG_SMP" = "y" -a "$CONFIG_X86_CMPXCHG" = "y" ]; then
arch/i386/kernel/mpparse.c +7 -2
@@ -404,6 +404,9 @@ } } + +extern int cyclone_setup (char *); +/* * Read/parse the MPC */
@@ -451,9 +454,11 @@/* * Can't recognize Summit xAPICs at present, so use the OEM ID. */ -if (!strncmp (oem,"IBM ENSW" ,8 ) && (!strncmp (prod,"NF 6000R" ,8 ) || !strncmp (prod,"VIGIL SMP" ,9 ))) +if (!strncmp (oem,"IBM ENSW" ,8 ) && (!strncmp (prod,"NF 6000R" ,8 ) || !strncmp (prod,"VIGIL SMP" ,9 ))){ xapic =1 ; -else if (!strncmp (oem,"IBM NUMA" ,8 )) +/*enable cyclone timer*/ +cyclone_setup ((char *)0 ); + }else if (!strncmp (oem,"IBM NUMA" ,8 )) numaq =2 ;printk ("APIC at: 0x%lX\n" ,mpc->mpc_lapic);
arch/i386/kernel/time.c +170 -11
224 lines not on this page · raw message
arch/i386/lib/delay.c +5 -2
@@ -56,10 +56,13 @@ :"=&a" (d0) :"0" (loops)); } - +extern __cyclone_delay(unsigned long loops); +extern int use_cyclone;void __delay (unsigned long loops) { -if (x86_udelay_tsc) +if (use_cyclone) +__cyclone_delay (loops); +else if (x86_udelay_tsc)__rdtsc_delay (loops);else __loop_delay (loops);
include/asm-i386/fixmap.h +3 -0
@@ -64,6 +64,9 @@#ifndef CONFIG_X86_F00F_WORKS_OK FIX_F00F,#endif +#ifdef CONFIG_SUMMIT + FIX_CYCLONE_TIMER, /*cyclone timer register*/ +#endif #ifdef CONFIG_HIGHMEM FIX_KMAP_BEGIN ,/* reserved pte's for temporary kernel mappings */ FIX_KMAP_END = FIX_KMAP_BEGIN+(KM_TYPE_NR*NR_CPUS)-1,