Skip to content

Commit

Permalink
[CPUFREQ] hotplug cpu fix for powernow-k8
Browse files Browse the repository at this point in the history
Andi's previous fix to initialise powernow_data on all siblings
will not work properly with CPU Hotplug.

Signed-off-by: Jacob Shin <jacob.shin@amd.com>
Signed-off-by: Dave Jones <davej@redhat.com>
  • Loading branch information
shin, jacob authored and Dave Jones committed Mar 27, 2006
1 parent 0bb065f commit eef5167
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion arch/i386/kernel/cpu/cpufreq/powernow-k8.c
Original file line number Diff line number Diff line change
Expand Up @@ -1095,10 +1095,15 @@ static int __devexit powernowk8_cpu_exit (struct cpufreq_policy *pol)

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;
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));
if (smp_processor_id() != cpu) {
printk(KERN_ERR PFX "limiting to CPU %d failed in powernowk8_get\n", cpu);
Expand Down

0 comments on commit eef5167

Please sign in to comment.