From: jacob.shin@xxxxxxx Since cpufreq driver's affected CPUs data, cpufreq_policy->cpus, already knows about which cores are tied together, powernow driver does not have keep its internal data for every core. (even a pointer.. it will never be called on) Telling cpufreq driver about cpu_core_map at init time is sufficient. Signed-off-by: Jacob Shin <jacob.shin@xxxxxxx> Signed-off-by: Andi Kleen <ak@xxxxxxx> Cc: davej@xxxxxxxxxx --- --- arch/i386/kernel/cpu/cpufreq/powernow-k8.c | 15 +++------------ 1 files changed, 3 insertions(+), 12 deletions(-) Index: linux/arch/i386/kernel/cpu/cpufreq/powernow-k8.c =================================================================== --- linux.orig/arch/i386/kernel/cpu/cpufreq/powernow-k8.c +++ linux/arch/i386/kernel/cpu/cpufreq/powernow-k8.c @@ -45,7 +45,7 @@ #define PFX "powernow-k8: " #define BFX PFX "BIOS error: " -#define VERSION "version 1.60.0" +#define VERSION "version 1.60.1" #include "powernow-k8.h" /* serialize freq changes */ @@ -909,7 +909,6 @@ static int powernowk8_target(struct cpuf u32 checkvid = data->currvid; unsigned int newstate; int ret = -EIO; - int i; /* only run on specific CPU from here on */ oldmask = current->cpus_allowed; @@ -955,12 +954,6 @@ static int powernowk8_target(struct cpuf up(&fidvid_sem); goto err_out; } - - /* Update all the fid/vids of our siblings */ - for_each_cpu_mask(i, cpu_core_map[pol->cpu]) { - powernow_data[i]->currvid = data->currvid; - powernow_data[i]->currfid = data->currfid; - } up(&fidvid_sem); pol->cur = find_khz_freq_from_fid(data->currfid); @@ -984,7 +977,7 @@ static int __cpuinit powernowk8_cpu_init { struct powernow_k8_data *data; cpumask_t oldmask = CPU_MASK_ALL; - int rc, i; + int rc; if (!cpu_online(pol->cpu)) return -ENODEV; @@ -1070,9 +1063,7 @@ static int __cpuinit powernowk8_cpu_init printk("cpu_init done, current fid 0x%x, vid 0x%x\n", data->currfid, data->currvid); - for_each_cpu_mask(i, cpu_core_map[pol->cpu]) { - powernow_data[i] = data; - } + powernow_data[pol->cpu] = data; return 0; - : send the line "unsubscribe linux-x86_64" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html