aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
diff options
context:
space:
mode:
authorshin, jacob <jacob.shin@amd.com>2006-03-27 10:57:20 -0500
committerDave Jones <davej@redhat.com>2006-03-27 15:01:28 -0500
commiteef5167e5045fa8265b3e72cac9dbc4bc7dd82a6 (patch)
treedafb8c4001ba4a8c5f15eedd81568799df8cb03f /arch/i386/kernel/cpu/cpufreq/powernow-k8.c
parent0bb065f29bffc7895f0dbac1fc7d74b3a8d357a9 (diff)
[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: Jacob Shin <jacob.shin@amd.com> Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'arch/i386/kernel/cpu/cpufreq/powernow-k8.c')
-rw-r--r--arch/i386/kernel/cpu/cpufreq/powernow-k8.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
index 1e70823e1cb5..712a26bd4457 100644
--- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
+++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
@@ -1095,10 +1095,15 @@ static int __devexit powernowk8_cpu_exit (struct cpufreq_policy *pol)
1095 1095
1096static unsigned int powernowk8_get (unsigned int cpu) 1096static unsigned int powernowk8_get (unsigned int cpu)
1097{ 1097{
1098 struct powernow_k8_data *data = powernow_data[cpu]; 1098 struct powernow_k8_data *data;
1099 cpumask_t oldmask = current->cpus_allowed; 1099 cpumask_t oldmask = current->cpus_allowed;
1100 unsigned int khz = 0; 1100 unsigned int khz = 0;
1101 1101
1102 data = powernow_data[first_cpu(cpu_core_map[cpu])];
1103
1104 if (!data)
1105 return -EINVAL;
1106
1102 set_cpus_allowed(current, cpumask_of_cpu(cpu)); 1107 set_cpus_allowed(current, cpumask_of_cpu(cpu));
1103 if (smp_processor_id() != cpu) { 1108 if (smp_processor_id() != cpu) {
1104 printk(KERN_ERR PFX "limiting to CPU %d failed in powernowk8_get\n", cpu); 1109 printk(KERN_ERR PFX "limiting to CPU %d failed in powernowk8_get\n", cpu);