patch-2.2.8 linux/arch/i386/kernel/time.c

Next file: linux/arch/i386/kernel/visws_apic.c
Previous file: linux/arch/i386/kernel/smp.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.7/linux/arch/i386/kernel/time.c linux/arch/i386/kernel/time.c
@@ -47,6 +47,7 @@
 #include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/delay.h>
+#include <asm/msr.h>
 
 #include <linux/mc146818rtc.h>
 #include <linux/timex.h>
@@ -83,8 +84,8 @@
 	register unsigned long edx asm("dx");
 
 	/* Read the Time Stamp Counter */
-	__asm__("rdtsc"
-		:"=a" (eax), "=d" (edx));
+
+	rdtsc(eax,edx);
 
 	/* .. relative to previous jiffy (32 bits is enough) */
 	eax -= last_tsc_low;	/* tsc_low delta */
@@ -443,7 +444,8 @@
 		 */
 	
 		/* read Pentium cycle counter */
-		__asm__("rdtsc" : "=a" (last_tsc_low) : : "edx");
+
+		rdtscl(last_tsc_low);
 
 		outb_p(0x00, 0x43);     /* latch the count ASAP */
 
@@ -566,12 +568,12 @@
 		unsigned long endlow, endhigh;
 		unsigned long count;
 
-		__asm__ __volatile__("rdtsc":"=a" (startlow),"=d" (starthigh));
+		rdtsc(startlow,starthigh);
 		count = 0;
 		do {
 			count++;
 		} while ((inb(0x61) & 0x20) == 0);
-		__asm__ __volatile__("rdtsc":"=a" (endlow),"=d" (endhigh));
+		rdtsc(endlow,endhigh);
 
 		last_tsc_low = endlow;
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)