Commit eef5167e authored by shin, jacob's avatar shin, jacob Committed by Dave Jones

[CPUFREQ] hotplug cpu fix for powernow-k8

Andi's previous fix to initialise powernow_data on all siblings
will not work properly with CPU Hotplug.
Signed-off-by: default avatarJacob Shin <jacob.shin@amd.com>
Signed-off-by: default avatarDave Jones <davej@redhat.com>
parent 0bb065f2
...@@ -1095,10 +1095,15 @@ static int __devexit powernowk8_cpu_exit (struct cpufreq_policy *pol) ...@@ -1095,10 +1095,15 @@ static int __devexit powernowk8_cpu_exit (struct cpufreq_policy *pol)
static unsigned int powernowk8_get (unsigned int cpu) static unsigned int powernowk8_get (unsigned int cpu)
{ {
struct powernow_k8_data *data = powernow_data[cpu]; struct powernow_k8_data *data;
cpumask_t oldmask = current->cpus_allowed; cpumask_t oldmask = current->cpus_allowed;
unsigned int khz = 0; unsigned int khz = 0;
data = powernow_data[first_cpu(cpu_core_map[cpu])];
if (!data)
return -EINVAL;
set_cpus_allowed(current, cpumask_of_cpu(cpu)); set_cpus_allowed(current, cpumask_of_cpu(cpu));
if (smp_processor_id() != cpu) { if (smp_processor_id() != cpu) {
printk(KERN_ERR PFX "limiting to CPU %d failed in powernowk8_get\n", cpu); printk(KERN_ERR PFX "limiting to CPU %d failed in powernowk8_get\n", cpu);
......
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