]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] fix broken x86_64 rdtscll
authorJens Axboe <axboe@suse.de>
Wed, 3 Dec 2003 23:53:31 +0000 (15:53 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Wed, 3 Dec 2003 23:53:31 +0000 (15:53 -0800)
The scheduler is completed b0rked on x86_64, and I finally found out
why.  sched_clock() always returned 0, because rdtscll() always returned
0.  The 'a' in the macro doesn't agree with the 'a' in the function,
yippe :-)

This is a show stopper for x86_64.

include/asm-x86_64/msr.h

index 626bd0400c56f02e2decb3e3ff3d964f86f7dbd7..342b46885ec9520b4ae1d6f580c07f9a7af77184 100644 (file)
@@ -50,9 +50,9 @@
      __asm__ __volatile__ ("rdtsc" : "=a" (low) : : "edx")
 
 #define rdtscll(val) do { \
-     unsigned int a,d; \
-     asm volatile("rdtsc" : "=a" (a), "=d" (d)); \
-     (val) = ((unsigned long)a) | (((unsigned long)d)<<32); \
+     unsigned int __a,__d; \
+     asm volatile("rdtsc" : "=a" (__a), "=d" (__d)); \
+     (val) = ((unsigned long)__a) | (((unsigned long)__d)<<32); \
 } while(0)
 
 #define rdpmc(counter,low,high) \