]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[CPUFREQ] powernow-k8: Let cpufreq driver handle affected CPUs
authorDave Jones <davej@redhat.com>
Sun, 5 Mar 2006 08:35:00 +0000 (03:35 -0500)
committerDave Jones <davej@redhat.com>
Sun, 5 Mar 2006 08:35:00 +0000 (03:35 -0500)
powernow-k8: Let cpufreq driver handle affected CPUs

Let the cpufreq driver manage AMD Dual-Core CPUs being tied together.

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@amd.com>
Signed-off-by: Dave Jones <davej@redhat.com>
arch/i386/kernel/cpu/cpufreq/powernow-k8.c

index e85e90524df70de1bde8bcdc02e382d9338dd858..9a8ec03cde906d44d0a5f8f23a50f22c31942748 100644 (file)
@@ -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  */
@@ -908,7 +908,6 @@ static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsi
        u32 checkvid = data->currvid;
        unsigned int newstate;
        int ret = -EIO;
-       int i;
 
        /* only run on specific CPU from here on */
        oldmask = current->cpus_allowed;
@@ -954,12 +953,6 @@ static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsi
                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);
@@ -983,7 +976,7 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)
 {
        struct powernow_k8_data *data;
        cpumask_t oldmask = CPU_MASK_ALL;
-       int rc, i;
+       int rc;
 
        if (!cpu_online(pol->cpu))
                return -ENODEV;
@@ -1069,9 +1062,7 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)
        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;