Skip to contentSkip to conversation

old_cpu_power is wrongly divided by 65535 in ips_monitor()

PATCH RESEND New minskey guo 1 participant 1 message Oct 12, 2010 x86 platform drivers

lore
Share & tools
lore
#0 lore raw

PATCH RESEND 2/4 old_cpu_power is wrongly divided by 65535 in ips_monitor()

The variable old_cpu_power is used to save the value of THM_CEC register. In get_cpu_power(), it will be divided by 65535.

---
 drivers/platform/x86/intel_ips.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/platform/x86/intel_ips.c +1 -1
index fb31700..3c7b25c 100644
@@ -948,7 +948,7 @@ static int ips_monitor(void *data)
 		ITV_ME_SEQNO_SHIFT;
 	seqno_timestamp = get_jiffies_64();
 
-	old_cpu_power = thm_readl(THM_CEC) / 65535;
+	old_cpu_power = thm_readl(THM_CEC);
 	schedule_timeout_interruptible(msecs_to_jiffies(IPS_SAMPLE_PERIOD));
 
 	/* Collect an initial average */
Signature · 1 line
1.7.1