Commit 592924d5 authored by Jens Axboe's avatar Jens Axboe Committed by Linus Torvalds

[PATCH] fix broken x86_64 rdtscll

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.
parent e6a9ee2c
...@@ -50,9 +50,9 @@ ...@@ -50,9 +50,9 @@
__asm__ __volatile__ ("rdtsc" : "=a" (low) : : "edx") __asm__ __volatile__ ("rdtsc" : "=a" (low) : : "edx")
#define rdtscll(val) do { \ #define rdtscll(val) do { \
unsigned int a,d; \ unsigned int __a,__d; \
asm volatile("rdtsc" : "=a" (a), "=d" (d)); \ asm volatile("rdtsc" : "=a" (__a), "=d" (__d)); \
(val) = ((unsigned long)a) | (((unsigned long)d)<<32); \ (val) = ((unsigned long)__a) | (((unsigned long)__d)<<32); \
} while(0) } while(0)
#define rdpmc(counter,low,high) \ #define rdpmc(counter,low,high) \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment