diff options
author | Joe Perches <joe@perches.com> | 2016-04-05 16:28:24 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-04-08 19:35:18 -0400 |
commit | b49c22a6ca3656c68506fea57caf3d8f08878570 (patch) | |
tree | 2ae2b9a0457cd8bc27aedcbfcaa73fd03c4d24d4 | |
parent | 4836df173aaed4b93e4d4b5c51e40f12e53ea26f (diff) |
cpufreq: Convert printk(KERN_<LEVEL> to pr_<level>
Use the more common logging style.
Miscellanea:
o Coalesce formats
o Realign arguments
o Add a missing space between a coalesced format
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
25 files changed, 199 insertions, 265 deletions
diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c index 7f38fb55f223..ed9e93df7ecf 100644 --- a/drivers/cpufreq/acpi-cpufreq.c +++ b/drivers/cpufreq/acpi-cpufreq.c | |||
@@ -648,10 +648,7 @@ static int acpi_cpufreq_blacklist(struct cpuinfo_x86 *c) | |||
648 | if ((c->x86 == 15) && | 648 | if ((c->x86 == 15) && |
649 | (c->x86_model == 6) && | 649 | (c->x86_model == 6) && |
650 | (c->x86_mask == 8)) { | 650 | (c->x86_mask == 8)) { |
651 | printk(KERN_INFO "acpi-cpufreq: Intel(R) " | 651 | pr_info("acpi-cpufreq: Intel(R) Xeon(R) 7100 Errata AL30, processors may lock up on frequency changes: disabling acpi-cpufreq\n"); |
652 | "Xeon(R) 7100 Errata AL30, processors may " | ||
653 | "lock up on frequency changes: disabling " | ||
654 | "acpi-cpufreq.\n"); | ||
655 | return -ENODEV; | 652 | return -ENODEV; |
656 | } | 653 | } |
657 | } | 654 | } |
@@ -799,8 +796,7 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
799 | if (perf->control_register.space_id == ACPI_ADR_SPACE_FIXED_HARDWARE && | 796 | if (perf->control_register.space_id == ACPI_ADR_SPACE_FIXED_HARDWARE && |
800 | policy->cpuinfo.transition_latency > 20 * 1000) { | 797 | policy->cpuinfo.transition_latency > 20 * 1000) { |
801 | policy->cpuinfo.transition_latency = 20 * 1000; | 798 | policy->cpuinfo.transition_latency = 20 * 1000; |
802 | printk_once(KERN_INFO | 799 | pr_info_once("P-state transition latency capped at 20 uS\n"); |
803 | "P-state transition latency capped at 20 uS\n"); | ||
804 | } | 800 | } |
805 | 801 | ||
806 | /* table init */ | 802 | /* table init */ |
@@ -822,7 +818,7 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
822 | goto err_freqfree; | 818 | goto err_freqfree; |
823 | 819 | ||
824 | if (perf->states[0].core_frequency * 1000 != policy->cpuinfo.max_freq) | 820 | if (perf->states[0].core_frequency * 1000 != policy->cpuinfo.max_freq) |
825 | printk(KERN_WARNING FW_WARN "P-state 0 is not max freq\n"); | 821 | pr_warn(FW_WARN "P-state 0 is not max freq\n"); |
826 | 822 | ||
827 | switch (perf->control_register.space_id) { | 823 | switch (perf->control_register.space_id) { |
828 | case ACPI_ADR_SPACE_SYSTEM_IO: | 824 | case ACPI_ADR_SPACE_SYSTEM_IO: |
diff --git a/drivers/cpufreq/cpufreq-nforce2.c b/drivers/cpufreq/cpufreq-nforce2.c index db69eeb501a7..7da96d536ac9 100644 --- a/drivers/cpufreq/cpufreq-nforce2.c +++ b/drivers/cpufreq/cpufreq-nforce2.c | |||
@@ -174,13 +174,13 @@ static int nforce2_set_fsb(unsigned int fsb) | |||
174 | int pll = 0; | 174 | int pll = 0; |
175 | 175 | ||
176 | if ((fsb > max_fsb) || (fsb < NFORCE2_MIN_FSB)) { | 176 | if ((fsb > max_fsb) || (fsb < NFORCE2_MIN_FSB)) { |
177 | printk(KERN_ERR PFX "FSB %d is out of range!\n", fsb); | 177 | pr_err(PFX "FSB %d is out of range!\n", fsb); |
178 | return -EINVAL; | 178 | return -EINVAL; |
179 | } | 179 | } |
180 | 180 | ||
181 | tfsb = nforce2_fsb_read(0); | 181 | tfsb = nforce2_fsb_read(0); |
182 | if (!tfsb) { | 182 | if (!tfsb) { |
183 | printk(KERN_ERR PFX "Error while reading the FSB\n"); | 183 | pr_err(PFX "Error while reading the FSB\n"); |
184 | return -EINVAL; | 184 | return -EINVAL; |
185 | } | 185 | } |
186 | 186 | ||
@@ -276,8 +276,7 @@ static int nforce2_target(struct cpufreq_policy *policy, | |||
276 | /* local_irq_save(flags); */ | 276 | /* local_irq_save(flags); */ |
277 | 277 | ||
278 | if (nforce2_set_fsb(target_fsb) < 0) | 278 | if (nforce2_set_fsb(target_fsb) < 0) |
279 | printk(KERN_ERR PFX "Changing FSB to %d failed\n", | 279 | pr_err(PFX "Changing FSB to %d failed\n", target_fsb); |
280 | target_fsb); | ||
281 | else | 280 | else |
282 | pr_debug("Changed FSB successfully to %d\n", | 281 | pr_debug("Changed FSB successfully to %d\n", |
283 | target_fsb); | 282 | target_fsb); |
@@ -325,8 +324,7 @@ static int nforce2_cpu_init(struct cpufreq_policy *policy) | |||
325 | /* FIX: Get FID from CPU */ | 324 | /* FIX: Get FID from CPU */ |
326 | if (!fid) { | 325 | if (!fid) { |
327 | if (!cpu_khz) { | 326 | if (!cpu_khz) { |
328 | printk(KERN_WARNING PFX | 327 | pr_warn(PFX "cpu_khz not set, can't calculate multiplier!\n"); |
329 | "cpu_khz not set, can't calculate multiplier!\n"); | ||
330 | return -ENODEV; | 328 | return -ENODEV; |
331 | } | 329 | } |
332 | 330 | ||
@@ -341,8 +339,8 @@ static int nforce2_cpu_init(struct cpufreq_policy *policy) | |||
341 | } | 339 | } |
342 | } | 340 | } |
343 | 341 | ||
344 | printk(KERN_INFO PFX "FSB currently at %i MHz, FID %d.%d\n", fsb, | 342 | pr_info(PFX "FSB currently at %i MHz, FID %d.%d\n", |
345 | fid / 10, fid % 10); | 343 | fsb, fid / 10, fid % 10); |
346 | 344 | ||
347 | /* Set maximum FSB to FSB at boot time */ | 345 | /* Set maximum FSB to FSB at boot time */ |
348 | max_fsb = nforce2_fsb_read(1); | 346 | max_fsb = nforce2_fsb_read(1); |
@@ -401,11 +399,9 @@ static int nforce2_detect_chipset(void) | |||
401 | if (nforce2_dev == NULL) | 399 | if (nforce2_dev == NULL) |
402 | return -ENODEV; | 400 | return -ENODEV; |
403 | 401 | ||
404 | printk(KERN_INFO PFX "Detected nForce2 chipset revision %X\n", | 402 | pr_info(PFX "Detected nForce2 chipset revision %X\n", |
405 | nforce2_dev->revision); | 403 | nforce2_dev->revision); |
406 | printk(KERN_INFO PFX | 404 | pr_info(PFX "FSB changing is maybe unstable and can lead to crashes and data loss\n"); |
407 | "FSB changing is maybe unstable and can lead to " | ||
408 | "crashes and data loss.\n"); | ||
409 | 405 | ||
410 | return 0; | 406 | return 0; |
411 | } | 407 | } |
@@ -423,7 +419,7 @@ static int __init nforce2_init(void) | |||
423 | 419 | ||
424 | /* detect chipset */ | 420 | /* detect chipset */ |
425 | if (nforce2_detect_chipset()) { | 421 | if (nforce2_detect_chipset()) { |
426 | printk(KERN_INFO PFX "No nForce2 chipset.\n"); | 422 | pr_info(PFX "No nForce2 chipset\n"); |
427 | return -ENODEV; | 423 | return -ENODEV; |
428 | } | 424 | } |
429 | 425 | ||
diff --git a/drivers/cpufreq/e_powersaver.c b/drivers/cpufreq/e_powersaver.c index 4085244c8a67..c420f0cb46a7 100644 --- a/drivers/cpufreq/e_powersaver.c +++ b/drivers/cpufreq/e_powersaver.c | |||
@@ -141,11 +141,9 @@ static int eps_set_state(struct eps_cpu_data *centaur, | |||
141 | /* Print voltage and multiplier */ | 141 | /* Print voltage and multiplier */ |
142 | rdmsr(MSR_IA32_PERF_STATUS, lo, hi); | 142 | rdmsr(MSR_IA32_PERF_STATUS, lo, hi); |
143 | current_voltage = lo & 0xff; | 143 | current_voltage = lo & 0xff; |
144 | printk(KERN_INFO "eps: Current voltage = %dmV\n", | 144 | pr_info("eps: Current voltage = %dmV\n", current_voltage * 16 + 700); |
145 | current_voltage * 16 + 700); | ||
146 | current_multiplier = (lo >> 8) & 0xff; | 145 | current_multiplier = (lo >> 8) & 0xff; |
147 | printk(KERN_INFO "eps: Current multiplier = %d\n", | 146 | pr_info("eps: Current multiplier = %d\n", current_multiplier); |
148 | current_multiplier); | ||
149 | } | 147 | } |
150 | #endif | 148 | #endif |
151 | return 0; | 149 | return 0; |
@@ -166,7 +164,7 @@ static int eps_target(struct cpufreq_policy *policy, unsigned int index) | |||
166 | dest_state = centaur->freq_table[index].driver_data & 0xffff; | 164 | dest_state = centaur->freq_table[index].driver_data & 0xffff; |
167 | ret = eps_set_state(centaur, policy, dest_state); | 165 | ret = eps_set_state(centaur, policy, dest_state); |
168 | if (ret) | 166 | if (ret) |
169 | printk(KERN_ERR "eps: Timeout!\n"); | 167 | pr_err("eps: Timeout!\n"); |
170 | return ret; | 168 | return ret; |
171 | } | 169 | } |
172 | 170 | ||
@@ -194,36 +192,36 @@ static int eps_cpu_init(struct cpufreq_policy *policy) | |||
194 | return -ENODEV; | 192 | return -ENODEV; |
195 | 193 | ||
196 | /* Check brand */ | 194 | /* Check brand */ |
197 | printk(KERN_INFO "eps: Detected VIA "); | 195 | pr_info("eps: Detected VIA "); |
198 | 196 | ||
199 | switch (c->x86_model) { | 197 | switch (c->x86_model) { |
200 | case 10: | 198 | case 10: |
201 | rdmsr(0x1153, lo, hi); | 199 | rdmsr(0x1153, lo, hi); |
202 | brand = (((lo >> 2) ^ lo) >> 18) & 3; | 200 | brand = (((lo >> 2) ^ lo) >> 18) & 3; |
203 | printk(KERN_CONT "Model A "); | 201 | pr_cont("Model A "); |
204 | break; | 202 | break; |
205 | case 13: | 203 | case 13: |
206 | rdmsr(0x1154, lo, hi); | 204 | rdmsr(0x1154, lo, hi); |
207 | brand = (((lo >> 4) ^ (lo >> 2))) & 0x000000ff; | 205 | brand = (((lo >> 4) ^ (lo >> 2))) & 0x000000ff; |
208 | printk(KERN_CONT "Model D "); | 206 | pr_cont("Model D "); |
209 | break; | 207 | break; |
210 | } | 208 | } |
211 | 209 | ||
212 | switch (brand) { | 210 | switch (brand) { |
213 | case EPS_BRAND_C7M: | 211 | case EPS_BRAND_C7M: |
214 | printk(KERN_CONT "C7-M\n"); | 212 | pr_cont("C7-M\n"); |
215 | break; | 213 | break; |
216 | case EPS_BRAND_C7: | 214 | case EPS_BRAND_C7: |
217 | printk(KERN_CONT "C7\n"); | 215 | pr_cont("C7\n"); |
218 | break; | 216 | break; |
219 | case EPS_BRAND_EDEN: | 217 | case EPS_BRAND_EDEN: |
220 | printk(KERN_CONT "Eden\n"); | 218 | pr_cont("Eden\n"); |
221 | break; | 219 | break; |
222 | case EPS_BRAND_C7D: | 220 | case EPS_BRAND_C7D: |
223 | printk(KERN_CONT "C7-D\n"); | 221 | pr_cont("C7-D\n"); |
224 | break; | 222 | break; |
225 | case EPS_BRAND_C3: | 223 | case EPS_BRAND_C3: |
226 | printk(KERN_CONT "C3\n"); | 224 | pr_cont("C3\n"); |
227 | return -ENODEV; | 225 | return -ENODEV; |
228 | break; | 226 | break; |
229 | } | 227 | } |
@@ -235,7 +233,7 @@ static int eps_cpu_init(struct cpufreq_policy *policy) | |||
235 | /* Can be locked at 0 */ | 233 | /* Can be locked at 0 */ |
236 | rdmsrl(MSR_IA32_MISC_ENABLE, val); | 234 | rdmsrl(MSR_IA32_MISC_ENABLE, val); |
237 | if (!(val & MSR_IA32_MISC_ENABLE_ENHANCED_SPEEDSTEP)) { | 235 | if (!(val & MSR_IA32_MISC_ENABLE_ENHANCED_SPEEDSTEP)) { |
238 | printk(KERN_INFO "eps: Can't enable Enhanced PowerSaver\n"); | 236 | pr_info("eps: Can't enable Enhanced PowerSaver\n"); |
239 | return -ENODEV; | 237 | return -ENODEV; |
240 | } | 238 | } |
241 | } | 239 | } |
@@ -243,22 +241,19 @@ static int eps_cpu_init(struct cpufreq_policy *policy) | |||
243 | /* Print voltage and multiplier */ | 241 | /* Print voltage and multiplier */ |
244 | rdmsr(MSR_IA32_PERF_STATUS, lo, hi); | 242 | rdmsr(MSR_IA32_PERF_STATUS, lo, hi); |
245 | current_voltage = lo & 0xff; | 243 | current_voltage = lo & 0xff; |
246 | printk(KERN_INFO "eps: Current voltage = %dmV\n", | 244 | pr_info("eps: Current voltage = %dmV\n", current_voltage * 16 + 700); |
247 | current_voltage * 16 + 700); | ||
248 | current_multiplier = (lo >> 8) & 0xff; | 245 | current_multiplier = (lo >> 8) & 0xff; |
249 | printk(KERN_INFO "eps: Current multiplier = %d\n", current_multiplier); | 246 | pr_info("eps: Current multiplier = %d\n", current_multiplier); |
250 | 247 | ||
251 | /* Print limits */ | 248 | /* Print limits */ |
252 | max_voltage = hi & 0xff; | 249 | max_voltage = hi & 0xff; |
253 | printk(KERN_INFO "eps: Highest voltage = %dmV\n", | 250 | pr_info("eps: Highest voltage = %dmV\n", max_voltage * 16 + 700); |
254 | max_voltage * 16 + 700); | ||
255 | max_multiplier = (hi >> 8) & 0xff; | 251 | max_multiplier = (hi >> 8) & 0xff; |
256 | printk(KERN_INFO "eps: Highest multiplier = %d\n", max_multiplier); | 252 | pr_info("eps: Highest multiplier = %d\n", max_multiplier); |
257 | min_voltage = (hi >> 16) & 0xff; | 253 | min_voltage = (hi >> 16) & 0xff; |
258 | printk(KERN_INFO "eps: Lowest voltage = %dmV\n", | 254 | pr_info("eps: Lowest voltage = %dmV\n", min_voltage * 16 + 700); |
259 | min_voltage * 16 + 700); | ||
260 | min_multiplier = (hi >> 24) & 0xff; | 255 | min_multiplier = (hi >> 24) & 0xff; |
261 | printk(KERN_INFO "eps: Lowest multiplier = %d\n", min_multiplier); | 256 | pr_info("eps: Lowest multiplier = %d\n", min_multiplier); |
262 | 257 | ||
263 | /* Sanity checks */ | 258 | /* Sanity checks */ |
264 | if (current_multiplier == 0 || max_multiplier == 0 | 259 | if (current_multiplier == 0 || max_multiplier == 0 |
@@ -276,17 +271,13 @@ static int eps_cpu_init(struct cpufreq_policy *policy) | |||
276 | 271 | ||
277 | /* Check for systems using underclocked CPU */ | 272 | /* Check for systems using underclocked CPU */ |
278 | if (!freq_failsafe_off && max_multiplier != current_multiplier) { | 273 | if (!freq_failsafe_off && max_multiplier != current_multiplier) { |
279 | printk(KERN_INFO "eps: Your processor is running at different " | 274 | pr_info("eps: Your processor is running at different frequency then its maximum. Aborting.\n"); |
280 | "frequency then its maximum. Aborting.\n"); | 275 | pr_info("eps: You can use freq_failsafe_off option to disable this check.\n"); |
281 | printk(KERN_INFO "eps: You can use freq_failsafe_off option " | ||
282 | "to disable this check.\n"); | ||
283 | return -EINVAL; | 276 | return -EINVAL; |
284 | } | 277 | } |
285 | if (!voltage_failsafe_off && max_voltage != current_voltage) { | 278 | if (!voltage_failsafe_off && max_voltage != current_voltage) { |
286 | printk(KERN_INFO "eps: Your processor is running at different " | 279 | pr_info("eps: Your processor is running at different voltage then its maximum. Aborting.\n"); |
287 | "voltage then its maximum. Aborting.\n"); | 280 | pr_info("eps: You can use voltage_failsafe_off option to disable this check.\n"); |
288 | printk(KERN_INFO "eps: You can use voltage_failsafe_off " | ||
289 | "option to disable this check.\n"); | ||
290 | return -EINVAL; | 281 | return -EINVAL; |
291 | } | 282 | } |
292 | 283 | ||
@@ -297,13 +288,13 @@ static int eps_cpu_init(struct cpufreq_policy *policy) | |||
297 | /* Check for ACPI processor speed limit */ | 288 | /* Check for ACPI processor speed limit */ |
298 | if (!ignore_acpi_limit && !eps_acpi_init()) { | 289 | if (!ignore_acpi_limit && !eps_acpi_init()) { |
299 | if (!acpi_processor_get_bios_limit(policy->cpu, &limit)) { | 290 | if (!acpi_processor_get_bios_limit(policy->cpu, &limit)) { |
300 | printk(KERN_INFO "eps: ACPI limit %u.%uGHz\n", | 291 | pr_info("eps: ACPI limit %u.%uGHz\n", |
301 | limit/1000000, | 292 | limit/1000000, |
302 | (limit%1000000)/10000); | 293 | (limit%1000000)/10000); |
303 | eps_acpi_exit(policy); | 294 | eps_acpi_exit(policy); |
304 | /* Check if max_multiplier is in BIOS limits */ | 295 | /* Check if max_multiplier is in BIOS limits */ |
305 | if (limit && max_multiplier * fsb > limit) { | 296 | if (limit && max_multiplier * fsb > limit) { |
306 | printk(KERN_INFO "eps: Aborting.\n"); | 297 | pr_info("eps: Aborting\n"); |
307 | return -EINVAL; | 298 | return -EINVAL; |
308 | } | 299 | } |
309 | } | 300 | } |
@@ -319,8 +310,7 @@ static int eps_cpu_init(struct cpufreq_policy *policy) | |||
319 | v = (set_max_voltage - 700) / 16; | 310 | v = (set_max_voltage - 700) / 16; |
320 | /* Check if voltage is within limits */ | 311 | /* Check if voltage is within limits */ |
321 | if (v >= min_voltage && v <= max_voltage) { | 312 | if (v >= min_voltage && v <= max_voltage) { |
322 | printk(KERN_INFO "eps: Setting %dmV as maximum.\n", | 313 | pr_info("eps: Setting %dmV as maximum\n", v * 16 + 700); |
323 | v * 16 + 700); | ||
324 | max_voltage = v; | 314 | max_voltage = v; |
325 | } | 315 | } |
326 | } | 316 | } |
diff --git a/drivers/cpufreq/elanfreq.c b/drivers/cpufreq/elanfreq.c index 1c06e786c9ba..8f4dded3016f 100644 --- a/drivers/cpufreq/elanfreq.c +++ b/drivers/cpufreq/elanfreq.c | |||
@@ -185,7 +185,7 @@ static int elanfreq_cpu_init(struct cpufreq_policy *policy) | |||
185 | static int __init elanfreq_setup(char *str) | 185 | static int __init elanfreq_setup(char *str) |
186 | { | 186 | { |
187 | max_freq = simple_strtoul(str, &str, 0); | 187 | max_freq = simple_strtoul(str, &str, 0); |
188 | printk(KERN_WARNING "You're using the deprecated elanfreq command line option. Use elanfreq.max_freq instead, please!\n"); | 188 | pr_warn("You're using the deprecated elanfreq command line option. Use elanfreq.max_freq instead, please!\n"); |
189 | return 1; | 189 | return 1; |
190 | } | 190 | } |
191 | __setup("elanfreq=", elanfreq_setup); | 191 | __setup("elanfreq=", elanfreq_setup); |
diff --git a/drivers/cpufreq/ia64-acpi-cpufreq.c b/drivers/cpufreq/ia64-acpi-cpufreq.c index 0202429f1c5b..fd36d6cd3787 100644 --- a/drivers/cpufreq/ia64-acpi-cpufreq.c +++ b/drivers/cpufreq/ia64-acpi-cpufreq.c | |||
@@ -118,8 +118,7 @@ processor_get_freq ( | |||
118 | 118 | ||
119 | if (ret) { | 119 | if (ret) { |
120 | set_cpus_allowed_ptr(current, &saved_mask); | 120 | set_cpus_allowed_ptr(current, &saved_mask); |
121 | printk(KERN_WARNING "get performance failed with error %d\n", | 121 | pr_warn("get performance failed with error %d\n", ret); |
122 | ret); | ||
123 | ret = 0; | 122 | ret = 0; |
124 | goto migrate_end; | 123 | goto migrate_end; |
125 | } | 124 | } |
@@ -177,7 +176,7 @@ processor_set_freq ( | |||
177 | 176 | ||
178 | ret = processor_set_pstate(value); | 177 | ret = processor_set_pstate(value); |
179 | if (ret) { | 178 | if (ret) { |
180 | printk(KERN_WARNING "Transition failed with error %d\n", ret); | 179 | pr_warn("Transition failed with error %d\n", ret); |
181 | retval = -ENODEV; | 180 | retval = -ENODEV; |
182 | goto migrate_end; | 181 | goto migrate_end; |
183 | } | 182 | } |
@@ -291,8 +290,8 @@ acpi_cpufreq_cpu_init ( | |||
291 | /* notify BIOS that we exist */ | 290 | /* notify BIOS that we exist */ |
292 | acpi_processor_notify_smm(THIS_MODULE); | 291 | acpi_processor_notify_smm(THIS_MODULE); |
293 | 292 | ||
294 | printk(KERN_INFO "acpi-cpufreq: CPU%u - ACPI performance management " | 293 | pr_info("acpi-cpufreq: CPU%u - ACPI performance management activated\n", |
295 | "activated.\n", cpu); | 294 | cpu); |
296 | 295 | ||
297 | for (i = 0; i < data->acpi_data.state_count; i++) | 296 | for (i = 0; i < data->acpi_data.state_count; i++) |
298 | pr_debug(" %cP%d: %d MHz, %d mW, %d uS, %d uS, 0x%x 0x%x\n", | 297 | pr_debug(" %cP%d: %d MHz, %d mW, %d uS, %d uS, 0x%x 0x%x\n", |
diff --git a/drivers/cpufreq/longhaul.c b/drivers/cpufreq/longhaul.c index 0f6b229afcb9..2baeb8c01474 100644 --- a/drivers/cpufreq/longhaul.c +++ b/drivers/cpufreq/longhaul.c | |||
@@ -347,14 +347,13 @@ retry_loop: | |||
347 | freqs.new = calc_speed(longhaul_get_cpu_mult()); | 347 | freqs.new = calc_speed(longhaul_get_cpu_mult()); |
348 | /* Check if requested frequency is set. */ | 348 | /* Check if requested frequency is set. */ |
349 | if (unlikely(freqs.new != speed)) { | 349 | if (unlikely(freqs.new != speed)) { |
350 | printk(KERN_INFO PFX "Failed to set requested frequency!\n"); | 350 | pr_info(PFX "Failed to set requested frequency!\n"); |
351 | /* Revision ID = 1 but processor is expecting revision key | 351 | /* Revision ID = 1 but processor is expecting revision key |
352 | * equal to 0. Jumpers at the bottom of processor will change | 352 | * equal to 0. Jumpers at the bottom of processor will change |
353 | * multiplier and FSB, but will not change bits in Longhaul | 353 | * multiplier and FSB, but will not change bits in Longhaul |
354 | * MSR nor enable voltage scaling. */ | 354 | * MSR nor enable voltage scaling. */ |
355 | if (!revid_errata) { | 355 | if (!revid_errata) { |
356 | printk(KERN_INFO PFX "Enabling \"Ignore Revision ID\" " | 356 | pr_info(PFX "Enabling \"Ignore Revision ID\" option\n"); |
357 | "option.\n"); | ||
358 | revid_errata = 1; | 357 | revid_errata = 1; |
359 | msleep(200); | 358 | msleep(200); |
360 | goto retry_loop; | 359 | goto retry_loop; |
@@ -364,11 +363,10 @@ retry_loop: | |||
364 | * but it doesn't change frequency. I tried poking various | 363 | * but it doesn't change frequency. I tried poking various |
365 | * bits in northbridge registers, but without success. */ | 364 | * bits in northbridge registers, but without success. */ |
366 | if (longhaul_flags & USE_ACPI_C3) { | 365 | if (longhaul_flags & USE_ACPI_C3) { |
367 | printk(KERN_INFO PFX "Disabling ACPI C3 support.\n"); | 366 | pr_info(PFX "Disabling ACPI C3 support\n"); |
368 | longhaul_flags &= ~USE_ACPI_C3; | 367 | longhaul_flags &= ~USE_ACPI_C3; |
369 | if (revid_errata) { | 368 | if (revid_errata) { |
370 | printk(KERN_INFO PFX "Disabling \"Ignore " | 369 | pr_info(PFX "Disabling \"Ignore Revision ID\" option\n"); |
371 | "Revision ID\" option.\n"); | ||
372 | revid_errata = 0; | 370 | revid_errata = 0; |
373 | } | 371 | } |
374 | msleep(200); | 372 | msleep(200); |
@@ -379,7 +377,7 @@ retry_loop: | |||
379 | * RevID = 1. RevID errata will make things right. Just | 377 | * RevID = 1. RevID errata will make things right. Just |
380 | * to be 100% sure. */ | 378 | * to be 100% sure. */ |
381 | if (longhaul_version == TYPE_LONGHAUL_V2) { | 379 | if (longhaul_version == TYPE_LONGHAUL_V2) { |
382 | printk(KERN_INFO PFX "Switching to Longhaul ver. 1\n"); | 380 | pr_info(PFX "Switching to Longhaul ver. 1\n"); |
383 | longhaul_version = TYPE_LONGHAUL_V1; | 381 | longhaul_version = TYPE_LONGHAUL_V1; |
384 | msleep(200); | 382 | msleep(200); |
385 | goto retry_loop; | 383 | goto retry_loop; |
@@ -387,8 +385,7 @@ retry_loop: | |||
387 | } | 385 | } |
388 | 386 | ||
389 | if (!bm_timeout) { | 387 | if (!bm_timeout) { |
390 | printk(KERN_INFO PFX "Warning: Timeout while waiting for " | 388 | pr_info(PFX "Warning: Timeout while waiting for idle PCI bus\n"); |
391 | "idle PCI bus.\n"); | ||
392 | return -EBUSY; | 389 | return -EBUSY; |
393 | } | 390 | } |
394 | 391 | ||
@@ -433,12 +430,12 @@ static int longhaul_get_ranges(void) | |||
433 | /* Get current frequency */ | 430 | /* Get current frequency */ |
434 | mult = longhaul_get_cpu_mult(); | 431 | mult = longhaul_get_cpu_mult(); |
435 | if (mult == -1) { | 432 | if (mult == -1) { |
436 | printk(KERN_INFO PFX "Invalid (reserved) multiplier!\n"); | 433 | pr_info(PFX "Invalid (reserved) multiplier!\n"); |
437 | return -EINVAL; | 434 | return -EINVAL; |
438 | } | 435 | } |
439 | fsb = guess_fsb(mult); | 436 | fsb = guess_fsb(mult); |
440 | if (fsb == 0) { | 437 | if (fsb == 0) { |
441 | printk(KERN_INFO PFX "Invalid (reserved) FSB!\n"); | 438 | pr_info(PFX "Invalid (reserved) FSB!\n"); |
442 | return -EINVAL; | 439 | return -EINVAL; |
443 | } | 440 | } |
444 | /* Get max multiplier - as we always did. | 441 | /* Get max multiplier - as we always did. |
@@ -468,11 +465,11 @@ static int longhaul_get_ranges(void) | |||
468 | print_speed(highest_speed/1000)); | 465 | print_speed(highest_speed/1000)); |
469 | 466 | ||
470 | if (lowest_speed == highest_speed) { | 467 | if (lowest_speed == highest_speed) { |
471 | printk(KERN_INFO PFX "highestspeed == lowest, aborting.\n"); | 468 | pr_info(PFX "highestspeed == lowest, aborting\n"); |
472 | return -EINVAL; | 469 | return -EINVAL; |
473 | } | 470 | } |
474 | if (lowest_speed > highest_speed) { | 471 | if (lowest_speed > highest_speed) { |
475 | printk(KERN_INFO PFX "nonsense! lowest (%d > %d) !\n", | 472 | pr_info(PFX "nonsense! lowest (%d > %d) !\n", |
476 | lowest_speed, highest_speed); | 473 | lowest_speed, highest_speed); |
477 | return -EINVAL; | 474 | return -EINVAL; |
478 | } | 475 | } |
@@ -538,16 +535,16 @@ static void longhaul_setup_voltagescaling(void) | |||
538 | 535 | ||
539 | rdmsrl(MSR_VIA_LONGHAUL, longhaul.val); | 536 | rdmsrl(MSR_VIA_LONGHAUL, longhaul.val); |
540 | if (!(longhaul.bits.RevisionID & 1)) { | 537 | if (!(longhaul.bits.RevisionID & 1)) { |
541 | printk(KERN_INFO PFX "Voltage scaling not supported by CPU.\n"); | 538 | pr_info(PFX "Voltage scaling not supported by CPU\n"); |
542 | return; | 539 | return; |
543 | } | 540 | } |
544 | 541 | ||
545 | if (!longhaul.bits.VRMRev) { | 542 | if (!longhaul.bits.VRMRev) { |
546 | printk(KERN_INFO PFX "VRM 8.5\n"); | 543 | pr_info(PFX "VRM 8.5\n"); |
547 | vrm_mV_table = &vrm85_mV[0]; | 544 | vrm_mV_table = &vrm85_mV[0]; |
548 | mV_vrm_table = &mV_vrm85[0]; | 545 | mV_vrm_table = &mV_vrm85[0]; |
549 | } else { | 546 | } else { |
550 | printk(KERN_INFO PFX "Mobile VRM\n"); | 547 | pr_info(PFX "Mobile VRM\n"); |
551 | if (cpu_model < CPU_NEHEMIAH) | 548 | if (cpu_model < CPU_NEHEMIAH) |
552 | return; | 549 | return; |
553 | vrm_mV_table = &mobilevrm_mV[0]; | 550 | vrm_mV_table = &mobilevrm_mV[0]; |
@@ -558,27 +555,21 @@ static void longhaul_setup_voltagescaling(void) | |||
558 | maxvid = vrm_mV_table[longhaul.bits.MaximumVID]; | 555 | maxvid = vrm_mV_table[longhaul.bits.MaximumVID]; |
559 | 556 | ||
560 | if (minvid.mV == 0 || maxvid.mV == 0 || minvid.mV > maxvid.mV) { | 557 | if (minvid.mV == 0 || maxvid.mV == 0 || minvid.mV > maxvid.mV) { |
561 | printk(KERN_INFO PFX "Bogus values Min:%d.%03d Max:%d.%03d. " | 558 | pr_info(PFX "Bogus values Min:%d.%03d Max:%d.%03d - Voltage scaling disabled\n", |
562 | "Voltage scaling disabled.\n", | 559 | minvid.mV/1000, minvid.mV%1000, |
563 | minvid.mV/1000, minvid.mV%1000, | 560 | maxvid.mV/1000, maxvid.mV%1000); |
564 | maxvid.mV/1000, maxvid.mV%1000); | ||
565 | return; | 561 | return; |
566 | } | 562 | } |
567 | 563 | ||
568 | if (minvid.mV == maxvid.mV) { | 564 | if (minvid.mV == maxvid.mV) { |
569 | printk(KERN_INFO PFX "Claims to support voltage scaling but " | 565 | pr_info(PFX "Claims to support voltage scaling but min & max are both %d.%03d - Voltage scaling disabled\n", |
570 | "min & max are both %d.%03d. " | 566 | maxvid.mV/1000, maxvid.mV%1000); |
571 | "Voltage scaling disabled\n", | ||
572 | maxvid.mV/1000, maxvid.mV%1000); | ||
573 | return; | 567 | return; |
574 | } | 568 | } |
575 | 569 | ||
576 | /* How many voltage steps*/ | 570 | /* How many voltage steps*/ |
577 | numvscales = maxvid.pos - minvid.pos + 1; | 571 | numvscales = maxvid.pos - minvid.pos + 1; |
578 | printk(KERN_INFO PFX | 572 | pr_info(PFX "Max VID=%d.%03d Min VID=%d.%03d, %d possible voltage scales\n", |
579 | "Max VID=%d.%03d " | ||
580 | "Min VID=%d.%03d, " | ||
581 | "%d possible voltage scales\n", | ||
582 | maxvid.mV/1000, maxvid.mV%1000, | 573 | maxvid.mV/1000, maxvid.mV%1000, |
583 | minvid.mV/1000, minvid.mV%1000, | 574 | minvid.mV/1000, minvid.mV%1000, |
584 | numvscales); | 575 | numvscales); |
@@ -617,12 +608,12 @@ static void longhaul_setup_voltagescaling(void) | |||
617 | pos = minvid.pos; | 608 | pos = minvid.pos; |
618 | freq_pos->driver_data |= mV_vrm_table[pos] << 8; | 609 | freq_pos->driver_data |= mV_vrm_table[pos] << 8; |
619 | vid = vrm_mV_table[mV_vrm_table[pos]]; | 610 | vid = vrm_mV_table[mV_vrm_table[pos]]; |
620 | printk(KERN_INFO PFX "f: %d kHz, index: %d, vid: %d mV\n", | 611 | pr_info(PFX "f: %d kHz, index: %d, vid: %d mV\n", |
621 | speed, (int)(freq_pos - longhaul_table), vid.mV); | 612 | speed, (int)(freq_pos - longhaul_table), vid.mV); |
622 | } | 613 | } |
623 | 614 | ||
624 | can_scale_voltage = 1; | 615 | can_scale_voltage = 1; |
625 | printk(KERN_INFO PFX "Voltage scaling enabled.\n"); | 616 | pr_info(PFX "Voltage scaling enabled\n"); |
626 | } | 617 | } |
627 | 618 | ||
628 | 619 | ||
@@ -720,8 +711,7 @@ static int enable_arbiter_disable(void) | |||
720 | pci_write_config_byte(dev, reg, pci_cmd); | 711 | pci_write_config_byte(dev, reg, pci_cmd); |
721 | pci_read_config_byte(dev, reg, &pci_cmd); | 712 | pci_read_config_byte(dev, reg, &pci_cmd); |
722 | if (!(pci_cmd & 1<<7)) { | 713 | if (!(pci_cmd & 1<<7)) { |
723 | printk(KERN_ERR PFX | 714 | pr_err(PFX "Can't enable access to port 0x22\n"); |
724 | "Can't enable access to port 0x22.\n"); | ||
725 | status = 0; | 715 | status = 0; |
726 | } | 716 | } |
727 | } | 717 | } |
@@ -758,8 +748,7 @@ static int longhaul_setup_southbridge(void) | |||
758 | if (pci_cmd & 1 << 7) { | 748 | if (pci_cmd & 1 << 7) { |
759 | pci_read_config_dword(dev, 0x88, &acpi_regs_addr); | 749 | pci_read_config_dword(dev, 0x88, &acpi_regs_addr); |
760 | acpi_regs_addr &= 0xff00; | 750 | acpi_regs_addr &= 0xff00; |
761 | printk(KERN_INFO PFX "ACPI I/O at 0x%x\n", | 751 | pr_info(PFX "ACPI I/O at 0x%x\n", acpi_regs_addr); |
762 | acpi_regs_addr); | ||
763 | } | 752 | } |
764 | 753 | ||
765 | pci_dev_put(dev); | 754 | pci_dev_put(dev); |
@@ -853,14 +842,14 @@ static int longhaul_cpu_init(struct cpufreq_policy *policy) | |||
853 | longhaul_version = TYPE_LONGHAUL_V1; | 842 | longhaul_version = TYPE_LONGHAUL_V1; |
854 | } | 843 | } |
855 | 844 | ||
856 | printk(KERN_INFO PFX "VIA %s CPU detected. ", cpuname); | 845 | pr_info(PFX "VIA %s CPU detected. ", cpuname); |
857 | switch (longhaul_version) { | 846 | switch (longhaul_version) { |
858 | case TYPE_LONGHAUL_V1: | 847 | case TYPE_LONGHAUL_V1: |
859 | case TYPE_LONGHAUL_V2: | 848 | case TYPE_LONGHAUL_V2: |
860 | printk(KERN_CONT "Longhaul v%d supported.\n", longhaul_version); | 849 | pr_cont("Longhaul v%d supported\n", longhaul_version); |
861 | break; | 850 | break; |
862 | case TYPE_POWERSAVER: | 851 | case TYPE_POWERSAVER: |
863 | printk(KERN_CONT "Powersaver supported.\n"); | 852 | pr_cont("Powersaver supported\n"); |
864 | break; | 853 | break; |
865 | }; | 854 | }; |
866 | 855 | ||
@@ -889,15 +878,14 @@ static int longhaul_cpu_init(struct cpufreq_policy *policy) | |||
889 | if (!(longhaul_flags & USE_ACPI_C3 | 878 | if (!(longhaul_flags & USE_ACPI_C3 |
890 | || longhaul_flags & USE_NORTHBRIDGE) | 879 | || longhaul_flags & USE_NORTHBRIDGE) |
891 | && ((pr == NULL) || !(pr->flags.bm_control))) { | 880 | && ((pr == NULL) || !(pr->flags.bm_control))) { |
892 | printk(KERN_ERR PFX | 881 | pr_err(PFX "No ACPI support: Unsupported northbridge\n"); |
893 | "No ACPI support. Unsupported northbridge.\n"); | ||
894 | return -ENODEV; | 882 | return -ENODEV; |
895 | } | 883 | } |
896 | 884 | ||
897 | if (longhaul_flags & USE_NORTHBRIDGE) | 885 | if (longhaul_flags & USE_NORTHBRIDGE) |
898 | printk(KERN_INFO PFX "Using northbridge support.\n"); | 886 | pr_info(PFX "Using northbridge support\n"); |
899 | if (longhaul_flags & USE_ACPI_C3) | 887 | if (longhaul_flags & USE_ACPI_C3) |
900 | printk(KERN_INFO PFX "Using ACPI support.\n"); | 888 | pr_info(PFX "Using ACPI support\n"); |
901 | 889 | ||
902 | ret = longhaul_get_ranges(); | 890 | ret = longhaul_get_ranges(); |
903 | if (ret != 0) | 891 | if (ret != 0) |
@@ -934,20 +922,18 @@ static int __init longhaul_init(void) | |||
934 | return -ENODEV; | 922 | return -ENODEV; |
935 | 923 | ||
936 | if (!enable) { | 924 | if (!enable) { |
937 | printk(KERN_ERR PFX "Option \"enable\" not set. Aborting.\n"); | 925 | pr_err(PFX "Option \"enable\" not set - Aborting\n"); |
938 | return -ENODEV; | 926 | return -ENODEV; |
939 | } | 927 | } |
940 | #ifdef CONFIG_SMP | 928 | #ifdef CONFIG_SMP |
941 | if (num_online_cpus() > 1) { | 929 | if (num_online_cpus() > 1) { |
942 | printk(KERN_ERR PFX "More than 1 CPU detected, " | 930 | pr_err(PFX "More than 1 CPU detected, longhaul disabled\n"); |
943 | "longhaul disabled.\n"); | ||
944 | return -ENODEV; | 931 | return -ENODEV; |
945 | } | 932 | } |
946 | #endif | 933 | #endif |
947 | #ifdef CONFIG_X86_IO_APIC | 934 | #ifdef CONFIG_X86_IO_APIC |
948 | if (cpu_has_apic) { | 935 | if (cpu_has_apic) { |
949 | printk(KERN_ERR PFX "APIC detected. Longhaul is currently " | 936 | pr_err(PFX "APIC detected. Longhaul is currently broken in this configuration.\n"); |
950 | "broken in this configuration.\n"); | ||
951 | return -ENODEV; | 937 | return -ENODEV; |
952 | } | 938 | } |
953 | #endif | 939 | #endif |
@@ -955,7 +941,7 @@ static int __init longhaul_init(void) | |||
955 | case 6 ... 9: | 941 | case 6 ... 9: |
956 | return cpufreq_register_driver(&longhaul_driver); | 942 | return cpufreq_register_driver(&longhaul_driver); |
957 | case 10: | 943 | case 10: |
958 | printk(KERN_ERR PFX "Use acpi-cpufreq driver for VIA C7\n"); | 944 | pr_err(PFX "Use acpi-cpufreq driver for VIA C7\n"); |
959 | default: | 945 | default: |
960 | ; | 946 | ; |
961 | } | 947 | } |
diff --git a/drivers/cpufreq/loongson2_cpufreq.c b/drivers/cpufreq/loongson2_cpufreq.c index cd593c1f66dc..93c7928cf461 100644 --- a/drivers/cpufreq/loongson2_cpufreq.c +++ b/drivers/cpufreq/loongson2_cpufreq.c | |||
@@ -76,7 +76,7 @@ static int loongson2_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
76 | 76 | ||
77 | cpuclk = clk_get(NULL, "cpu_clk"); | 77 | cpuclk = clk_get(NULL, "cpu_clk"); |
78 | if (IS_ERR(cpuclk)) { | 78 | if (IS_ERR(cpuclk)) { |
79 | printk(KERN_ERR "cpufreq: couldn't get CPU clk\n"); | 79 | pr_err("cpufreq: couldn't get CPU clk\n"); |
80 | return PTR_ERR(cpuclk); | 80 | return PTR_ERR(cpuclk); |
81 | } | 81 | } |
82 | 82 | ||
diff --git a/drivers/cpufreq/maple-cpufreq.c b/drivers/cpufreq/maple-cpufreq.c index cc3408fc073f..7e55632291d7 100644 --- a/drivers/cpufreq/maple-cpufreq.c +++ b/drivers/cpufreq/maple-cpufreq.c | |||
@@ -174,7 +174,7 @@ static int __init maple_cpufreq_init(void) | |||
174 | /* Get first CPU node */ | 174 | /* Get first CPU node */ |
175 | cpunode = of_cpu_device_node_get(0); | 175 | cpunode = of_cpu_device_node_get(0); |
176 | if (cpunode == NULL) { | 176 | if (cpunode == NULL) { |
177 | printk(KERN_ERR "cpufreq: Can't find any CPU 0 node\n"); | 177 | pr_err("cpufreq: Can't find any CPU 0 node\n"); |
178 | goto bail_noprops; | 178 | goto bail_noprops; |
179 | } | 179 | } |
180 | 180 | ||
@@ -182,8 +182,7 @@ static int __init maple_cpufreq_init(void) | |||
182 | /* we actually don't care on which CPU to access PVR */ | 182 | /* we actually don't care on which CPU to access PVR */ |
183 | pvr_hi = PVR_VER(mfspr(SPRN_PVR)); | 183 | pvr_hi = PVR_VER(mfspr(SPRN_PVR)); |
184 | if (pvr_hi != 0x3c && pvr_hi != 0x44) { | 184 | if (pvr_hi != 0x3c && pvr_hi != 0x44) { |
185 | printk(KERN_ERR "cpufreq: Unsupported CPU version (%x)\n", | 185 | pr_err("cpufreq: Unsupported CPU version (%x)\n", pvr_hi); |
186 | pvr_hi); | ||
187 | goto bail_noprops; | 186 | goto bail_noprops; |
188 | } | 187 | } |
189 | 188 | ||
@@ -222,8 +221,8 @@ static int __init maple_cpufreq_init(void) | |||
222 | maple_pmode_cur = -1; | 221 | maple_pmode_cur = -1; |
223 | maple_scom_switch_freq(maple_scom_query_freq()); | 222 | maple_scom_switch_freq(maple_scom_query_freq()); |
224 | 223 | ||
225 | printk(KERN_INFO "Registering Maple CPU frequency driver\n"); | 224 | pr_info("Registering Maple CPU frequency driver\n"); |
226 | printk(KERN_INFO "Low: %d Mhz, High: %d Mhz, Cur: %d MHz\n", | 225 | pr_info("Low: %d Mhz, High: %d Mhz, Cur: %d MHz\n", |
227 | maple_cpu_freqs[1].frequency/1000, | 226 | maple_cpu_freqs[1].frequency/1000, |
228 | maple_cpu_freqs[0].frequency/1000, | 227 | maple_cpu_freqs[0].frequency/1000, |
229 | maple_cpu_freqs[maple_pmode_cur].frequency/1000); | 228 | maple_cpu_freqs[maple_pmode_cur].frequency/1000); |
diff --git a/drivers/cpufreq/omap-cpufreq.c b/drivers/cpufreq/omap-cpufreq.c index e3866e0d5bf8..655fc9427626 100644 --- a/drivers/cpufreq/omap-cpufreq.c +++ b/drivers/cpufreq/omap-cpufreq.c | |||
@@ -163,13 +163,13 @@ static int omap_cpufreq_probe(struct platform_device *pdev) | |||
163 | { | 163 | { |
164 | mpu_dev = get_cpu_device(0); | 164 | mpu_dev = get_cpu_device(0); |
165 | if (!mpu_dev) { | 165 | if (!mpu_dev) { |
166 | pr_warning("%s: unable to get the mpu device\n", __func__); | 166 | pr_warn("%s: unable to get the mpu device\n", __func__); |
167 | return -EINVAL; | 167 | return -EINVAL; |
168 | } | 168 | } |
169 | 169 | ||
170 | mpu_reg = regulator_get(mpu_dev, "vcc"); | 170 | mpu_reg = regulator_get(mpu_dev, "vcc"); |
171 | if (IS_ERR(mpu_reg)) { | 171 | if (IS_ERR(mpu_reg)) { |
172 | pr_warning("%s: unable to get MPU regulator\n", __func__); | 172 | pr_warn("%s: unable to get MPU regulator\n", __func__); |
173 | mpu_reg = NULL; | 173 | mpu_reg = NULL; |
174 | } else { | 174 | } else { |
175 | /* | 175 | /* |
diff --git a/drivers/cpufreq/p4-clockmod.c b/drivers/cpufreq/p4-clockmod.c index 5dd95dab580d..4d1a44370338 100644 --- a/drivers/cpufreq/p4-clockmod.c +++ b/drivers/cpufreq/p4-clockmod.c | |||
@@ -124,11 +124,7 @@ static unsigned int cpufreq_p4_get_frequency(struct cpuinfo_x86 *c) | |||
124 | { | 124 | { |
125 | if (c->x86 == 0x06) { | 125 | if (c->x86 == 0x06) { |
126 | if (cpu_has(c, X86_FEATURE_EST)) | 126 | if (cpu_has(c, X86_FEATURE_EST)) |
127 | printk_once(KERN_WARNING PFX "Warning: EST-capable " | 127 | pr_warn_once(PFX "Warning: EST-capable CPU detected. The acpi-cpufreq module offers voltage scaling in addition to frequency scaling. You should use that instead of p4-clockmod, if possible.\n"); |
128 | "CPU detected. The acpi-cpufreq module offers " | ||
129 | "voltage scaling in addition to frequency " | ||
130 | "scaling. You should use that instead of " | ||
131 | "p4-clockmod, if possible.\n"); | ||
132 | switch (c->x86_model) { | 128 | switch (c->x86_model) { |
133 | case 0x0E: /* Core */ | 129 | case 0x0E: /* Core */ |
134 | case 0x0F: /* Core Duo */ | 130 | case 0x0F: /* Core Duo */ |
@@ -152,11 +148,7 @@ static unsigned int cpufreq_p4_get_frequency(struct cpuinfo_x86 *c) | |||
152 | p4clockmod_driver.flags |= CPUFREQ_CONST_LOOPS; | 148 | p4clockmod_driver.flags |= CPUFREQ_CONST_LOOPS; |
153 | 149 | ||
154 | if (speedstep_detect_processor() == SPEEDSTEP_CPU_P4M) { | 150 | if (speedstep_detect_processor() == SPEEDSTEP_CPU_P4M) { |
155 | printk(KERN_WARNING PFX "Warning: Pentium 4-M detected. " | 151 | pr_warn(PFX "Warning: Pentium 4-M detected. The speedstep-ich or acpi cpufreq modules offer voltage scaling in addition of frequency scaling. You should use either one instead of p4-clockmod, if possible.\n"); |
156 | "The speedstep-ich or acpi cpufreq modules offer " | ||
157 | "voltage scaling in addition of frequency scaling. " | ||
158 | "You should use either one instead of p4-clockmod, " | ||
159 | "if possible.\n"); | ||
160 | return speedstep_get_frequency(SPEEDSTEP_CPU_P4M); | 152 | return speedstep_get_frequency(SPEEDSTEP_CPU_P4M); |
161 | } | 153 | } |
162 | 154 | ||
@@ -265,8 +257,7 @@ static int __init cpufreq_p4_init(void) | |||
265 | 257 | ||
266 | ret = cpufreq_register_driver(&p4clockmod_driver); | 258 | ret = cpufreq_register_driver(&p4clockmod_driver); |
267 | if (!ret) | 259 | if (!ret) |
268 | printk(KERN_INFO PFX "P4/Xeon(TM) CPU On-Demand Clock " | 260 | pr_info(PFX "P4/Xeon(TM) CPU On-Demand Clock Modulation available\n"); |
269 | "Modulation available\n"); | ||
270 | 261 | ||
271 | return ret; | 262 | return ret; |
272 | } | 263 | } |
diff --git a/drivers/cpufreq/pmac32-cpufreq.c b/drivers/cpufreq/pmac32-cpufreq.c index 1f49d97a70ea..072d7b3841b9 100644 --- a/drivers/cpufreq/pmac32-cpufreq.c +++ b/drivers/cpufreq/pmac32-cpufreq.c | |||
@@ -481,13 +481,13 @@ static int pmac_cpufreq_init_MacRISC3(struct device_node *cpunode) | |||
481 | freqs = of_get_property(cpunode, "bus-frequencies", &lenp); | 481 | freqs = of_get_property(cpunode, "bus-frequencies", &lenp); |
482 | lenp /= sizeof(u32); | 482 | lenp /= sizeof(u32); |
483 | if (freqs == NULL || lenp != 2) { | 483 | if (freqs == NULL || lenp != 2) { |
484 | printk(KERN_ERR "cpufreq: bus-frequencies incorrect or missing\n"); | 484 | pr_err("cpufreq: bus-frequencies incorrect or missing\n"); |
485 | return 1; | 485 | return 1; |
486 | } | 486 | } |
487 | ratio = of_get_property(cpunode, "processor-to-bus-ratio*2", | 487 | ratio = of_get_property(cpunode, "processor-to-bus-ratio*2", |
488 | NULL); | 488 | NULL); |
489 | if (ratio == NULL) { | 489 | if (ratio == NULL) { |
490 | printk(KERN_ERR "cpufreq: processor-to-bus-ratio*2 missing\n"); | 490 | pr_err("cpufreq: processor-to-bus-ratio*2 missing\n"); |
491 | return 1; | 491 | return 1; |
492 | } | 492 | } |
493 | 493 | ||
@@ -550,7 +550,7 @@ static int pmac_cpufreq_init_7447A(struct device_node *cpunode) | |||
550 | if (volt_gpio_np) | 550 | if (volt_gpio_np) |
551 | voltage_gpio = read_gpio(volt_gpio_np); | 551 | voltage_gpio = read_gpio(volt_gpio_np); |
552 | if (!voltage_gpio){ | 552 | if (!voltage_gpio){ |
553 | printk(KERN_ERR "cpufreq: missing cpu-vcore-select gpio\n"); | 553 | pr_err("cpufreq: missing cpu-vcore-select gpio\n"); |
554 | return 1; | 554 | return 1; |
555 | } | 555 | } |
556 | 556 | ||
@@ -675,9 +675,9 @@ out: | |||
675 | pmac_cpu_freqs[CPUFREQ_HIGH].frequency = hi_freq; | 675 | pmac_cpu_freqs[CPUFREQ_HIGH].frequency = hi_freq; |
676 | ppc_proc_freq = cur_freq * 1000ul; | 676 | ppc_proc_freq = cur_freq * 1000ul; |
677 | 677 | ||
678 | printk(KERN_INFO "Registering PowerMac CPU frequency driver\n"); | 678 | pr_info("Registering PowerMac CPU frequency driver\n"); |
679 | printk(KERN_INFO "Low: %d Mhz, High: %d Mhz, Boot: %d Mhz\n", | 679 | pr_info("Low: %d Mhz, High: %d Mhz, Boot: %d Mhz\n", |
680 | low_freq/1000, hi_freq/1000, cur_freq/1000); | 680 | low_freq/1000, hi_freq/1000, cur_freq/1000); |
681 | 681 | ||
682 | return cpufreq_register_driver(&pmac_cpufreq_driver); | 682 | return cpufreq_register_driver(&pmac_cpufreq_driver); |
683 | } | 683 | } |
diff --git a/drivers/cpufreq/pmac64-cpufreq.c b/drivers/cpufreq/pmac64-cpufreq.c index 4ff86878727f..5ffe0855ba8f 100644 --- a/drivers/cpufreq/pmac64-cpufreq.c +++ b/drivers/cpufreq/pmac64-cpufreq.c | |||
@@ -138,7 +138,7 @@ static void g5_vdnap_switch_volt(int speed_mode) | |||
138 | usleep_range(1000, 1000); | 138 | usleep_range(1000, 1000); |
139 | } | 139 | } |
140 | if (done == 0) | 140 | if (done == 0) |
141 | printk(KERN_WARNING "cpufreq: Timeout in clock slewing !\n"); | 141 | pr_warn("cpufreq: Timeout in clock slewing !\n"); |
142 | } | 142 | } |
143 | 143 | ||
144 | 144 | ||
@@ -266,7 +266,7 @@ static int g5_pfunc_switch_freq(int speed_mode) | |||
266 | rc = pmf_call_one(pfunc_cpu_setfreq_low, NULL); | 266 | rc = pmf_call_one(pfunc_cpu_setfreq_low, NULL); |
267 | 267 | ||
268 | if (rc) | 268 | if (rc) |
269 | printk(KERN_WARNING "cpufreq: pfunc switch error %d\n", rc); | 269 | pr_warn("cpufreq: pfunc switch error %d\n", rc); |
270 | 270 | ||
271 | /* It's an irq GPIO so we should be able to just block here, | 271 | /* It's an irq GPIO so we should be able to just block here, |
272 | * I'll do that later after I've properly tested the IRQ code for | 272 | * I'll do that later after I've properly tested the IRQ code for |
@@ -282,7 +282,7 @@ static int g5_pfunc_switch_freq(int speed_mode) | |||
282 | usleep_range(500, 500); | 282 | usleep_range(500, 500); |
283 | } | 283 | } |
284 | if (done == 0) | 284 | if (done == 0) |
285 | printk(KERN_WARNING "cpufreq: Timeout in clock slewing !\n"); | 285 | pr_warn("cpufreq: Timeout in clock slewing !\n"); |
286 | 286 | ||
287 | /* If frequency is going down, last ramp the voltage */ | 287 | /* If frequency is going down, last ramp the voltage */ |
288 | if (speed_mode > g5_pmode_cur) | 288 | if (speed_mode > g5_pmode_cur) |
@@ -368,7 +368,7 @@ static int __init g5_neo2_cpufreq_init(struct device_node *cpunode) | |||
368 | } | 368 | } |
369 | pvr_hi = (*valp) >> 16; | 369 | pvr_hi = (*valp) >> 16; |
370 | if (pvr_hi != 0x3c && pvr_hi != 0x44) { | 370 | if (pvr_hi != 0x3c && pvr_hi != 0x44) { |
371 | printk(KERN_ERR "cpufreq: Unsupported CPU version\n"); | 371 | pr_err("cpufreq: Unsupported CPU version\n"); |
372 | goto bail_noprops; | 372 | goto bail_noprops; |
373 | } | 373 | } |
374 | 374 | ||
@@ -403,8 +403,7 @@ static int __init g5_neo2_cpufreq_init(struct device_node *cpunode) | |||
403 | 403 | ||
404 | root = of_find_node_by_path("/"); | 404 | root = of_find_node_by_path("/"); |
405 | if (root == NULL) { | 405 | if (root == NULL) { |
406 | printk(KERN_ERR "cpufreq: Can't find root of " | 406 | pr_err("cpufreq: Can't find root of device tree\n"); |
407 | "device tree\n"); | ||
408 | goto bail_noprops; | 407 | goto bail_noprops; |
409 | } | 408 | } |
410 | pfunc_set_vdnap0 = pmf_find_function(root, "set-vdnap0"); | 409 | pfunc_set_vdnap0 = pmf_find_function(root, "set-vdnap0"); |
@@ -412,8 +411,7 @@ static int __init g5_neo2_cpufreq_init(struct device_node *cpunode) | |||
412 | pmf_find_function(root, "slewing-done"); | 411 | pmf_find_function(root, "slewing-done"); |
413 | if (pfunc_set_vdnap0 == NULL || | 412 | if (pfunc_set_vdnap0 == NULL || |
414 | pfunc_vdnap0_complete == NULL) { | 413 | pfunc_vdnap0_complete == NULL) { |
415 | printk(KERN_ERR "cpufreq: Can't find required " | 414 | pr_err("cpufreq: Can't find required platform function\n"); |
416 | "platform function\n"); | ||
417 | goto bail_noprops; | 415 | goto bail_noprops; |
418 | } | 416 | } |
419 | 417 | ||
@@ -453,10 +451,10 @@ static int __init g5_neo2_cpufreq_init(struct device_node *cpunode) | |||
453 | g5_pmode_cur = -1; | 451 | g5_pmode_cur = -1; |
454 | g5_switch_freq(g5_query_freq()); | 452 | g5_switch_freq(g5_query_freq()); |
455 | 453 | ||
456 | printk(KERN_INFO "Registering G5 CPU frequency driver\n"); | 454 | pr_info("Registering G5 CPU frequency driver\n"); |
457 | printk(KERN_INFO "Frequency method: %s, Voltage method: %s\n", | 455 | pr_info("Frequency method: %s, Voltage method: %s\n", |
458 | freq_method, volt_method); | 456 | freq_method, volt_method); |
459 | printk(KERN_INFO "Low: %d Mhz, High: %d Mhz, Cur: %d MHz\n", | 457 | pr_info("Low: %d Mhz, High: %d Mhz, Cur: %d MHz\n", |
460 | g5_cpu_freqs[1].frequency/1000, | 458 | g5_cpu_freqs[1].frequency/1000, |
461 | g5_cpu_freqs[0].frequency/1000, | 459 | g5_cpu_freqs[0].frequency/1000, |
462 | g5_cpu_freqs[g5_pmode_cur].frequency/1000); | 460 | g5_cpu_freqs[g5_pmode_cur].frequency/1000); |
@@ -493,7 +491,7 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpunode) | |||
493 | if (cpuid != NULL) | 491 | if (cpuid != NULL) |
494 | eeprom = of_get_property(cpuid, "cpuid", NULL); | 492 | eeprom = of_get_property(cpuid, "cpuid", NULL); |
495 | if (eeprom == NULL) { | 493 | if (eeprom == NULL) { |
496 | printk(KERN_ERR "cpufreq: Can't find cpuid EEPROM !\n"); | 494 | pr_err("cpufreq: Can't find cpuid EEPROM !\n"); |
497 | rc = -ENODEV; | 495 | rc = -ENODEV; |
498 | goto bail; | 496 | goto bail; |
499 | } | 497 | } |
@@ -511,7 +509,7 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpunode) | |||
511 | break; | 509 | break; |
512 | } | 510 | } |
513 | if (hwclock == NULL) { | 511 | if (hwclock == NULL) { |
514 | printk(KERN_ERR "cpufreq: Can't find i2c clock chip !\n"); | 512 | pr_err("cpufreq: Can't find i2c clock chip !\n"); |
515 | rc = -ENODEV; | 513 | rc = -ENODEV; |
516 | goto bail; | 514 | goto bail; |
517 | } | 515 | } |
@@ -539,7 +537,7 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpunode) | |||
539 | /* Check we have minimum requirements */ | 537 | /* Check we have minimum requirements */ |
540 | if (pfunc_cpu_getfreq == NULL || pfunc_cpu_setfreq_high == NULL || | 538 | if (pfunc_cpu_getfreq == NULL || pfunc_cpu_setfreq_high == NULL || |
541 | pfunc_cpu_setfreq_low == NULL || pfunc_slewing_done == NULL) { | 539 | pfunc_cpu_setfreq_low == NULL || pfunc_slewing_done == NULL) { |
542 | printk(KERN_ERR "cpufreq: Can't find platform functions !\n"); | 540 | pr_err("cpufreq: Can't find platform functions !\n"); |
543 | rc = -ENODEV; | 541 | rc = -ENODEV; |
544 | goto bail; | 542 | goto bail; |
545 | } | 543 | } |
@@ -567,7 +565,7 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpunode) | |||
567 | /* Get max frequency from device-tree */ | 565 | /* Get max frequency from device-tree */ |
568 | valp = of_get_property(cpunode, "clock-frequency", NULL); | 566 | valp = of_get_property(cpunode, "clock-frequency", NULL); |
569 | if (!valp) { | 567 | if (!valp) { |
570 | printk(KERN_ERR "cpufreq: Can't find CPU frequency !\n"); | 568 | pr_err("cpufreq: Can't find CPU frequency !\n"); |
571 | rc = -ENODEV; | 569 | rc = -ENODEV; |
572 | goto bail; | 570 | goto bail; |
573 | } | 571 | } |
@@ -583,8 +581,7 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpunode) | |||
583 | 581 | ||
584 | /* Check for machines with no useful settings */ | 582 | /* Check for machines with no useful settings */ |
585 | if (il == ih) { | 583 | if (il == ih) { |
586 | printk(KERN_WARNING "cpufreq: No low frequency mode available" | 584 | pr_warn("cpufreq: No low frequency mode available on this model !\n"); |
587 | " on this model !\n"); | ||
588 | rc = -ENODEV; | 585 | rc = -ENODEV; |
589 | goto bail; | 586 | goto bail; |
590 | } | 587 | } |
@@ -595,7 +592,7 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpunode) | |||
595 | 592 | ||
596 | /* Sanity check */ | 593 | /* Sanity check */ |
597 | if (min_freq >= max_freq || min_freq < 1000) { | 594 | if (min_freq >= max_freq || min_freq < 1000) { |
598 | printk(KERN_ERR "cpufreq: Can't calculate low frequency !\n"); | 595 | pr_err("cpufreq: Can't calculate low frequency !\n"); |
599 | rc = -ENXIO; | 596 | rc = -ENXIO; |
600 | goto bail; | 597 | goto bail; |
601 | } | 598 | } |
@@ -619,10 +616,10 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpunode) | |||
619 | g5_pmode_cur = -1; | 616 | g5_pmode_cur = -1; |
620 | g5_switch_freq(g5_query_freq()); | 617 | g5_switch_freq(g5_query_freq()); |
621 | 618 | ||
622 | printk(KERN_INFO "Registering G5 CPU frequency driver\n"); | 619 | pr_info("Registering G5 CPU frequency driver\n"); |
623 | printk(KERN_INFO "Frequency method: i2c/pfunc, " | 620 | pr_info("Frequency method: i2c/pfunc, Voltage method: %s\n", |
624 | "Voltage method: %s\n", has_volt ? "i2c/pfunc" : "none"); | 621 | has_volt ? "i2c/pfunc" : "none"); |
625 | printk(KERN_INFO "Low: %d Mhz, High: %d Mhz, Cur: %d MHz\n", | 622 | pr_info("Low: %d Mhz, High: %d Mhz, Cur: %d MHz\n", |
626 | g5_cpu_freqs[1].frequency/1000, | 623 | g5_cpu_freqs[1].frequency/1000, |
627 | g5_cpu_freqs[0].frequency/1000, | 624 | g5_cpu_freqs[0].frequency/1000, |
628 | g5_cpu_freqs[g5_pmode_cur].frequency/1000); | 625 | g5_cpu_freqs[g5_pmode_cur].frequency/1000); |
diff --git a/drivers/cpufreq/powernow-k6.c b/drivers/cpufreq/powernow-k6.c index e6f24b281e3e..981f40b1caf4 100644 --- a/drivers/cpufreq/powernow-k6.c +++ b/drivers/cpufreq/powernow-k6.c | |||
@@ -141,7 +141,7 @@ static int powernow_k6_target(struct cpufreq_policy *policy, | |||
141 | { | 141 | { |
142 | 142 | ||
143 | if (clock_ratio[best_i].driver_data > max_multiplier) { | 143 | if (clock_ratio[best_i].driver_data > max_multiplier) { |
144 | printk(KERN_ERR PFX "invalid target frequency\n"); | 144 | pr_err(PFX "invalid target frequency\n"); |
145 | return -EINVAL; | 145 | return -EINVAL; |
146 | } | 146 | } |
147 | 147 | ||
@@ -175,13 +175,14 @@ static int powernow_k6_cpu_init(struct cpufreq_policy *policy) | |||
175 | max_multiplier = param_max_multiplier; | 175 | max_multiplier = param_max_multiplier; |
176 | goto have_max_multiplier; | 176 | goto have_max_multiplier; |
177 | } | 177 | } |
178 | printk(KERN_ERR "powernow-k6: invalid max_multiplier parameter, valid parameters 20, 30, 35, 40, 45, 50, 55, 60\n"); | 178 | pr_err("powernow-k6: invalid max_multiplier parameter, valid parameters 20, 30, 35, 40, 45, 50, 55, 60\n"); |
179 | return -EINVAL; | 179 | return -EINVAL; |
180 | } | 180 | } |
181 | 181 | ||
182 | if (!max_multiplier) { | 182 | if (!max_multiplier) { |
183 | printk(KERN_WARNING "powernow-k6: unknown frequency %u, cannot determine current multiplier\n", khz); | 183 | pr_warn("powernow-k6: unknown frequency %u, cannot determine current multiplier\n", |
184 | printk(KERN_WARNING "powernow-k6: use module parameters max_multiplier and bus_frequency\n"); | 184 | khz); |
185 | pr_warn("powernow-k6: use module parameters max_multiplier and bus_frequency\n"); | ||
185 | return -EOPNOTSUPP; | 186 | return -EOPNOTSUPP; |
186 | } | 187 | } |
187 | 188 | ||
@@ -193,7 +194,7 @@ have_max_multiplier: | |||
193 | busfreq = param_busfreq / 10; | 194 | busfreq = param_busfreq / 10; |
194 | goto have_busfreq; | 195 | goto have_busfreq; |
195 | } | 196 | } |
196 | printk(KERN_ERR "powernow-k6: invalid bus_frequency parameter, allowed range 50000 - 150000 kHz\n"); | 197 | pr_err("powernow-k6: invalid bus_frequency parameter, allowed range 50000 - 150000 kHz\n"); |
197 | return -EINVAL; | 198 | return -EINVAL; |
198 | } | 199 | } |
199 | 200 | ||
@@ -275,7 +276,7 @@ static int __init powernow_k6_init(void) | |||
275 | return -ENODEV; | 276 | return -ENODEV; |
276 | 277 | ||
277 | if (!request_region(POWERNOW_IOPORT, 16, "PowerNow!")) { | 278 | if (!request_region(POWERNOW_IOPORT, 16, "PowerNow!")) { |
278 | printk(KERN_INFO PFX "PowerNow IOPORT region already used.\n"); | 279 | pr_info(PFX "PowerNow IOPORT region already used\n"); |
279 | return -EIO; | 280 | return -EIO; |
280 | } | 281 | } |
281 | 282 | ||
diff --git a/drivers/cpufreq/powernow-k7.c b/drivers/cpufreq/powernow-k7.c index c1ae1999770a..4a1b420da72e 100644 --- a/drivers/cpufreq/powernow-k7.c +++ b/drivers/cpufreq/powernow-k7.c | |||
@@ -127,14 +127,13 @@ static int check_powernow(void) | |||
127 | maxei = cpuid_eax(0x80000000); | 127 | maxei = cpuid_eax(0x80000000); |
128 | if (maxei < 0x80000007) { /* Any powernow info ? */ | 128 | if (maxei < 0x80000007) { /* Any powernow info ? */ |
129 | #ifdef MODULE | 129 | #ifdef MODULE |
130 | printk(KERN_INFO PFX "No powernow capabilities detected\n"); | 130 | pr_info(PFX "No powernow capabilities detected\n"); |
131 | #endif | 131 | #endif |
132 | return 0; | 132 | return 0; |
133 | } | 133 | } |
134 | 134 | ||
135 | if ((c->x86_model == 6) && (c->x86_mask == 0)) { | 135 | if ((c->x86_model == 6) && (c->x86_mask == 0)) { |
136 | printk(KERN_INFO PFX "K7 660[A0] core detected, " | 136 | pr_info(PFX "K7 660[A0] core detected, enabling errata workarounds\n"); |
137 | "enabling errata workarounds\n"); | ||
138 | have_a0 = 1; | 137 | have_a0 = 1; |
139 | } | 138 | } |
140 | 139 | ||
@@ -144,22 +143,22 @@ static int check_powernow(void) | |||
144 | if (!(edx & (1 << 1 | 1 << 2))) | 143 | if (!(edx & (1 << 1 | 1 << 2))) |
145 | return 0; | 144 | return 0; |
146 | 145 | ||
147 | printk(KERN_INFO PFX "PowerNOW! Technology present. Can scale: "); | 146 | pr_info(PFX "PowerNOW! Technology present. Can scale: "); |
148 | 147 | ||
149 | if (edx & 1 << 1) { | 148 | if (edx & 1 << 1) { |
150 | printk("frequency"); | 149 | pr_cont("frequency"); |
151 | can_scale_bus = 1; | 150 | can_scale_bus = 1; |
152 | } | 151 | } |
153 | 152 | ||
154 | if ((edx & (1 << 1 | 1 << 2)) == 0x6) | 153 | if ((edx & (1 << 1 | 1 << 2)) == 0x6) |
155 | printk(" and "); | 154 | pr_cont(" and "); |
156 | 155 | ||
157 | if (edx & 1 << 2) { | 156 | if (edx & 1 << 2) { |
158 | printk("voltage"); | 157 | pr_cont("voltage"); |
159 | can_scale_vid = 1; | 158 | can_scale_vid = 1; |
160 | } | 159 | } |
161 | 160 | ||
162 | printk(".\n"); | 161 | pr_cont("\n"); |
163 | return 1; | 162 | return 1; |
164 | } | 163 | } |
165 | 164 | ||
@@ -427,16 +426,14 @@ err1: | |||
427 | err05: | 426 | err05: |
428 | kfree(acpi_processor_perf); | 427 | kfree(acpi_processor_perf); |
429 | err0: | 428 | err0: |
430 | printk(KERN_WARNING PFX "ACPI perflib can not be used on " | 429 | pr_warn(PFX "ACPI perflib can not be used on this platform\n"); |
431 | "this platform\n"); | ||
432 | acpi_processor_perf = NULL; | 430 | acpi_processor_perf = NULL; |
433 | return retval; | 431 | return retval; |
434 | } | 432 | } |
435 | #else | 433 | #else |
436 | static int powernow_acpi_init(void) | 434 | static int powernow_acpi_init(void) |
437 | { | 435 | { |
438 | printk(KERN_INFO PFX "no support for ACPI processor found." | 436 | pr_info(PFX "no support for ACPI processor found - please recompile your kernel with ACPI processor\n"); |
439 | " Please recompile your kernel with ACPI processor\n"); | ||
440 | return -EINVAL; | 437 | return -EINVAL; |
441 | } | 438 | } |
442 | #endif | 439 | #endif |
@@ -468,8 +465,7 @@ static int powernow_decode_bios(int maxfid, int startvid) | |||
468 | psb = (struct psb_s *) p; | 465 | psb = (struct psb_s *) p; |
469 | pr_debug("Table version: 0x%x\n", psb->tableversion); | 466 | pr_debug("Table version: 0x%x\n", psb->tableversion); |
470 | if (psb->tableversion != 0x12) { | 467 | if (psb->tableversion != 0x12) { |
471 | printk(KERN_INFO PFX "Sorry, only v1.2 tables" | 468 | pr_info(PFX "Sorry, only v1.2 tables supported right now\n"); |
472 | " supported right now\n"); | ||
473 | return -ENODEV; | 469 | return -ENODEV; |
474 | } | 470 | } |
475 | 471 | ||
@@ -481,10 +477,8 @@ static int powernow_decode_bios(int maxfid, int startvid) | |||
481 | 477 | ||
482 | latency = psb->settlingtime; | 478 | latency = psb->settlingtime; |
483 | if (latency < 100) { | 479 | if (latency < 100) { |
484 | printk(KERN_INFO PFX "BIOS set settling time " | 480 | pr_info(PFX "BIOS set settling time to %d microseconds. Should be at least 100. Correcting.\n", |
485 | "to %d microseconds. " | 481 | latency); |
486 | "Should be at least 100. " | ||
487 | "Correcting.\n", latency); | ||
488 | latency = 100; | 482 | latency = 100; |
489 | } | 483 | } |
490 | pr_debug("Settling Time: %d microseconds.\n", | 484 | pr_debug("Settling Time: %d microseconds.\n", |
@@ -516,10 +510,9 @@ static int powernow_decode_bios(int maxfid, int startvid) | |||
516 | p += 2; | 510 | p += 2; |
517 | } | 511 | } |
518 | } | 512 | } |
519 | printk(KERN_INFO PFX "No PST tables match this cpuid " | 513 | pr_info(PFX "No PST tables match this cpuid (0x%x)\n", |
520 | "(0x%x)\n", etuple); | 514 | etuple); |
521 | printk(KERN_INFO PFX "This is indicative of a broken " | 515 | pr_info(PFX "This is indicative of a broken BIOS\n"); |
522 | "BIOS.\n"); | ||
523 | 516 | ||
524 | return -EINVAL; | 517 | return -EINVAL; |
525 | } | 518 | } |
@@ -552,7 +545,7 @@ static int fixup_sgtc(void) | |||
552 | sgtc = 100 * m * latency; | 545 | sgtc = 100 * m * latency; |
553 | sgtc = sgtc / 3; | 546 | sgtc = sgtc / 3; |
554 | if (sgtc > 0xfffff) { | 547 | if (sgtc > 0xfffff) { |
555 | printk(KERN_WARNING PFX "SGTC too large %d\n", sgtc); | 548 | pr_warn(PFX "SGTC too large %d\n", sgtc); |
556 | sgtc = 0xfffff; | 549 | sgtc = 0xfffff; |
557 | } | 550 | } |
558 | return sgtc; | 551 | return sgtc; |
@@ -574,14 +567,10 @@ static unsigned int powernow_get(unsigned int cpu) | |||
574 | 567 | ||
575 | static int acer_cpufreq_pst(const struct dmi_system_id *d) | 568 | static int acer_cpufreq_pst(const struct dmi_system_id *d) |
576 | { | 569 | { |
577 | printk(KERN_WARNING PFX | 570 | pr_warn(PFX "%s laptop with broken PST tables in BIOS detected\n", |
578 | "%s laptop with broken PST tables in BIOS detected.\n", | ||
579 | d->ident); | 571 | d->ident); |
580 | printk(KERN_WARNING PFX | 572 | pr_warn(PFX "You need to downgrade to 3A21 (09/09/2002), or try a newer BIOS than 3A71 (01/20/2003)\n"); |
581 | "You need to downgrade to 3A21 (09/09/2002), or try a newer " | 573 | pr_warn(PFX "cpufreq scaling has been disabled as a result of this\n"); |
582 | "BIOS than 3A71 (01/20/2003)\n"); | ||
583 | printk(KERN_WARNING PFX | ||
584 | "cpufreq scaling has been disabled as a result of this.\n"); | ||
585 | return 0; | 574 | return 0; |
586 | } | 575 | } |
587 | 576 | ||
@@ -616,40 +605,38 @@ static int powernow_cpu_init(struct cpufreq_policy *policy) | |||
616 | 605 | ||
617 | fsb = (10 * cpu_khz) / fid_codes[fidvidstatus.bits.CFID]; | 606 | fsb = (10 * cpu_khz) / fid_codes[fidvidstatus.bits.CFID]; |
618 | if (!fsb) { | 607 | if (!fsb) { |
619 | printk(KERN_WARNING PFX "can not determine bus frequency\n"); | 608 | pr_warn(PFX "can not determine bus frequency\n"); |
620 | return -EINVAL; | 609 | return -EINVAL; |
621 | } | 610 | } |
622 | pr_debug("FSB: %3dMHz\n", fsb/1000); | 611 | pr_debug("FSB: %3dMHz\n", fsb/1000); |
623 | 612 | ||
624 | if (dmi_check_system(powernow_dmi_table) || acpi_force) { | 613 | if (dmi_check_system(powernow_dmi_table) || acpi_force) { |
625 | printk(KERN_INFO PFX "PSB/PST known to be broken. " | 614 | pr_info(PFX "PSB/PST known to be broken - trying ACPI instead\n"); |
626 | "Trying ACPI instead\n"); | ||
627 | result = powernow_acpi_init(); | 615 | result = powernow_acpi_init(); |
628 | } else { | 616 | } else { |
629 | result = powernow_decode_bios(fidvidstatus.bits.MFID, | 617 | result = powernow_decode_bios(fidvidstatus.bits.MFID, |
630 | fidvidstatus.bits.SVID); | 618 | fidvidstatus.bits.SVID); |
631 | if (result) { | 619 | if (result) { |
632 | printk(KERN_INFO PFX "Trying ACPI perflib\n"); | 620 | pr_info(PFX "Trying ACPI perflib\n"); |
633 | maximum_speed = 0; | 621 | maximum_speed = 0; |
634 | minimum_speed = -1; | 622 | minimum_speed = -1; |
635 | latency = 0; | 623 | latency = 0; |
636 | result = powernow_acpi_init(); | 624 | result = powernow_acpi_init(); |
637 | if (result) { | 625 | if (result) { |
638 | printk(KERN_INFO PFX | 626 | pr_info(PFX "ACPI and legacy methods failed\n"); |
639 | "ACPI and legacy methods failed\n"); | ||
640 | } | 627 | } |
641 | } else { | 628 | } else { |
642 | /* SGTC use the bus clock as timer */ | 629 | /* SGTC use the bus clock as timer */ |
643 | latency = fixup_sgtc(); | 630 | latency = fixup_sgtc(); |
644 | printk(KERN_INFO PFX "SGTC: %d\n", latency); | 631 | pr_info(PFX "SGTC: %d\n", latency); |
645 | } | 632 | } |
646 | } | 633 | } |
647 | 634 | ||
648 | if (result) | 635 | if (result) |
649 | return result; | 636 | return result; |
650 | 637 | ||
651 | printk(KERN_INFO PFX "Minimum speed %d MHz. Maximum speed %d MHz.\n", | 638 | pr_info(PFX "Minimum speed %d MHz - Maximum speed %d MHz\n", |
652 | minimum_speed/1000, maximum_speed/1000); | 639 | minimum_speed/1000, maximum_speed/1000); |
653 | 640 | ||
654 | policy->cpuinfo.transition_latency = | 641 | policy->cpuinfo.transition_latency = |
655 | cpufreq_scale(2000000UL, fsb, latency); | 642 | cpufreq_scale(2000000UL, fsb, latency); |
diff --git a/drivers/cpufreq/pxa2xx-cpufreq.c b/drivers/cpufreq/pxa2xx-cpufreq.c index 46fee1539cc8..8a27667c16fa 100644 --- a/drivers/cpufreq/pxa2xx-cpufreq.c +++ b/drivers/cpufreq/pxa2xx-cpufreq.c | |||
@@ -233,9 +233,8 @@ static void pxa27x_guess_max_freq(void) | |||
233 | { | 233 | { |
234 | if (!pxa27x_maxfreq) { | 234 | if (!pxa27x_maxfreq) { |
235 | pxa27x_maxfreq = 416000; | 235 | pxa27x_maxfreq = 416000; |
236 | printk(KERN_INFO "PXA CPU 27x max frequency not defined " | 236 | pr_info("PXA CPU 27x max frequency not defined (pxa27x_maxfreq), assuming pxa271 with %dkHz maxfreq\n", |
237 | "(pxa27x_maxfreq), assuming pxa271 with %dkHz maxfreq\n", | 237 | pxa27x_maxfreq); |
238 | pxa27x_maxfreq); | ||
239 | } else { | 238 | } else { |
240 | pxa27x_maxfreq *= 1000; | 239 | pxa27x_maxfreq *= 1000; |
241 | } | 240 | } |
@@ -417,7 +416,7 @@ static int pxa_cpufreq_init(struct cpufreq_policy *policy) | |||
417 | cpufreq_table_validate_and_show(policy, pxa27x_freq_table); | 416 | cpufreq_table_validate_and_show(policy, pxa27x_freq_table); |
418 | } | 417 | } |
419 | 418 | ||
420 | printk(KERN_INFO "PXA CPU frequency change support initialized\n"); | 419 | pr_info("PXA CPU frequency change support initialized\n"); |
421 | 420 | ||
422 | return 0; | 421 | return 0; |
423 | } | 422 | } |
diff --git a/drivers/cpufreq/s3c2412-cpufreq.c b/drivers/cpufreq/s3c2412-cpufreq.c index eb262133fef2..f9447bac9e22 100644 --- a/drivers/cpufreq/s3c2412-cpufreq.c +++ b/drivers/cpufreq/s3c2412-cpufreq.c | |||
@@ -197,21 +197,20 @@ static int s3c2412_cpufreq_add(struct device *dev, | |||
197 | 197 | ||
198 | hclk = clk_get(NULL, "hclk"); | 198 | hclk = clk_get(NULL, "hclk"); |
199 | if (IS_ERR(hclk)) { | 199 | if (IS_ERR(hclk)) { |
200 | printk(KERN_ERR "%s: cannot find hclk clock\n", __func__); | 200 | pr_err("%s: cannot find hclk clock\n", __func__); |
201 | return -ENOENT; | 201 | return -ENOENT; |
202 | } | 202 | } |
203 | 203 | ||
204 | fclk = clk_get(NULL, "fclk"); | 204 | fclk = clk_get(NULL, "fclk"); |
205 | if (IS_ERR(fclk)) { | 205 | if (IS_ERR(fclk)) { |
206 | printk(KERN_ERR "%s: cannot find fclk clock\n", __func__); | 206 | pr_err("%s: cannot find fclk clock\n", __func__); |
207 | goto err_fclk; | 207 | goto err_fclk; |
208 | } | 208 | } |
209 | 209 | ||
210 | fclk_rate = clk_get_rate(fclk); | 210 | fclk_rate = clk_get_rate(fclk); |
211 | if (fclk_rate > 200000000) { | 211 | if (fclk_rate > 200000000) { |
212 | printk(KERN_INFO | 212 | pr_info("%s: fclk %ld MHz, assuming 266MHz capable part\n", |
213 | "%s: fclk %ld MHz, assuming 266MHz capable part\n", | 213 | __func__, fclk_rate / 1000000); |
214 | __func__, fclk_rate / 1000000); | ||
215 | s3c2412_cpufreq_info.max.fclk = 266000000; | 214 | s3c2412_cpufreq_info.max.fclk = 266000000; |
216 | s3c2412_cpufreq_info.max.hclk = 133000000; | 215 | s3c2412_cpufreq_info.max.hclk = 133000000; |
217 | s3c2412_cpufreq_info.max.pclk = 66000000; | 216 | s3c2412_cpufreq_info.max.pclk = 66000000; |
@@ -219,13 +218,13 @@ static int s3c2412_cpufreq_add(struct device *dev, | |||
219 | 218 | ||
220 | armclk = clk_get(NULL, "armclk"); | 219 | armclk = clk_get(NULL, "armclk"); |
221 | if (IS_ERR(armclk)) { | 220 | if (IS_ERR(armclk)) { |
222 | printk(KERN_ERR "%s: cannot find arm clock\n", __func__); | 221 | pr_err("%s: cannot find arm clock\n", __func__); |
223 | goto err_armclk; | 222 | goto err_armclk; |
224 | } | 223 | } |
225 | 224 | ||
226 | xtal = clk_get(NULL, "xtal"); | 225 | xtal = clk_get(NULL, "xtal"); |
227 | if (IS_ERR(xtal)) { | 226 | if (IS_ERR(xtal)) { |
228 | printk(KERN_ERR "%s: cannot find xtal clock\n", __func__); | 227 | pr_err("%s: cannot find xtal clock\n", __func__); |
229 | goto err_xtal; | 228 | goto err_xtal; |
230 | } | 229 | } |
231 | 230 | ||
diff --git a/drivers/cpufreq/s3c2440-cpufreq.c b/drivers/cpufreq/s3c2440-cpufreq.c index 0129f5c70a61..f6cefe34e411 100644 --- a/drivers/cpufreq/s3c2440-cpufreq.c +++ b/drivers/cpufreq/s3c2440-cpufreq.c | |||
@@ -66,7 +66,7 @@ static int s3c2440_cpufreq_calcdivs(struct s3c_cpufreq_config *cfg) | |||
66 | __func__, fclk, armclk, hclk_max); | 66 | __func__, fclk, armclk, hclk_max); |
67 | 67 | ||
68 | if (armclk > fclk) { | 68 | if (armclk > fclk) { |
69 | printk(KERN_WARNING "%s: armclk > fclk\n", __func__); | 69 | pr_warn("%s: armclk > fclk\n", __func__); |
70 | armclk = fclk; | 70 | armclk = fclk; |
71 | } | 71 | } |
72 | 72 | ||
@@ -273,7 +273,7 @@ static int s3c2440_cpufreq_add(struct device *dev, | |||
273 | armclk = s3c_cpufreq_clk_get(NULL, "armclk"); | 273 | armclk = s3c_cpufreq_clk_get(NULL, "armclk"); |
274 | 274 | ||
275 | if (IS_ERR(xtal) || IS_ERR(hclk) || IS_ERR(fclk) || IS_ERR(armclk)) { | 275 | if (IS_ERR(xtal) || IS_ERR(hclk) || IS_ERR(fclk) || IS_ERR(armclk)) { |
276 | printk(KERN_ERR "%s: failed to get clocks\n", __func__); | 276 | pr_err("%s: failed to get clocks\n", __func__); |
277 | return -ENOENT; | 277 | return -ENOENT; |
278 | } | 278 | } |
279 | 279 | ||
diff --git a/drivers/cpufreq/s3c24xx-cpufreq-debugfs.c b/drivers/cpufreq/s3c24xx-cpufreq-debugfs.c index 9b7b4289d66c..8182608aeac1 100644 --- a/drivers/cpufreq/s3c24xx-cpufreq-debugfs.c +++ b/drivers/cpufreq/s3c24xx-cpufreq-debugfs.c | |||
@@ -178,7 +178,7 @@ static int __init s3c_freq_debugfs_init(void) | |||
178 | { | 178 | { |
179 | dbgfs_root = debugfs_create_dir("s3c-cpufreq", NULL); | 179 | dbgfs_root = debugfs_create_dir("s3c-cpufreq", NULL); |
180 | if (IS_ERR(dbgfs_root)) { | 180 | if (IS_ERR(dbgfs_root)) { |
181 | printk(KERN_ERR "%s: error creating debugfs root\n", __func__); | 181 | pr_err("%s: error creating debugfs root\n", __func__); |
182 | return PTR_ERR(dbgfs_root); | 182 | return PTR_ERR(dbgfs_root); |
183 | } | 183 | } |
184 | 184 | ||
diff --git a/drivers/cpufreq/s3c24xx-cpufreq.c b/drivers/cpufreq/s3c24xx-cpufreq.c index 68ef8fd9482f..68f883744500 100644 --- a/drivers/cpufreq/s3c24xx-cpufreq.c +++ b/drivers/cpufreq/s3c24xx-cpufreq.c | |||
@@ -175,7 +175,7 @@ static int s3c_cpufreq_settarget(struct cpufreq_policy *policy, | |||
175 | cpu_new.freq.fclk = cpu_new.pll.frequency; | 175 | cpu_new.freq.fclk = cpu_new.pll.frequency; |
176 | 176 | ||
177 | if (s3c_cpufreq_calcdivs(&cpu_new) < 0) { | 177 | if (s3c_cpufreq_calcdivs(&cpu_new) < 0) { |
178 | printk(KERN_ERR "no divisors for %d\n", target_freq); | 178 | pr_err("no divisors for %d\n", target_freq); |
179 | goto err_notpossible; | 179 | goto err_notpossible; |
180 | } | 180 | } |
181 | 181 | ||
@@ -187,7 +187,7 @@ static int s3c_cpufreq_settarget(struct cpufreq_policy *policy, | |||
187 | 187 | ||
188 | if (cpu_new.freq.hclk != cpu_cur.freq.hclk) { | 188 | if (cpu_new.freq.hclk != cpu_cur.freq.hclk) { |
189 | if (s3c_cpufreq_calcio(&cpu_new) < 0) { | 189 | if (s3c_cpufreq_calcio(&cpu_new) < 0) { |
190 | printk(KERN_ERR "%s: no IO timings\n", __func__); | 190 | pr_err("%s: no IO timings\n", __func__); |
191 | goto err_notpossible; | 191 | goto err_notpossible; |
192 | } | 192 | } |
193 | } | 193 | } |
@@ -262,7 +262,7 @@ static int s3c_cpufreq_settarget(struct cpufreq_policy *policy, | |||
262 | return 0; | 262 | return 0; |
263 | 263 | ||
264 | err_notpossible: | 264 | err_notpossible: |
265 | printk(KERN_ERR "no compatible settings for %d\n", target_freq); | 265 | pr_err("no compatible settings for %d\n", target_freq); |
266 | return -EINVAL; | 266 | return -EINVAL; |
267 | } | 267 | } |
268 | 268 | ||
@@ -331,7 +331,7 @@ static int s3c_cpufreq_target(struct cpufreq_policy *policy, | |||
331 | &index); | 331 | &index); |
332 | 332 | ||
333 | if (ret < 0) { | 333 | if (ret < 0) { |
334 | printk(KERN_ERR "%s: no PLL available\n", __func__); | 334 | pr_err("%s: no PLL available\n", __func__); |
335 | goto err_notpossible; | 335 | goto err_notpossible; |
336 | } | 336 | } |
337 | 337 | ||
@@ -346,7 +346,7 @@ static int s3c_cpufreq_target(struct cpufreq_policy *policy, | |||
346 | return s3c_cpufreq_settarget(policy, target_freq, pll); | 346 | return s3c_cpufreq_settarget(policy, target_freq, pll); |
347 | 347 | ||
348 | err_notpossible: | 348 | err_notpossible: |
349 | printk(KERN_ERR "no compatible settings for %d\n", target_freq); | 349 | pr_err("no compatible settings for %d\n", target_freq); |
350 | return -EINVAL; | 350 | return -EINVAL; |
351 | } | 351 | } |
352 | 352 | ||
@@ -356,7 +356,7 @@ struct clk *s3c_cpufreq_clk_get(struct device *dev, const char *name) | |||
356 | 356 | ||
357 | clk = clk_get(dev, name); | 357 | clk = clk_get(dev, name); |
358 | if (IS_ERR(clk)) | 358 | if (IS_ERR(clk)) |
359 | printk(KERN_ERR "cpufreq: failed to get clock '%s'\n", name); | 359 | pr_err("cpufreq: failed to get clock '%s'\n", name); |
360 | 360 | ||
361 | return clk; | 361 | return clk; |
362 | } | 362 | } |
@@ -378,15 +378,16 @@ static int __init s3c_cpufreq_initclks(void) | |||
378 | 378 | ||
379 | if (IS_ERR(clk_fclk) || IS_ERR(clk_hclk) || IS_ERR(clk_pclk) || | 379 | if (IS_ERR(clk_fclk) || IS_ERR(clk_hclk) || IS_ERR(clk_pclk) || |
380 | IS_ERR(_clk_mpll) || IS_ERR(clk_arm) || IS_ERR(_clk_xtal)) { | 380 | IS_ERR(_clk_mpll) || IS_ERR(clk_arm) || IS_ERR(_clk_xtal)) { |
381 | printk(KERN_ERR "%s: could not get clock(s)\n", __func__); | 381 | pr_err("%s: could not get clock(s)\n", __func__); |
382 | return -ENOENT; | 382 | return -ENOENT; |
383 | } | 383 | } |
384 | 384 | ||
385 | printk(KERN_INFO "%s: clocks f=%lu,h=%lu,p=%lu,a=%lu\n", __func__, | 385 | pr_info("%s: clocks f=%lu,h=%lu,p=%lu,a=%lu\n", |
386 | clk_get_rate(clk_fclk) / 1000, | 386 | __func__, |
387 | clk_get_rate(clk_hclk) / 1000, | 387 | clk_get_rate(clk_fclk) / 1000, |
388 | clk_get_rate(clk_pclk) / 1000, | 388 | clk_get_rate(clk_hclk) / 1000, |
389 | clk_get_rate(clk_arm) / 1000); | 389 | clk_get_rate(clk_pclk) / 1000, |
390 | clk_get_rate(clk_arm) / 1000); | ||
390 | 391 | ||
391 | return 0; | 392 | return 0; |
392 | } | 393 | } |
@@ -424,7 +425,7 @@ static int s3c_cpufreq_resume(struct cpufreq_policy *policy) | |||
424 | 425 | ||
425 | ret = s3c_cpufreq_settarget(NULL, suspend_freq, &suspend_pll); | 426 | ret = s3c_cpufreq_settarget(NULL, suspend_freq, &suspend_pll); |
426 | if (ret) { | 427 | if (ret) { |
427 | printk(KERN_ERR "%s: failed to reset pll/freq\n", __func__); | 428 | pr_err("%s: failed to reset pll/freq\n", __func__); |
428 | return ret; | 429 | return ret; |
429 | } | 430 | } |
430 | 431 | ||
@@ -449,13 +450,12 @@ static struct cpufreq_driver s3c24xx_driver = { | |||
449 | int s3c_cpufreq_register(struct s3c_cpufreq_info *info) | 450 | int s3c_cpufreq_register(struct s3c_cpufreq_info *info) |
450 | { | 451 | { |
451 | if (!info || !info->name) { | 452 | if (!info || !info->name) { |
452 | printk(KERN_ERR "%s: failed to pass valid information\n", | 453 | pr_err("%s: failed to pass valid information\n", __func__); |
453 | __func__); | ||
454 | return -EINVAL; | 454 | return -EINVAL; |
455 | } | 455 | } |
456 | 456 | ||
457 | printk(KERN_INFO "S3C24XX CPU Frequency driver, %s cpu support\n", | 457 | pr_info("S3C24XX CPU Frequency driver, %s cpu support\n", |
458 | info->name); | 458 | info->name); |
459 | 459 | ||
460 | /* check our driver info has valid data */ | 460 | /* check our driver info has valid data */ |
461 | 461 | ||
@@ -478,7 +478,7 @@ int __init s3c_cpufreq_setboard(struct s3c_cpufreq_board *board) | |||
478 | struct s3c_cpufreq_board *ours; | 478 | struct s3c_cpufreq_board *ours; |
479 | 479 | ||
480 | if (!board) { | 480 | if (!board) { |
481 | printk(KERN_INFO "%s: no board data\n", __func__); | 481 | pr_info("%s: no board data\n", __func__); |
482 | return -EINVAL; | 482 | return -EINVAL; |
483 | } | 483 | } |
484 | 484 | ||
@@ -487,7 +487,7 @@ int __init s3c_cpufreq_setboard(struct s3c_cpufreq_board *board) | |||
487 | 487 | ||
488 | ours = kzalloc(sizeof(*ours), GFP_KERNEL); | 488 | ours = kzalloc(sizeof(*ours), GFP_KERNEL); |
489 | if (ours == NULL) { | 489 | if (ours == NULL) { |
490 | printk(KERN_ERR "%s: no memory\n", __func__); | 490 | pr_err("%s: no memory\n", __func__); |
491 | return -ENOMEM; | 491 | return -ENOMEM; |
492 | } | 492 | } |
493 | 493 | ||
@@ -502,15 +502,15 @@ static int __init s3c_cpufreq_auto_io(void) | |||
502 | int ret; | 502 | int ret; |
503 | 503 | ||
504 | if (!cpu_cur.info->get_iotiming) { | 504 | if (!cpu_cur.info->get_iotiming) { |
505 | printk(KERN_ERR "%s: get_iotiming undefined\n", __func__); | 505 | pr_err("%s: get_iotiming undefined\n", __func__); |
506 | return -ENOENT; | 506 | return -ENOENT; |
507 | } | 507 | } |
508 | 508 | ||
509 | printk(KERN_INFO "%s: working out IO settings\n", __func__); | 509 | pr_info("%s: working out IO settings\n", __func__); |
510 | 510 | ||
511 | ret = (cpu_cur.info->get_iotiming)(&cpu_cur, &s3c24xx_iotiming); | 511 | ret = (cpu_cur.info->get_iotiming)(&cpu_cur, &s3c24xx_iotiming); |
512 | if (ret) | 512 | if (ret) |
513 | printk(KERN_ERR "%s: failed to get timings\n", __func__); | 513 | pr_err("%s: failed to get timings\n", __func__); |
514 | 514 | ||
515 | return ret; | 515 | return ret; |
516 | } | 516 | } |
@@ -561,7 +561,7 @@ static void s3c_cpufreq_update_loctkime(void) | |||
561 | val = calc_locktime(rate, cpu_cur.info->locktime_u) << bits; | 561 | val = calc_locktime(rate, cpu_cur.info->locktime_u) << bits; |
562 | val |= calc_locktime(rate, cpu_cur.info->locktime_m); | 562 | val |= calc_locktime(rate, cpu_cur.info->locktime_m); |
563 | 563 | ||
564 | printk(KERN_INFO "%s: new locktime is 0x%08x\n", __func__, val); | 564 | pr_info("%s: new locktime is 0x%08x\n", __func__, val); |
565 | __raw_writel(val, S3C2410_LOCKTIME); | 565 | __raw_writel(val, S3C2410_LOCKTIME); |
566 | } | 566 | } |
567 | 567 | ||
@@ -580,7 +580,7 @@ static int s3c_cpufreq_build_freq(void) | |||
580 | 580 | ||
581 | ftab = kzalloc(sizeof(*ftab) * size, GFP_KERNEL); | 581 | ftab = kzalloc(sizeof(*ftab) * size, GFP_KERNEL); |
582 | if (!ftab) { | 582 | if (!ftab) { |
583 | printk(KERN_ERR "%s: no memory for tables\n", __func__); | 583 | pr_err("%s: no memory for tables\n", __func__); |
584 | return -ENOMEM; | 584 | return -ENOMEM; |
585 | } | 585 | } |
586 | 586 | ||
@@ -608,15 +608,14 @@ static int __init s3c_cpufreq_initcall(void) | |||
608 | if (cpu_cur.board->auto_io) { | 608 | if (cpu_cur.board->auto_io) { |
609 | ret = s3c_cpufreq_auto_io(); | 609 | ret = s3c_cpufreq_auto_io(); |
610 | if (ret) { | 610 | if (ret) { |
611 | printk(KERN_ERR "%s: failed to get io timing\n", | 611 | pr_err("%s: failed to get io timing\n", |
612 | __func__); | 612 | __func__); |
613 | goto out; | 613 | goto out; |
614 | } | 614 | } |
615 | } | 615 | } |
616 | 616 | ||
617 | if (cpu_cur.board->need_io && !cpu_cur.info->set_iotiming) { | 617 | if (cpu_cur.board->need_io && !cpu_cur.info->set_iotiming) { |
618 | printk(KERN_ERR "%s: no IO support registered\n", | 618 | pr_err("%s: no IO support registered\n", __func__); |
619 | __func__); | ||
620 | ret = -EINVAL; | 619 | ret = -EINVAL; |
621 | goto out; | 620 | goto out; |
622 | } | 621 | } |
@@ -666,9 +665,9 @@ int s3c_plltab_register(struct cpufreq_frequency_table *plls, | |||
666 | vals += plls_no; | 665 | vals += plls_no; |
667 | vals->frequency = CPUFREQ_TABLE_END; | 666 | vals->frequency = CPUFREQ_TABLE_END; |
668 | 667 | ||
669 | printk(KERN_INFO "cpufreq: %d PLL entries\n", plls_no); | 668 | pr_info("cpufreq: %d PLL entries\n", plls_no); |
670 | } else | 669 | } else |
671 | printk(KERN_ERR "cpufreq: no memory for PLL tables\n"); | 670 | pr_err("cpufreq: no memory for PLL tables\n"); |
672 | 671 | ||
673 | return vals ? 0 : -ENOMEM; | 672 | return vals ? 0 : -ENOMEM; |
674 | } | 673 | } |
diff --git a/drivers/cpufreq/s5pv210-cpufreq.c b/drivers/cpufreq/s5pv210-cpufreq.c index a145b319d171..344e584412ed 100644 --- a/drivers/cpufreq/s5pv210-cpufreq.c +++ b/drivers/cpufreq/s5pv210-cpufreq.c | |||
@@ -205,7 +205,7 @@ static void s5pv210_set_refresh(enum s5pv210_dmc_port ch, unsigned long freq) | |||
205 | } else if (ch == DMC1) { | 205 | } else if (ch == DMC1) { |
206 | reg = (dmc_base[1] + 0x30); | 206 | reg = (dmc_base[1] + 0x30); |
207 | } else { | 207 | } else { |
208 | printk(KERN_ERR "Cannot find DMC port\n"); | 208 | pr_err("Cannot find DMC port\n"); |
209 | return; | 209 | return; |
210 | } | 210 | } |
211 | 211 | ||
@@ -534,7 +534,7 @@ static int s5pv210_cpu_init(struct cpufreq_policy *policy) | |||
534 | mem_type = check_mem_type(dmc_base[0]); | 534 | mem_type = check_mem_type(dmc_base[0]); |
535 | 535 | ||
536 | if ((mem_type != LPDDR) && (mem_type != LPDDR2)) { | 536 | if ((mem_type != LPDDR) && (mem_type != LPDDR2)) { |
537 | printk(KERN_ERR "CPUFreq doesn't support this memory type\n"); | 537 | pr_err("CPUFreq doesn't support this memory type\n"); |
538 | ret = -EINVAL; | 538 | ret = -EINVAL; |
539 | goto out_dmc1; | 539 | goto out_dmc1; |
540 | } | 540 | } |
diff --git a/drivers/cpufreq/sc520_freq.c b/drivers/cpufreq/sc520_freq.c index ac84e4818014..57bbddf55786 100644 --- a/drivers/cpufreq/sc520_freq.c +++ b/drivers/cpufreq/sc520_freq.c | |||
@@ -44,8 +44,8 @@ static unsigned int sc520_freq_get_cpu_frequency(unsigned int cpu) | |||
44 | 44 | ||
45 | switch (clockspeed_reg & 0x03) { | 45 | switch (clockspeed_reg & 0x03) { |
46 | default: | 46 | default: |
47 | printk(KERN_ERR PFX "error: cpuctl register has unexpected " | 47 | pr_err(PFX "error: cpuctl register has unexpected value %02x\n", |
48 | "value %02x\n", clockspeed_reg); | 48 | clockspeed_reg); |
49 | case 0x01: | 49 | case 0x01: |
50 | return 100000; | 50 | return 100000; |
51 | case 0x02: | 51 | case 0x02: |
@@ -112,7 +112,7 @@ static int __init sc520_freq_init(void) | |||
112 | 112 | ||
113 | cpuctl = ioremap((unsigned long)(MMCR_BASE + OFFS_CPUCTL), 1); | 113 | cpuctl = ioremap((unsigned long)(MMCR_BASE + OFFS_CPUCTL), 1); |
114 | if (!cpuctl) { | 114 | if (!cpuctl) { |
115 | printk(KERN_ERR "sc520_freq: error: failed to remap memory\n"); | 115 | pr_err("sc520_freq: error: failed to remap memory\n"); |
116 | return -ENOMEM; | 116 | return -ENOMEM; |
117 | } | 117 | } |
118 | 118 | ||
diff --git a/drivers/cpufreq/speedstep-centrino.c b/drivers/cpufreq/speedstep-centrino.c index 7d4a31571608..47df2d649b78 100644 --- a/drivers/cpufreq/speedstep-centrino.c +++ b/drivers/cpufreq/speedstep-centrino.c | |||
@@ -386,8 +386,7 @@ static int centrino_cpu_init(struct cpufreq_policy *policy) | |||
386 | /* check to see if it stuck */ | 386 | /* check to see if it stuck */ |
387 | rdmsr(MSR_IA32_MISC_ENABLE, l, h); | 387 | rdmsr(MSR_IA32_MISC_ENABLE, l, h); |
388 | if (!(l & MSR_IA32_MISC_ENABLE_ENHANCED_SPEEDSTEP)) { | 388 | if (!(l & MSR_IA32_MISC_ENABLE_ENHANCED_SPEEDSTEP)) { |
389 | printk(KERN_INFO PFX | 389 | pr_info(PFX "couldn't enable Enhanced SpeedStep\n"); |
390 | "couldn't enable Enhanced SpeedStep\n"); | ||
391 | return -ENODEV; | 390 | return -ENODEV; |
392 | } | 391 | } |
393 | } | 392 | } |
diff --git a/drivers/cpufreq/speedstep-ich.c b/drivers/cpufreq/speedstep-ich.c index 37555c6b86a7..9d00c226a6aa 100644 --- a/drivers/cpufreq/speedstep-ich.c +++ b/drivers/cpufreq/speedstep-ich.c | |||
@@ -68,13 +68,13 @@ static int speedstep_find_register(void) | |||
68 | /* get PMBASE */ | 68 | /* get PMBASE */ |
69 | pci_read_config_dword(speedstep_chipset_dev, 0x40, &pmbase); | 69 | pci_read_config_dword(speedstep_chipset_dev, 0x40, &pmbase); |
70 | if (!(pmbase & 0x01)) { | 70 | if (!(pmbase & 0x01)) { |
71 | printk(KERN_ERR "speedstep-ich: could not find speedstep register\n"); | 71 | pr_err("speedstep-ich: could not find speedstep register\n"); |
72 | return -ENODEV; | 72 | return -ENODEV; |
73 | } | 73 | } |
74 | 74 | ||
75 | pmbase &= 0xFFFFFFFE; | 75 | pmbase &= 0xFFFFFFFE; |
76 | if (!pmbase) { | 76 | if (!pmbase) { |
77 | printk(KERN_ERR "speedstep-ich: could not find speedstep register\n"); | 77 | pr_err("speedstep-ich: could not find speedstep register\n"); |
78 | return -ENODEV; | 78 | return -ENODEV; |
79 | } | 79 | } |
80 | 80 | ||
@@ -136,7 +136,7 @@ static void speedstep_set_state(unsigned int state) | |||
136 | pr_debug("change to %u MHz succeeded\n", | 136 | pr_debug("change to %u MHz succeeded\n", |
137 | speedstep_get_frequency(speedstep_processor) / 1000); | 137 | speedstep_get_frequency(speedstep_processor) / 1000); |
138 | else | 138 | else |
139 | printk(KERN_ERR "cpufreq: change failed - I/O error\n"); | 139 | pr_err("cpufreq: change failed - I/O error\n"); |
140 | 140 | ||
141 | return; | 141 | return; |
142 | } | 142 | } |
diff --git a/drivers/cpufreq/speedstep-lib.c b/drivers/cpufreq/speedstep-lib.c index 15d3214aaa00..32bdf1df9517 100644 --- a/drivers/cpufreq/speedstep-lib.c +++ b/drivers/cpufreq/speedstep-lib.c | |||
@@ -153,7 +153,7 @@ static unsigned int pentium_core_get_frequency(void) | |||
153 | fsb = 333333; | 153 | fsb = 333333; |
154 | break; | 154 | break; |
155 | default: | 155 | default: |
156 | printk(KERN_ERR "PCORE - MSR_FSB_FREQ undefined value"); | 156 | pr_err("PCORE - MSR_FSB_FREQ undefined value\n"); |
157 | } | 157 | } |
158 | 158 | ||
159 | rdmsr(MSR_IA32_EBL_CR_POWERON, msr_lo, msr_tmp); | 159 | rdmsr(MSR_IA32_EBL_CR_POWERON, msr_lo, msr_tmp); |
@@ -453,11 +453,8 @@ unsigned int speedstep_get_freqs(enum speedstep_processor processor, | |||
453 | */ | 453 | */ |
454 | if (*transition_latency > 10000000 || | 454 | if (*transition_latency > 10000000 || |
455 | *transition_latency < 50000) { | 455 | *transition_latency < 50000) { |
456 | printk(KERN_WARNING PFX "frequency transition " | 456 | pr_warn(PFX "frequency transition measured seems out of range (%u nSec), falling back to a safe one of %u nSec\n", |
457 | "measured seems out of range (%u " | 457 | *transition_latency, 500000); |
458 | "nSec), falling back to a safe one of" | ||
459 | "%u nSec.\n", | ||
460 | *transition_latency, 500000); | ||
461 | *transition_latency = 500000; | 458 | *transition_latency = 500000; |
462 | } | 459 | } |
463 | } | 460 | } |
diff --git a/drivers/cpufreq/speedstep-smi.c b/drivers/cpufreq/speedstep-smi.c index 819229e824fb..af32a5f38806 100644 --- a/drivers/cpufreq/speedstep-smi.c +++ b/drivers/cpufreq/speedstep-smi.c | |||
@@ -204,9 +204,8 @@ static void speedstep_set_state(unsigned int state) | |||
204 | (speedstep_freqs[new_state].frequency / 1000), | 204 | (speedstep_freqs[new_state].frequency / 1000), |
205 | retry, result); | 205 | retry, result); |
206 | else | 206 | else |
207 | printk(KERN_ERR "cpufreq: change to state %u " | 207 | pr_err("cpufreq: change to state %u failed with new_state %u and result %u\n", |
208 | "failed with new_state %u and result %u\n", | 208 | state, new_state, result); |
209 | state, new_state, result); | ||
210 | 209 | ||
211 | return; | 210 | return; |
212 | } | 211 | } |