[PATCH 2/2] powernow-k8: get drv data for correct CPU

From: Naga Chumbalkar
Date: Thu Jun 11 2009 - 11:28:57 EST



Make powernowk8_get() similar to powernowk8_target() and powernowk8_verify()
in the way it obtains "powernow_data" for a given CPU.

Cc: Andreas Herrmann <andreas.herrmann3@xxxxxxx>
Cc: Langsdorf, Mark <mark.langsdorf@xxxxxxx>
Cc: Thomas Renninger <trenn@xxxxxxx>

Signed-off-by: Naga Chumbalkar <nagananda.chumbalkar@xxxxxx>
Reviewed-by: Andreas Herrmann <andreas.herrmann3@xxxxxxx>
Tested-by: Andreas Herrmann <andreas.herrmann3@xxxxxxx>
Acked-by: Langsdorf, Mark <mark.langsdorf@xxxxxxx>
Signed-off-by: Thomas Renninger <trenn@xxxxxxx>

---
arch/x86/kernel/cpu/cpufreq/powernow-k8.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
index 700ede9..069c825 100644
--- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
+++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
@@ -1371,13 +1371,9 @@ static int __devexit powernowk8_cpu_exit(struct cpufreq_policy *pol)

static unsigned int powernowk8_get(unsigned int cpu)
{
- struct powernow_k8_data *data;
+ struct powernow_k8_data *data = per_cpu(powernow_data, cpu);
cpumask_t oldmask = current->cpus_allowed;
unsigned int khz = 0;
- unsigned int first;
-
- first = cpumask_first(cpu_core_mask(cpu));
- data = per_cpu(powernow_data, first);

if (!data)
return -EINVAL;
--
1.6.2.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/