Commit 8e94d032 authored by Dave Jones's avatar Dave Jones Committed by Dave Jones

[CPUFREQ] Move rdmsrl/wrmsrl to include/asm-i386/msr.h

parent 42806f84
...@@ -84,27 +84,6 @@ static unsigned int latency; ...@@ -84,27 +84,6 @@ static unsigned int latency;
static char have_a0; static char have_a0;
#ifndef rdmsrl
#define rdmsrl(msr,val) do {unsigned long l__,h__; \
rdmsr (msr, l__, h__); \
val = l__; \
val |= ((u64)h__<<32); \
} while(0)
#endif
#ifndef wrmsrl
static void wrmsrl (u32 msr, u64 val)
{
u32 lo, hi;
lo = (u32) val;
hi = val >> 32;
wrmsr (msr, lo, hi);
}
#endif
static int check_powernow(void) static int check_powernow(void)
{ {
struct cpuinfo_x86 *c = cpu_data; struct cpuinfo_x86 *c = cpu_data;
......
...@@ -8,15 +8,30 @@ ...@@ -8,15 +8,30 @@
*/ */
#define rdmsr(msr,val1,val2) \ #define rdmsr(msr,val1,val2) \
__asm__ __volatile__("rdmsr" \ __asm__ __volatile__("rdmsr" \
: "=a" (val1), "=d" (val2) \ : "=a" (val1), "=d" (val2) \
: "c" (msr)) : "c" (msr))
#define wrmsr(msr,val1,val2) \ #define wrmsr(msr,val1,val2) \
__asm__ __volatile__("wrmsr" \ __asm__ __volatile__("wrmsr" \
: /* no outputs */ \ : /* no outputs */ \
: "c" (msr), "a" (val1), "d" (val2)) : "c" (msr), "a" (val1), "d" (val2))
#define rdmsrl(msr,val) do {unsigned long l__,h__; \
rdmsr (msr, l__, h__); \
val = l__; \
val |= ((u64)h__<<32); \
} while(0)
static void wrmsrl (u32 msr, u64 val)
{
u32 lo, hi;
lo = (u32) val;
hi = val >> 32;
wrmsr (msr, lo, hi);
}
#define rdtsc(low,high) \ #define rdtsc(low,high) \
__asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high)) __asm__ __volatile__("rdtsc" : "=a" (low), "=d" (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