diff options
author | Dave Jones <davej@redhat.com> | 2006-03-05 03:35:00 -0500 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2006-03-05 03:35:00 -0500 |
commit | 2a1c1c877ecb446dbdf1715248e151db8719a87b (patch) | |
tree | d265e90cdbcbfc9b76a1c183a03688eddb5d0e6f /arch | |
parent | 32ee8c3e470d86588b51dc42ed01e85c5fa0f180 (diff) |
[CPUFREQ] powernow-k8: Let cpufreq driver handle affected CPUs
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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/i386/kernel/cpu/cpufreq/powernow-k8.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c index e85e90524df7..9a8ec03cde90 100644 --- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c +++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c | |||
@@ -45,7 +45,7 @@ | |||
45 | 45 | ||
46 | #define PFX "powernow-k8: " | 46 | #define PFX "powernow-k8: " |
47 | #define BFX PFX "BIOS error: " | 47 | #define BFX PFX "BIOS error: " |
48 | #define VERSION "version 1.60.0" | 48 | #define VERSION "version 1.60.1" |
49 | #include "powernow-k8.h" | 49 | #include "powernow-k8.h" |
50 | 50 | ||
51 | /* serialize freq changes */ | 51 | /* serialize freq changes */ |
@@ -908,7 +908,6 @@ static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsi | |||
908 | u32 checkvid = data->currvid; | 908 | u32 checkvid = data->currvid; |
909 | unsigned int newstate; | 909 | unsigned int newstate; |
910 | int ret = -EIO; | 910 | int ret = -EIO; |
911 | int i; | ||
912 | 911 | ||
913 | /* only run on specific CPU from here on */ | 912 | /* only run on specific CPU from here on */ |
914 | oldmask = current->cpus_allowed; | 913 | oldmask = current->cpus_allowed; |
@@ -954,12 +953,6 @@ static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsi | |||
954 | up(&fidvid_sem); | 953 | up(&fidvid_sem); |
955 | goto err_out; | 954 | goto err_out; |
956 | } | 955 | } |
957 | |||
958 | /* Update all the fid/vids of our siblings */ | ||
959 | for_each_cpu_mask(i, cpu_core_map[pol->cpu]) { | ||
960 | powernow_data[i]->currvid = data->currvid; | ||
961 | powernow_data[i]->currfid = data->currfid; | ||
962 | } | ||
963 | up(&fidvid_sem); | 956 | up(&fidvid_sem); |
964 | 957 | ||
965 | pol->cur = find_khz_freq_from_fid(data->currfid); | 958 | pol->cur = find_khz_freq_from_fid(data->currfid); |
@@ -983,7 +976,7 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol) | |||
983 | { | 976 | { |
984 | struct powernow_k8_data *data; | 977 | struct powernow_k8_data *data; |
985 | cpumask_t oldmask = CPU_MASK_ALL; | 978 | cpumask_t oldmask = CPU_MASK_ALL; |
986 | int rc, i; | 979 | int rc; |
987 | 980 | ||
988 | if (!cpu_online(pol->cpu)) | 981 | if (!cpu_online(pol->cpu)) |
989 | return -ENODEV; | 982 | return -ENODEV; |
@@ -1069,9 +1062,7 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol) | |||
1069 | printk("cpu_init done, current fid 0x%x, vid 0x%x\n", | 1062 | printk("cpu_init done, current fid 0x%x, vid 0x%x\n", |
1070 | data->currfid, data->currvid); | 1063 | data->currfid, data->currvid); |
1071 | 1064 | ||
1072 | for_each_cpu_mask(i, cpu_core_map[pol->cpu]) { | 1065 | powernow_data[pol->cpu] = data; |
1073 | powernow_data[i] = data; | ||
1074 | } | ||
1075 | 1066 | ||
1076 | return 0; | 1067 | return 0; |
1077 | 1068 | ||