From 592924d549db2dfe5b2670af2871c990c7ac7320 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Wed, 3 Dec 2003 15:53:31 -0800 Subject: [PATCH] [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. --- include/asm-x86_64/msr.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/asm-x86_64/msr.h b/include/asm-x86_64/msr.h index 626bd0400c56f..342b46885ec95 100644 --- a/include/asm-x86_64/msr.h +++ b/include/asm-x86_64/msr.h @@ -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) \ -- 2.53.0