Commit 67f84f1d authored by Dave Jones's avatar Dave Jones Committed by Dave Jones

[CPUFREQ] Longhaul compile fixes.

Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarDave Jones <davej@redhat.com>
parent ec4bec60
...@@ -100,23 +100,24 @@ static int longhaul_get_cpu_mult(void) ...@@ -100,23 +100,24 @@ static int longhaul_get_cpu_mult(void)
} }
static void do_powersaver(int version) static void do_powersaver(union msr_longhaul *longhaul,
unsigned int clock_ratio_index, int version)
{ {
rdmsrl (MSR_VIA_LONGHAUL, longhaul.val); rdmsrl(MSR_VIA_LONGHAUL, longhaul->val);
longhaul.bits.SoftBusRatio = clock_ratio_index & 0xf; longhaul->bits.SoftBusRatio = clock_ratio_index & 0xf;
longhaul.bits.SoftBusRatio4 = (clock_ratio_index & 0x10) >> 4; longhaul->bits.SoftBusRatio4 = (clock_ratio_index & 0x10) >> 4;
longhaul.bits.EnableSoftBusRatio = 1; longhaul->bits.EnableSoftBusRatio = 1;
longhaul.bits.RevisionKey = 0; longhaul->bits.RevisionKey = 0;
local_irq_disable(); local_irq_disable();
wrmsrl(MSR_VIA_LONGHAUL, longhaul.val); wrmsrl(MSR_VIA_LONGHAUL, longhaul->val);
local_irq_enable(); local_irq_enable();
__hlt(); __hlt();
rdmsrl (MSR_VIA_LONGHAUL, longhaul.val); rdmsrl(MSR_VIA_LONGHAUL, longhaul->val);
longhaul.bits.EnableSoftBusRatio = 0; longhaul->bits.EnableSoftBusRatio = 0;
longhaul.bits.RevisionKey = version; longhaul->bits.RevisionKey = version;
local_irq_disable(); local_irq_disable();
wrmsrl (MSR_VIA_LONGHAUL, longhaul.val); wrmsrl(MSR_VIA_LONGHAUL, longhaul->val);
local_irq_enable(); local_irq_enable();
} }
...@@ -188,7 +189,7 @@ static void longhaul_setstate(unsigned int clock_ratio_index) ...@@ -188,7 +189,7 @@ static void longhaul_setstate(unsigned int clock_ratio_index)
* of scaling (like we do in powernow-k7.c) * of scaling (like we do in powernow-k7.c)
*/ */
case 2: case 2:
do_powersaver(3); do_powersaver(&longhaul, clock_ratio_index, 3);
break; break;
/* /*
...@@ -198,7 +199,7 @@ static void longhaul_setstate(unsigned int clock_ratio_index) ...@@ -198,7 +199,7 @@ static void longhaul_setstate(unsigned int clock_ratio_index)
* to work in practice. * to work in practice.
*/ */
case 3: case 3:
do_powersaver(0xf); do_powersaver(&longhaul, clock_ratio_index, 0xf);
break; break;
} }
......
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