aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLangsdorf, Mark <mark.langsdorf@amd.com>2006-06-08 11:30:17 -0400
committerDave Jones <davej@redhat.com>2006-06-20 01:46:04 -0400
commite7bdd7a531320eb4a4a8160afbe0c7cc98ac7187 (patch)
tree1b485fada2e6b00220019fdd46e391554bb4221f /arch
parent25f42b6af09e34c3f92107b36b5aa6edc2fdba2f (diff)
[CPUFREQ] Clarify powernow-k8 cpu_family statements
This patch clarifies the meaning of the cpu_family if statements in the hw pstate driver patch for powernow-k8 Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com> Signed-off-by: Dave Jones <davej@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/i386/kernel/cpu/cpufreq/powernow-k8.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
index b4277f58f40c..d8be4b01488d 100644
--- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
+++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
@@ -120,7 +120,7 @@ static int pending_bit_stuck(void)
120{ 120{
121 u32 lo, hi; 121 u32 lo, hi;
122 122
123 if (cpu_family) 123 if (cpu_family == CPU_HW_PSTATE)
124 return 0; 124 return 0;
125 125
126 rdmsr(MSR_FIDVID_STATUS, lo, hi); 126 rdmsr(MSR_FIDVID_STATUS, lo, hi);
@@ -136,7 +136,7 @@ static int query_current_values_with_pending_wait(struct powernow_k8_data *data)
136 u32 lo, hi; 136 u32 lo, hi;
137 u32 i = 0; 137 u32 i = 0;
138 138
139 if (cpu_family) { 139 if (cpu_family == CPU_HW_PSTATE) {
140 rdmsr(MSR_PSTATE_STATUS, lo, hi); 140 rdmsr(MSR_PSTATE_STATUS, lo, hi);
141 i = lo & HW_PSTATE_MASK; 141 i = lo & HW_PSTATE_MASK;
142 rdmsr(MSR_PSTATE_DEF_BASE + i, lo, hi); 142 rdmsr(MSR_PSTATE_DEF_BASE + i, lo, hi);
@@ -598,7 +598,7 @@ static void print_basics(struct powernow_k8_data *data)
598 int j; 598 int j;
599 for (j = 0; j < data->numps; j++) { 599 for (j = 0; j < data->numps; j++) {
600 if (data->powernow_table[j].frequency != CPUFREQ_ENTRY_INVALID) { 600 if (data->powernow_table[j].frequency != CPUFREQ_ENTRY_INVALID) {
601 if (cpu_family) { 601 if (cpu_family == CPU_HW_PSTATE) {
602 printk(KERN_INFO PFX " %d : fid 0x%x gid 0x%x (%d MHz)\n", j, (data->powernow_table[j].index & 0xff00) >> 8, 602 printk(KERN_INFO PFX " %d : fid 0x%x gid 0x%x (%d MHz)\n", j, (data->powernow_table[j].index & 0xff00) >> 8,
603 (data->powernow_table[j].index & 0xff0000) >> 16, 603 (data->powernow_table[j].index & 0xff0000) >> 16,
604 data->powernow_table[j].frequency/1000); 604 data->powernow_table[j].frequency/1000);
@@ -758,7 +758,7 @@ static int find_psb_table(struct powernow_k8_data *data)
758#ifdef CONFIG_X86_POWERNOW_K8_ACPI 758#ifdef CONFIG_X86_POWERNOW_K8_ACPI
759static void powernow_k8_acpi_pst_values(struct powernow_k8_data *data, unsigned int index) 759static void powernow_k8_acpi_pst_values(struct powernow_k8_data *data, unsigned int index)
760{ 760{
761 if (!data->acpi_data.state_count || cpu_family) 761 if (!data->acpi_data.state_count || (cpu_family == CPU_HW_PSTATE))
762 return; 762 return;
763 763
764 data->irt = (data->acpi_data.states[index].control >> IRT_SHIFT) & IRT_MASK; 764 data->irt = (data->acpi_data.states[index].control >> IRT_SHIFT) & IRT_MASK;
@@ -801,7 +801,7 @@ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data)
801 goto err_out; 801 goto err_out;
802 } 802 }
803 803
804 if (cpu_family) 804 if (cpu_family == CPU_HW_PSTATE)
805 ret_val = fill_powernow_table_pstate(data, powernow_table); 805 ret_val = fill_powernow_table_pstate(data, powernow_table);
806 else 806 else
807 ret_val = fill_powernow_table_fidvid(data, powernow_table); 807 ret_val = fill_powernow_table_fidvid(data, powernow_table);
@@ -1082,7 +1082,7 @@ static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsi
1082 if (query_current_values_with_pending_wait(data)) 1082 if (query_current_values_with_pending_wait(data))
1083 goto err_out; 1083 goto err_out;
1084 1084
1085 if (cpu_family) 1085 if (cpu_family == CPU_HW_PSTATE)
1086 dprintk("targ: curr fid 0x%x, did 0x%x\n", 1086 dprintk("targ: curr fid 0x%x, did 0x%x\n",
1087 data->currfid, data->currvid); 1087 data->currfid, data->currvid);
1088 else { 1088 else {
@@ -1103,7 +1103,7 @@ static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsi
1103 1103
1104 powernow_k8_acpi_pst_values(data, newstate); 1104 powernow_k8_acpi_pst_values(data, newstate);
1105 1105
1106 if (cpu_family) 1106 if (cpu_family == CPU_HW_PSTATE)
1107 ret = transition_frequency_pstate(data, newstate); 1107 ret = transition_frequency_pstate(data, newstate);
1108 else 1108 else
1109 ret = transition_frequency_fidvid(data, newstate); 1109 ret = transition_frequency_fidvid(data, newstate);
@@ -1115,7 +1115,7 @@ static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsi
1115 } 1115 }
1116 mutex_unlock(&fidvid_mutex); 1116 mutex_unlock(&fidvid_mutex);
1117 1117
1118 if (cpu_family) 1118 if (cpu_family == CPU_HW_PSTATE)
1119 pol->cur = find_khz_freq_from_fiddid(data->currfid, data->currdid); 1119 pol->cur = find_khz_freq_from_fiddid(data->currfid, data->currdid);
1120 else 1120 else
1121 pol->cur = find_khz_freq_from_fid(data->currfid); 1121 pol->cur = find_khz_freq_from_fid(data->currfid);
@@ -1197,14 +1197,14 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)
1197 if (query_current_values_with_pending_wait(data)) 1197 if (query_current_values_with_pending_wait(data))
1198 goto err_out; 1198 goto err_out;
1199 1199
1200 if (!cpu_family) 1200 if (cpu_family == CPU_OPTERON)
1201 fidvid_msr_init(); 1201 fidvid_msr_init();
1202 1202
1203 /* run on any CPU again */ 1203 /* run on any CPU again */
1204 set_cpus_allowed(current, oldmask); 1204 set_cpus_allowed(current, oldmask);
1205 1205
1206 pol->governor = CPUFREQ_DEFAULT_GOVERNOR; 1206 pol->governor = CPUFREQ_DEFAULT_GOVERNOR;
1207 if (cpu_family) 1207 if (cpu_family == CPU_HW_PSTATE)
1208 pol->cpus = cpumask_of_cpu(pol->cpu); 1208 pol->cpus = cpumask_of_cpu(pol->cpu);
1209 else 1209 else
1210 pol->cpus = cpu_core_map[pol->cpu]; 1210 pol->cpus = cpu_core_map[pol->cpu];
@@ -1215,7 +1215,7 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)
1215 pol->cpuinfo.transition_latency = (((data->rvo + 8) * data->vstable * VST_UNITS_20US) 1215 pol->cpuinfo.transition_latency = (((data->rvo + 8) * data->vstable * VST_UNITS_20US)
1216 + (3 * (1 << data->irt) * 10)) * 1000; 1216 + (3 * (1 << data->irt) * 10)) * 1000;
1217 1217
1218 if (cpu_family) 1218 if (cpu_family == CPU_HW_PSTATE)
1219 pol->cur = find_khz_freq_from_fiddid(data->currfid, data->currdid); 1219 pol->cur = find_khz_freq_from_fiddid(data->currfid, data->currdid);
1220 else 1220 else
1221 pol->cur = find_khz_freq_from_fid(data->currfid); 1221 pol->cur = find_khz_freq_from_fid(data->currfid);
@@ -1232,7 +1232,7 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)
1232 1232
1233 cpufreq_frequency_table_get_attr(data->powernow_table, pol->cpu); 1233 cpufreq_frequency_table_get_attr(data->powernow_table, pol->cpu);
1234 1234
1235 if (cpu_family) 1235 if (cpu_family == CPU_HW_PSTATE)
1236 dprintk("cpu_init done, current fid 0x%x, did 0x%x\n", 1236 dprintk("cpu_init done, current fid 0x%x, did 0x%x\n",
1237 data->currfid, data->currdid); 1237 data->currfid, data->currdid);
1238 else 1238 else