diff options
25 files changed, 181 insertions, 146 deletions
diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c index ed9e93df7ecf..67a612e22179 100644 --- a/drivers/cpufreq/acpi-cpufreq.c +++ b/drivers/cpufreq/acpi-cpufreq.c | |||
@@ -25,6 +25,8 @@ | |||
25 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 25 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
29 | |||
28 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
29 | #include <linux/module.h> | 31 | #include <linux/module.h> |
30 | #include <linux/init.h> | 32 | #include <linux/init.h> |
@@ -50,8 +52,6 @@ MODULE_AUTHOR("Paul Diefenbaugh, Dominik Brodowski"); | |||
50 | MODULE_DESCRIPTION("ACPI Processor P-States Driver"); | 52 | MODULE_DESCRIPTION("ACPI Processor P-States Driver"); |
51 | MODULE_LICENSE("GPL"); | 53 | MODULE_LICENSE("GPL"); |
52 | 54 | ||
53 | #define PFX "acpi-cpufreq: " | ||
54 | |||
55 | enum { | 55 | enum { |
56 | UNDEFINED_CAPABLE = 0, | 56 | UNDEFINED_CAPABLE = 0, |
57 | SYSTEM_INTEL_MSR_CAPABLE, | 57 | SYSTEM_INTEL_MSR_CAPABLE, |
@@ -648,7 +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 | pr_info("acpi-cpufreq: Intel(R) Xeon(R) 7100 Errata AL30, processors may lock up on frequency changes: disabling acpi-cpufreq\n"); | 651 | pr_info("Intel(R) Xeon(R) 7100 Errata AL30, processors may lock up on frequency changes: disabling acpi-cpufreq\n"); |
652 | return -ENODEV; | 652 | return -ENODEV; |
653 | } | 653 | } |
654 | } | 654 | } |
@@ -724,7 +724,7 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
724 | cpumask_copy(data->freqdomain_cpus, | 724 | cpumask_copy(data->freqdomain_cpus, |
725 | topology_sibling_cpumask(cpu)); | 725 | topology_sibling_cpumask(cpu)); |
726 | policy->shared_type = CPUFREQ_SHARED_TYPE_HW; | 726 | policy->shared_type = CPUFREQ_SHARED_TYPE_HW; |
727 | pr_info_once(PFX "overriding BIOS provided _PSD data\n"); | 727 | pr_info_once("overriding BIOS provided _PSD data\n"); |
728 | } | 728 | } |
729 | #endif | 729 | #endif |
730 | 730 | ||
diff --git a/drivers/cpufreq/cpufreq-nforce2.c b/drivers/cpufreq/cpufreq-nforce2.c index 7da96d536ac9..5503d491b016 100644 --- a/drivers/cpufreq/cpufreq-nforce2.c +++ b/drivers/cpufreq/cpufreq-nforce2.c | |||
@@ -7,6 +7,8 @@ | |||
7 | * BIG FAT DISCLAIMER: Work in progress code. Possibly *dangerous* | 7 | * BIG FAT DISCLAIMER: Work in progress code. Possibly *dangerous* |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
11 | |||
10 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
11 | #include <linux/module.h> | 13 | #include <linux/module.h> |
12 | #include <linux/moduleparam.h> | 14 | #include <linux/moduleparam.h> |
@@ -56,8 +58,6 @@ MODULE_PARM_DESC(fid, "CPU multiplier to use (11.5 = 115)"); | |||
56 | MODULE_PARM_DESC(min_fsb, | 58 | MODULE_PARM_DESC(min_fsb, |
57 | "Minimum FSB to use, if not defined: current FSB - 50"); | 59 | "Minimum FSB to use, if not defined: current FSB - 50"); |
58 | 60 | ||
59 | #define PFX "cpufreq-nforce2: " | ||
60 | |||
61 | /** | 61 | /** |
62 | * nforce2_calc_fsb - calculate FSB | 62 | * nforce2_calc_fsb - calculate FSB |
63 | * @pll: PLL value | 63 | * @pll: PLL value |
@@ -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 | pr_err(PFX "FSB %d is out of range!\n", fsb); | 177 | pr_err("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 | pr_err(PFX "Error while reading the FSB\n"); | 183 | pr_err("Error while reading the FSB\n"); |
184 | return -EINVAL; | 184 | return -EINVAL; |
185 | } | 185 | } |
186 | 186 | ||
@@ -276,7 +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 | pr_err(PFX "Changing FSB to %d failed\n", target_fsb); | 279 | pr_err("Changing FSB to %d failed\n", target_fsb); |
280 | else | 280 | else |
281 | pr_debug("Changed FSB successfully to %d\n", | 281 | pr_debug("Changed FSB successfully to %d\n", |
282 | target_fsb); | 282 | target_fsb); |
@@ -324,7 +324,7 @@ static int nforce2_cpu_init(struct cpufreq_policy *policy) | |||
324 | /* FIX: Get FID from CPU */ | 324 | /* FIX: Get FID from CPU */ |
325 | if (!fid) { | 325 | if (!fid) { |
326 | if (!cpu_khz) { | 326 | if (!cpu_khz) { |
327 | pr_warn(PFX "cpu_khz not set, can't calculate multiplier!\n"); | 327 | pr_warn("cpu_khz not set, can't calculate multiplier!\n"); |
328 | return -ENODEV; | 328 | return -ENODEV; |
329 | } | 329 | } |
330 | 330 | ||
@@ -339,7 +339,7 @@ static int nforce2_cpu_init(struct cpufreq_policy *policy) | |||
339 | } | 339 | } |
340 | } | 340 | } |
341 | 341 | ||
342 | pr_info(PFX "FSB currently at %i MHz, FID %d.%d\n", | 342 | pr_info("FSB currently at %i MHz, FID %d.%d\n", |
343 | fsb, fid / 10, fid % 10); | 343 | fsb, fid / 10, fid % 10); |
344 | 344 | ||
345 | /* Set maximum FSB to FSB at boot time */ | 345 | /* Set maximum FSB to FSB at boot time */ |
@@ -399,9 +399,9 @@ static int nforce2_detect_chipset(void) | |||
399 | if (nforce2_dev == NULL) | 399 | if (nforce2_dev == NULL) |
400 | return -ENODEV; | 400 | return -ENODEV; |
401 | 401 | ||
402 | pr_info(PFX "Detected nForce2 chipset revision %X\n", | 402 | pr_info("Detected nForce2 chipset revision %X\n", |
403 | nforce2_dev->revision); | 403 | nforce2_dev->revision); |
404 | pr_info(PFX "FSB changing is maybe unstable and can lead to crashes and data loss\n"); | 404 | pr_info("FSB changing is maybe unstable and can lead to crashes and data loss\n"); |
405 | 405 | ||
406 | return 0; | 406 | return 0; |
407 | } | 407 | } |
@@ -419,7 +419,7 @@ static int __init nforce2_init(void) | |||
419 | 419 | ||
420 | /* detect chipset */ | 420 | /* detect chipset */ |
421 | if (nforce2_detect_chipset()) { | 421 | if (nforce2_detect_chipset()) { |
422 | pr_info(PFX "No nForce2 chipset\n"); | 422 | pr_info("No nForce2 chipset\n"); |
423 | return -ENODEV; | 423 | return -ENODEV; |
424 | } | 424 | } |
425 | 425 | ||
diff --git a/drivers/cpufreq/e_powersaver.c b/drivers/cpufreq/e_powersaver.c index c420f0cb46a7..5ec87e3a97bd 100644 --- a/drivers/cpufreq/e_powersaver.c +++ b/drivers/cpufreq/e_powersaver.c | |||
@@ -6,6 +6,8 @@ | |||
6 | * BIG FAT DISCLAIMER: Work in progress code. Possibly *dangerous* | 6 | * BIG FAT DISCLAIMER: Work in progress code. Possibly *dangerous* |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
10 | |||
9 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
10 | #include <linux/module.h> | 12 | #include <linux/module.h> |
11 | #include <linux/init.h> | 13 | #include <linux/init.h> |
@@ -141,9 +143,9 @@ static int eps_set_state(struct eps_cpu_data *centaur, | |||
141 | /* Print voltage and multiplier */ | 143 | /* Print voltage and multiplier */ |
142 | rdmsr(MSR_IA32_PERF_STATUS, lo, hi); | 144 | rdmsr(MSR_IA32_PERF_STATUS, lo, hi); |
143 | current_voltage = lo & 0xff; | 145 | current_voltage = lo & 0xff; |
144 | pr_info("eps: Current voltage = %dmV\n", current_voltage * 16 + 700); | 146 | pr_info("Current voltage = %dmV\n", current_voltage * 16 + 700); |
145 | current_multiplier = (lo >> 8) & 0xff; | 147 | current_multiplier = (lo >> 8) & 0xff; |
146 | pr_info("eps: Current multiplier = %d\n", current_multiplier); | 148 | pr_info("Current multiplier = %d\n", current_multiplier); |
147 | } | 149 | } |
148 | #endif | 150 | #endif |
149 | return 0; | 151 | return 0; |
@@ -164,7 +166,7 @@ static int eps_target(struct cpufreq_policy *policy, unsigned int index) | |||
164 | dest_state = centaur->freq_table[index].driver_data & 0xffff; | 166 | dest_state = centaur->freq_table[index].driver_data & 0xffff; |
165 | ret = eps_set_state(centaur, policy, dest_state); | 167 | ret = eps_set_state(centaur, policy, dest_state); |
166 | if (ret) | 168 | if (ret) |
167 | pr_err("eps: Timeout!\n"); | 169 | pr_err("Timeout!\n"); |
168 | return ret; | 170 | return ret; |
169 | } | 171 | } |
170 | 172 | ||
@@ -192,7 +194,7 @@ static int eps_cpu_init(struct cpufreq_policy *policy) | |||
192 | return -ENODEV; | 194 | return -ENODEV; |
193 | 195 | ||
194 | /* Check brand */ | 196 | /* Check brand */ |
195 | pr_info("eps: Detected VIA "); | 197 | pr_info("Detected VIA "); |
196 | 198 | ||
197 | switch (c->x86_model) { | 199 | switch (c->x86_model) { |
198 | case 10: | 200 | case 10: |
@@ -233,7 +235,7 @@ static int eps_cpu_init(struct cpufreq_policy *policy) | |||
233 | /* Can be locked at 0 */ | 235 | /* Can be locked at 0 */ |
234 | rdmsrl(MSR_IA32_MISC_ENABLE, val); | 236 | rdmsrl(MSR_IA32_MISC_ENABLE, val); |
235 | if (!(val & MSR_IA32_MISC_ENABLE_ENHANCED_SPEEDSTEP)) { | 237 | if (!(val & MSR_IA32_MISC_ENABLE_ENHANCED_SPEEDSTEP)) { |
236 | pr_info("eps: Can't enable Enhanced PowerSaver\n"); | 238 | pr_info("Can't enable Enhanced PowerSaver\n"); |
237 | return -ENODEV; | 239 | return -ENODEV; |
238 | } | 240 | } |
239 | } | 241 | } |
@@ -241,19 +243,19 @@ static int eps_cpu_init(struct cpufreq_policy *policy) | |||
241 | /* Print voltage and multiplier */ | 243 | /* Print voltage and multiplier */ |
242 | rdmsr(MSR_IA32_PERF_STATUS, lo, hi); | 244 | rdmsr(MSR_IA32_PERF_STATUS, lo, hi); |
243 | current_voltage = lo & 0xff; | 245 | current_voltage = lo & 0xff; |
244 | pr_info("eps: Current voltage = %dmV\n", current_voltage * 16 + 700); | 246 | pr_info("Current voltage = %dmV\n", current_voltage * 16 + 700); |
245 | current_multiplier = (lo >> 8) & 0xff; | 247 | current_multiplier = (lo >> 8) & 0xff; |
246 | pr_info("eps: Current multiplier = %d\n", current_multiplier); | 248 | pr_info("Current multiplier = %d\n", current_multiplier); |
247 | 249 | ||
248 | /* Print limits */ | 250 | /* Print limits */ |
249 | max_voltage = hi & 0xff; | 251 | max_voltage = hi & 0xff; |
250 | pr_info("eps: Highest voltage = %dmV\n", max_voltage * 16 + 700); | 252 | pr_info("Highest voltage = %dmV\n", max_voltage * 16 + 700); |
251 | max_multiplier = (hi >> 8) & 0xff; | 253 | max_multiplier = (hi >> 8) & 0xff; |
252 | pr_info("eps: Highest multiplier = %d\n", max_multiplier); | 254 | pr_info("Highest multiplier = %d\n", max_multiplier); |
253 | min_voltage = (hi >> 16) & 0xff; | 255 | min_voltage = (hi >> 16) & 0xff; |
254 | pr_info("eps: Lowest voltage = %dmV\n", min_voltage * 16 + 700); | 256 | pr_info("Lowest voltage = %dmV\n", min_voltage * 16 + 700); |
255 | min_multiplier = (hi >> 24) & 0xff; | 257 | min_multiplier = (hi >> 24) & 0xff; |
256 | pr_info("eps: Lowest multiplier = %d\n", min_multiplier); | 258 | pr_info("Lowest multiplier = %d\n", min_multiplier); |
257 | 259 | ||
258 | /* Sanity checks */ | 260 | /* Sanity checks */ |
259 | if (current_multiplier == 0 || max_multiplier == 0 | 261 | if (current_multiplier == 0 || max_multiplier == 0 |
@@ -271,13 +273,13 @@ static int eps_cpu_init(struct cpufreq_policy *policy) | |||
271 | 273 | ||
272 | /* Check for systems using underclocked CPU */ | 274 | /* Check for systems using underclocked CPU */ |
273 | if (!freq_failsafe_off && max_multiplier != current_multiplier) { | 275 | if (!freq_failsafe_off && max_multiplier != current_multiplier) { |
274 | pr_info("eps: Your processor is running at different frequency then its maximum. Aborting.\n"); | 276 | pr_info("Your processor is running at different frequency then its maximum. Aborting.\n"); |
275 | pr_info("eps: You can use freq_failsafe_off option to disable this check.\n"); | 277 | pr_info("You can use freq_failsafe_off option to disable this check.\n"); |
276 | return -EINVAL; | 278 | return -EINVAL; |
277 | } | 279 | } |
278 | if (!voltage_failsafe_off && max_voltage != current_voltage) { | 280 | if (!voltage_failsafe_off && max_voltage != current_voltage) { |
279 | pr_info("eps: Your processor is running at different voltage then its maximum. Aborting.\n"); | 281 | pr_info("Your processor is running at different voltage then its maximum. Aborting.\n"); |
280 | pr_info("eps: You can use voltage_failsafe_off option to disable this check.\n"); | 282 | pr_info("You can use voltage_failsafe_off option to disable this check.\n"); |
281 | return -EINVAL; | 283 | return -EINVAL; |
282 | } | 284 | } |
283 | 285 | ||
@@ -288,13 +290,13 @@ static int eps_cpu_init(struct cpufreq_policy *policy) | |||
288 | /* Check for ACPI processor speed limit */ | 290 | /* Check for ACPI processor speed limit */ |
289 | if (!ignore_acpi_limit && !eps_acpi_init()) { | 291 | if (!ignore_acpi_limit && !eps_acpi_init()) { |
290 | if (!acpi_processor_get_bios_limit(policy->cpu, &limit)) { | 292 | if (!acpi_processor_get_bios_limit(policy->cpu, &limit)) { |
291 | pr_info("eps: ACPI limit %u.%uGHz\n", | 293 | pr_info("ACPI limit %u.%uGHz\n", |
292 | limit/1000000, | 294 | limit/1000000, |
293 | (limit%1000000)/10000); | 295 | (limit%1000000)/10000); |
294 | eps_acpi_exit(policy); | 296 | eps_acpi_exit(policy); |
295 | /* Check if max_multiplier is in BIOS limits */ | 297 | /* Check if max_multiplier is in BIOS limits */ |
296 | if (limit && max_multiplier * fsb > limit) { | 298 | if (limit && max_multiplier * fsb > limit) { |
297 | pr_info("eps: Aborting\n"); | 299 | pr_info("Aborting\n"); |
298 | return -EINVAL; | 300 | return -EINVAL; |
299 | } | 301 | } |
300 | } | 302 | } |
@@ -310,7 +312,7 @@ static int eps_cpu_init(struct cpufreq_policy *policy) | |||
310 | v = (set_max_voltage - 700) / 16; | 312 | v = (set_max_voltage - 700) / 16; |
311 | /* Check if voltage is within limits */ | 313 | /* Check if voltage is within limits */ |
312 | if (v >= min_voltage && v <= max_voltage) { | 314 | if (v >= min_voltage && v <= max_voltage) { |
313 | pr_info("eps: Setting %dmV as maximum\n", v * 16 + 700); | 315 | pr_info("Setting %dmV as maximum\n", v * 16 + 700); |
314 | max_voltage = v; | 316 | max_voltage = v; |
315 | } | 317 | } |
316 | } | 318 | } |
diff --git a/drivers/cpufreq/elanfreq.c b/drivers/cpufreq/elanfreq.c index 8f4dded3016f..bfce11cba1df 100644 --- a/drivers/cpufreq/elanfreq.c +++ b/drivers/cpufreq/elanfreq.c | |||
@@ -16,6 +16,8 @@ | |||
16 | * | 16 | * |
17 | */ | 17 | */ |
18 | 18 | ||
19 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
20 | |||
19 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
20 | #include <linux/module.h> | 22 | #include <linux/module.h> |
21 | #include <linux/init.h> | 23 | #include <linux/init.h> |
diff --git a/drivers/cpufreq/ia64-acpi-cpufreq.c b/drivers/cpufreq/ia64-acpi-cpufreq.c index fd36d6cd3787..759612da4fdc 100644 --- a/drivers/cpufreq/ia64-acpi-cpufreq.c +++ b/drivers/cpufreq/ia64-acpi-cpufreq.c | |||
@@ -8,6 +8,8 @@ | |||
8 | * Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> | 8 | * Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
12 | |||
11 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
12 | #include <linux/slab.h> | 14 | #include <linux/slab.h> |
13 | #include <linux/module.h> | 15 | #include <linux/module.h> |
@@ -290,8 +292,7 @@ acpi_cpufreq_cpu_init ( | |||
290 | /* notify BIOS that we exist */ | 292 | /* notify BIOS that we exist */ |
291 | acpi_processor_notify_smm(THIS_MODULE); | 293 | acpi_processor_notify_smm(THIS_MODULE); |
292 | 294 | ||
293 | pr_info("acpi-cpufreq: CPU%u - ACPI performance management activated\n", | 295 | pr_info("CPU%u - ACPI performance management activated\n", cpu); |
294 | cpu); | ||
295 | 296 | ||
296 | for (i = 0; i < data->acpi_data.state_count; i++) | 297 | for (i = 0; i < data->acpi_data.state_count; i++) |
297 | pr_debug(" %cP%d: %d MHz, %d mW, %d uS, %d uS, 0x%x 0x%x\n", | 298 | 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 2baeb8c01474..beae5cf5c62c 100644 --- a/drivers/cpufreq/longhaul.c +++ b/drivers/cpufreq/longhaul.c | |||
@@ -21,6 +21,8 @@ | |||
21 | * BIG FAT DISCLAIMER: Work in progress code. Possibly *dangerous* | 21 | * BIG FAT DISCLAIMER: Work in progress code. Possibly *dangerous* |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
25 | |||
24 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
25 | #include <linux/module.h> | 27 | #include <linux/module.h> |
26 | #include <linux/moduleparam.h> | 28 | #include <linux/moduleparam.h> |
@@ -40,8 +42,6 @@ | |||
40 | 42 | ||
41 | #include "longhaul.h" | 43 | #include "longhaul.h" |
42 | 44 | ||
43 | #define PFX "longhaul: " | ||
44 | |||
45 | #define TYPE_LONGHAUL_V1 1 | 45 | #define TYPE_LONGHAUL_V1 1 |
46 | #define TYPE_LONGHAUL_V2 2 | 46 | #define TYPE_LONGHAUL_V2 2 |
47 | #define TYPE_POWERSAVER 3 | 47 | #define TYPE_POWERSAVER 3 |
@@ -347,13 +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 | pr_info(PFX "Failed to set requested frequency!\n"); | 350 | pr_info("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 | pr_info(PFX "Enabling \"Ignore Revision ID\" option\n"); | 356 | pr_info("Enabling \"Ignore Revision ID\" option\n"); |
357 | revid_errata = 1; | 357 | revid_errata = 1; |
358 | msleep(200); | 358 | msleep(200); |
359 | goto retry_loop; | 359 | goto retry_loop; |
@@ -363,10 +363,10 @@ retry_loop: | |||
363 | * but it doesn't change frequency. I tried poking various | 363 | * but it doesn't change frequency. I tried poking various |
364 | * bits in northbridge registers, but without success. */ | 364 | * bits in northbridge registers, but without success. */ |
365 | if (longhaul_flags & USE_ACPI_C3) { | 365 | if (longhaul_flags & USE_ACPI_C3) { |
366 | pr_info(PFX "Disabling ACPI C3 support\n"); | 366 | pr_info("Disabling ACPI C3 support\n"); |
367 | longhaul_flags &= ~USE_ACPI_C3; | 367 | longhaul_flags &= ~USE_ACPI_C3; |
368 | if (revid_errata) { | 368 | if (revid_errata) { |
369 | pr_info(PFX "Disabling \"Ignore Revision ID\" option\n"); | 369 | pr_info("Disabling \"Ignore Revision ID\" option\n"); |
370 | revid_errata = 0; | 370 | revid_errata = 0; |
371 | } | 371 | } |
372 | msleep(200); | 372 | msleep(200); |
@@ -377,7 +377,7 @@ retry_loop: | |||
377 | * RevID = 1. RevID errata will make things right. Just | 377 | * RevID = 1. RevID errata will make things right. Just |
378 | * to be 100% sure. */ | 378 | * to be 100% sure. */ |
379 | if (longhaul_version == TYPE_LONGHAUL_V2) { | 379 | if (longhaul_version == TYPE_LONGHAUL_V2) { |
380 | pr_info(PFX "Switching to Longhaul ver. 1\n"); | 380 | pr_info("Switching to Longhaul ver. 1\n"); |
381 | longhaul_version = TYPE_LONGHAUL_V1; | 381 | longhaul_version = TYPE_LONGHAUL_V1; |
382 | msleep(200); | 382 | msleep(200); |
383 | goto retry_loop; | 383 | goto retry_loop; |
@@ -385,7 +385,7 @@ retry_loop: | |||
385 | } | 385 | } |
386 | 386 | ||
387 | if (!bm_timeout) { | 387 | if (!bm_timeout) { |
388 | pr_info(PFX "Warning: Timeout while waiting for idle PCI bus\n"); | 388 | pr_info("Warning: Timeout while waiting for idle PCI bus\n"); |
389 | return -EBUSY; | 389 | return -EBUSY; |
390 | } | 390 | } |
391 | 391 | ||
@@ -430,12 +430,12 @@ static int longhaul_get_ranges(void) | |||
430 | /* Get current frequency */ | 430 | /* Get current frequency */ |
431 | mult = longhaul_get_cpu_mult(); | 431 | mult = longhaul_get_cpu_mult(); |
432 | if (mult == -1) { | 432 | if (mult == -1) { |
433 | pr_info(PFX "Invalid (reserved) multiplier!\n"); | 433 | pr_info("Invalid (reserved) multiplier!\n"); |
434 | return -EINVAL; | 434 | return -EINVAL; |
435 | } | 435 | } |
436 | fsb = guess_fsb(mult); | 436 | fsb = guess_fsb(mult); |
437 | if (fsb == 0) { | 437 | if (fsb == 0) { |
438 | pr_info(PFX "Invalid (reserved) FSB!\n"); | 438 | pr_info("Invalid (reserved) FSB!\n"); |
439 | return -EINVAL; | 439 | return -EINVAL; |
440 | } | 440 | } |
441 | /* Get max multiplier - as we always did. | 441 | /* Get max multiplier - as we always did. |
@@ -465,11 +465,11 @@ static int longhaul_get_ranges(void) | |||
465 | print_speed(highest_speed/1000)); | 465 | print_speed(highest_speed/1000)); |
466 | 466 | ||
467 | if (lowest_speed == highest_speed) { | 467 | if (lowest_speed == highest_speed) { |
468 | pr_info(PFX "highestspeed == lowest, aborting\n"); | 468 | pr_info("highestspeed == lowest, aborting\n"); |
469 | return -EINVAL; | 469 | return -EINVAL; |
470 | } | 470 | } |
471 | if (lowest_speed > highest_speed) { | 471 | if (lowest_speed > highest_speed) { |
472 | pr_info(PFX "nonsense! lowest (%d > %d) !\n", | 472 | pr_info("nonsense! lowest (%d > %d) !\n", |
473 | lowest_speed, highest_speed); | 473 | lowest_speed, highest_speed); |
474 | return -EINVAL; | 474 | return -EINVAL; |
475 | } | 475 | } |
@@ -535,16 +535,16 @@ static void longhaul_setup_voltagescaling(void) | |||
535 | 535 | ||
536 | rdmsrl(MSR_VIA_LONGHAUL, longhaul.val); | 536 | rdmsrl(MSR_VIA_LONGHAUL, longhaul.val); |
537 | if (!(longhaul.bits.RevisionID & 1)) { | 537 | if (!(longhaul.bits.RevisionID & 1)) { |
538 | pr_info(PFX "Voltage scaling not supported by CPU\n"); | 538 | pr_info("Voltage scaling not supported by CPU\n"); |
539 | return; | 539 | return; |
540 | } | 540 | } |
541 | 541 | ||
542 | if (!longhaul.bits.VRMRev) { | 542 | if (!longhaul.bits.VRMRev) { |
543 | pr_info(PFX "VRM 8.5\n"); | 543 | pr_info("VRM 8.5\n"); |
544 | vrm_mV_table = &vrm85_mV[0]; | 544 | vrm_mV_table = &vrm85_mV[0]; |
545 | mV_vrm_table = &mV_vrm85[0]; | 545 | mV_vrm_table = &mV_vrm85[0]; |
546 | } else { | 546 | } else { |
547 | pr_info(PFX "Mobile VRM\n"); | 547 | pr_info("Mobile VRM\n"); |
548 | if (cpu_model < CPU_NEHEMIAH) | 548 | if (cpu_model < CPU_NEHEMIAH) |
549 | return; | 549 | return; |
550 | vrm_mV_table = &mobilevrm_mV[0]; | 550 | vrm_mV_table = &mobilevrm_mV[0]; |
@@ -555,21 +555,21 @@ static void longhaul_setup_voltagescaling(void) | |||
555 | maxvid = vrm_mV_table[longhaul.bits.MaximumVID]; | 555 | maxvid = vrm_mV_table[longhaul.bits.MaximumVID]; |
556 | 556 | ||
557 | if (minvid.mV == 0 || maxvid.mV == 0 || minvid.mV > maxvid.mV) { | 557 | if (minvid.mV == 0 || maxvid.mV == 0 || minvid.mV > maxvid.mV) { |
558 | pr_info(PFX "Bogus values Min:%d.%03d Max:%d.%03d - Voltage scaling disabled\n", | 558 | pr_info("Bogus values Min:%d.%03d Max:%d.%03d - Voltage scaling disabled\n", |
559 | minvid.mV/1000, minvid.mV%1000, | 559 | minvid.mV/1000, minvid.mV%1000, |
560 | maxvid.mV/1000, maxvid.mV%1000); | 560 | maxvid.mV/1000, maxvid.mV%1000); |
561 | return; | 561 | return; |
562 | } | 562 | } |
563 | 563 | ||
564 | if (minvid.mV == maxvid.mV) { | 564 | if (minvid.mV == maxvid.mV) { |
565 | pr_info(PFX "Claims to support voltage scaling but min & max are both %d.%03d - Voltage scaling disabled\n", | 565 | pr_info("Claims to support voltage scaling but min & max are both %d.%03d - Voltage scaling disabled\n", |
566 | maxvid.mV/1000, maxvid.mV%1000); | 566 | maxvid.mV/1000, maxvid.mV%1000); |
567 | return; | 567 | return; |
568 | } | 568 | } |
569 | 569 | ||
570 | /* How many voltage steps*/ | 570 | /* How many voltage steps*/ |
571 | numvscales = maxvid.pos - minvid.pos + 1; | 571 | numvscales = maxvid.pos - minvid.pos + 1; |
572 | pr_info(PFX "Max VID=%d.%03d Min VID=%d.%03d, %d possible voltage scales\n", | 572 | pr_info("Max VID=%d.%03d Min VID=%d.%03d, %d possible voltage scales\n", |
573 | maxvid.mV/1000, maxvid.mV%1000, | 573 | maxvid.mV/1000, maxvid.mV%1000, |
574 | minvid.mV/1000, minvid.mV%1000, | 574 | minvid.mV/1000, minvid.mV%1000, |
575 | numvscales); | 575 | numvscales); |
@@ -608,12 +608,12 @@ static void longhaul_setup_voltagescaling(void) | |||
608 | pos = minvid.pos; | 608 | pos = minvid.pos; |
609 | freq_pos->driver_data |= mV_vrm_table[pos] << 8; | 609 | freq_pos->driver_data |= mV_vrm_table[pos] << 8; |
610 | vid = vrm_mV_table[mV_vrm_table[pos]]; | 610 | vid = vrm_mV_table[mV_vrm_table[pos]]; |
611 | pr_info(PFX "f: %d kHz, index: %d, vid: %d mV\n", | 611 | pr_info("f: %d kHz, index: %d, vid: %d mV\n", |
612 | speed, (int)(freq_pos - longhaul_table), vid.mV); | 612 | speed, (int)(freq_pos - longhaul_table), vid.mV); |
613 | } | 613 | } |
614 | 614 | ||
615 | can_scale_voltage = 1; | 615 | can_scale_voltage = 1; |
616 | pr_info(PFX "Voltage scaling enabled\n"); | 616 | pr_info("Voltage scaling enabled\n"); |
617 | } | 617 | } |
618 | 618 | ||
619 | 619 | ||
@@ -711,7 +711,7 @@ static int enable_arbiter_disable(void) | |||
711 | pci_write_config_byte(dev, reg, pci_cmd); | 711 | pci_write_config_byte(dev, reg, pci_cmd); |
712 | pci_read_config_byte(dev, reg, &pci_cmd); | 712 | pci_read_config_byte(dev, reg, &pci_cmd); |
713 | if (!(pci_cmd & 1<<7)) { | 713 | if (!(pci_cmd & 1<<7)) { |
714 | pr_err(PFX "Can't enable access to port 0x22\n"); | 714 | pr_err("Can't enable access to port 0x22\n"); |
715 | status = 0; | 715 | status = 0; |
716 | } | 716 | } |
717 | } | 717 | } |
@@ -748,7 +748,7 @@ static int longhaul_setup_southbridge(void) | |||
748 | if (pci_cmd & 1 << 7) { | 748 | if (pci_cmd & 1 << 7) { |
749 | pci_read_config_dword(dev, 0x88, &acpi_regs_addr); | 749 | pci_read_config_dword(dev, 0x88, &acpi_regs_addr); |
750 | acpi_regs_addr &= 0xff00; | 750 | acpi_regs_addr &= 0xff00; |
751 | pr_info(PFX "ACPI I/O at 0x%x\n", acpi_regs_addr); | 751 | pr_info("ACPI I/O at 0x%x\n", acpi_regs_addr); |
752 | } | 752 | } |
753 | 753 | ||
754 | pci_dev_put(dev); | 754 | pci_dev_put(dev); |
@@ -842,7 +842,7 @@ static int longhaul_cpu_init(struct cpufreq_policy *policy) | |||
842 | longhaul_version = TYPE_LONGHAUL_V1; | 842 | longhaul_version = TYPE_LONGHAUL_V1; |
843 | } | 843 | } |
844 | 844 | ||
845 | pr_info(PFX "VIA %s CPU detected. ", cpuname); | 845 | pr_info("VIA %s CPU detected. ", cpuname); |
846 | switch (longhaul_version) { | 846 | switch (longhaul_version) { |
847 | case TYPE_LONGHAUL_V1: | 847 | case TYPE_LONGHAUL_V1: |
848 | case TYPE_LONGHAUL_V2: | 848 | case TYPE_LONGHAUL_V2: |
@@ -878,14 +878,14 @@ static int longhaul_cpu_init(struct cpufreq_policy *policy) | |||
878 | if (!(longhaul_flags & USE_ACPI_C3 | 878 | if (!(longhaul_flags & USE_ACPI_C3 |
879 | || longhaul_flags & USE_NORTHBRIDGE) | 879 | || longhaul_flags & USE_NORTHBRIDGE) |
880 | && ((pr == NULL) || !(pr->flags.bm_control))) { | 880 | && ((pr == NULL) || !(pr->flags.bm_control))) { |
881 | pr_err(PFX "No ACPI support: Unsupported northbridge\n"); | 881 | pr_err("No ACPI support: Unsupported northbridge\n"); |
882 | return -ENODEV; | 882 | return -ENODEV; |
883 | } | 883 | } |
884 | 884 | ||
885 | if (longhaul_flags & USE_NORTHBRIDGE) | 885 | if (longhaul_flags & USE_NORTHBRIDGE) |
886 | pr_info(PFX "Using northbridge support\n"); | 886 | pr_info("Using northbridge support\n"); |
887 | if (longhaul_flags & USE_ACPI_C3) | 887 | if (longhaul_flags & USE_ACPI_C3) |
888 | pr_info(PFX "Using ACPI support\n"); | 888 | pr_info("Using ACPI support\n"); |
889 | 889 | ||
890 | ret = longhaul_get_ranges(); | 890 | ret = longhaul_get_ranges(); |
891 | if (ret != 0) | 891 | if (ret != 0) |
@@ -922,18 +922,18 @@ static int __init longhaul_init(void) | |||
922 | return -ENODEV; | 922 | return -ENODEV; |
923 | 923 | ||
924 | if (!enable) { | 924 | if (!enable) { |
925 | pr_err(PFX "Option \"enable\" not set - Aborting\n"); | 925 | pr_err("Option \"enable\" not set - Aborting\n"); |
926 | return -ENODEV; | 926 | return -ENODEV; |
927 | } | 927 | } |
928 | #ifdef CONFIG_SMP | 928 | #ifdef CONFIG_SMP |
929 | if (num_online_cpus() > 1) { | 929 | if (num_online_cpus() > 1) { |
930 | pr_err(PFX "More than 1 CPU detected, longhaul disabled\n"); | 930 | pr_err("More than 1 CPU detected, longhaul disabled\n"); |
931 | return -ENODEV; | 931 | return -ENODEV; |
932 | } | 932 | } |
933 | #endif | 933 | #endif |
934 | #ifdef CONFIG_X86_IO_APIC | 934 | #ifdef CONFIG_X86_IO_APIC |
935 | if (cpu_has_apic) { | 935 | if (cpu_has_apic) { |
936 | pr_err(PFX "APIC detected. Longhaul is currently broken in this configuration.\n"); | 936 | pr_err("APIC detected. Longhaul is currently broken in this configuration.\n"); |
937 | return -ENODEV; | 937 | return -ENODEV; |
938 | } | 938 | } |
939 | #endif | 939 | #endif |
@@ -941,7 +941,7 @@ static int __init longhaul_init(void) | |||
941 | case 6 ... 9: | 941 | case 6 ... 9: |
942 | return cpufreq_register_driver(&longhaul_driver); | 942 | return cpufreq_register_driver(&longhaul_driver); |
943 | case 10: | 943 | case 10: |
944 | pr_err(PFX "Use acpi-cpufreq driver for VIA C7\n"); | 944 | pr_err("Use acpi-cpufreq driver for VIA C7\n"); |
945 | default: | 945 | default: |
946 | ; | 946 | ; |
947 | } | 947 | } |
diff --git a/drivers/cpufreq/loongson2_cpufreq.c b/drivers/cpufreq/loongson2_cpufreq.c index 93c7928cf461..6bbdac1065ff 100644 --- a/drivers/cpufreq/loongson2_cpufreq.c +++ b/drivers/cpufreq/loongson2_cpufreq.c | |||
@@ -10,6 +10,9 @@ | |||
10 | * License. See the file "COPYING" in the main directory of this archive | 10 | * License. See the file "COPYING" in the main directory of this archive |
11 | * for more details. | 11 | * for more details. |
12 | */ | 12 | */ |
13 | |||
14 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
15 | |||
13 | #include <linux/cpufreq.h> | 16 | #include <linux/cpufreq.h> |
14 | #include <linux/module.h> | 17 | #include <linux/module.h> |
15 | #include <linux/err.h> | 18 | #include <linux/err.h> |
@@ -76,7 +79,7 @@ static int loongson2_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
76 | 79 | ||
77 | cpuclk = clk_get(NULL, "cpu_clk"); | 80 | cpuclk = clk_get(NULL, "cpu_clk"); |
78 | if (IS_ERR(cpuclk)) { | 81 | if (IS_ERR(cpuclk)) { |
79 | pr_err("cpufreq: couldn't get CPU clk\n"); | 82 | pr_err("couldn't get CPU clk\n"); |
80 | return PTR_ERR(cpuclk); | 83 | return PTR_ERR(cpuclk); |
81 | } | 84 | } |
82 | 85 | ||
@@ -163,7 +166,7 @@ static int __init cpufreq_init(void) | |||
163 | if (ret) | 166 | if (ret) |
164 | return ret; | 167 | return ret; |
165 | 168 | ||
166 | pr_info("cpufreq: Loongson-2F CPU frequency driver.\n"); | 169 | pr_info("Loongson-2F CPU frequency driver\n"); |
167 | 170 | ||
168 | cpufreq_register_notifier(&loongson2_cpufreq_notifier_block, | 171 | cpufreq_register_notifier(&loongson2_cpufreq_notifier_block, |
169 | CPUFREQ_TRANSITION_NOTIFIER); | 172 | CPUFREQ_TRANSITION_NOTIFIER); |
diff --git a/drivers/cpufreq/maple-cpufreq.c b/drivers/cpufreq/maple-cpufreq.c index 7e55632291d7..d9df89392b84 100644 --- a/drivers/cpufreq/maple-cpufreq.c +++ b/drivers/cpufreq/maple-cpufreq.c | |||
@@ -13,6 +13,8 @@ | |||
13 | 13 | ||
14 | #undef DEBUG | 14 | #undef DEBUG |
15 | 15 | ||
16 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
17 | |||
16 | #include <linux/module.h> | 18 | #include <linux/module.h> |
17 | #include <linux/types.h> | 19 | #include <linux/types.h> |
18 | #include <linux/errno.h> | 20 | #include <linux/errno.h> |
@@ -174,7 +176,7 @@ static int __init maple_cpufreq_init(void) | |||
174 | /* Get first CPU node */ | 176 | /* Get first CPU node */ |
175 | cpunode = of_cpu_device_node_get(0); | 177 | cpunode = of_cpu_device_node_get(0); |
176 | if (cpunode == NULL) { | 178 | if (cpunode == NULL) { |
177 | pr_err("cpufreq: Can't find any CPU 0 node\n"); | 179 | pr_err("Can't find any CPU 0 node\n"); |
178 | goto bail_noprops; | 180 | goto bail_noprops; |
179 | } | 181 | } |
180 | 182 | ||
@@ -182,7 +184,7 @@ static int __init maple_cpufreq_init(void) | |||
182 | /* we actually don't care on which CPU to access PVR */ | 184 | /* we actually don't care on which CPU to access PVR */ |
183 | pvr_hi = PVR_VER(mfspr(SPRN_PVR)); | 185 | pvr_hi = PVR_VER(mfspr(SPRN_PVR)); |
184 | if (pvr_hi != 0x3c && pvr_hi != 0x44) { | 186 | if (pvr_hi != 0x3c && pvr_hi != 0x44) { |
185 | pr_err("cpufreq: Unsupported CPU version (%x)\n", pvr_hi); | 187 | pr_err("Unsupported CPU version (%x)\n", pvr_hi); |
186 | goto bail_noprops; | 188 | goto bail_noprops; |
187 | } | 189 | } |
188 | 190 | ||
diff --git a/drivers/cpufreq/omap-cpufreq.c b/drivers/cpufreq/omap-cpufreq.c index 655fc9427626..cead9bec4843 100644 --- a/drivers/cpufreq/omap-cpufreq.c +++ b/drivers/cpufreq/omap-cpufreq.c | |||
@@ -13,6 +13,9 @@ | |||
13 | * it under the terms of the GNU General Public License version 2 as | 13 | * it under the terms of the GNU General Public License version 2 as |
14 | * published by the Free Software Foundation. | 14 | * published by the Free Software Foundation. |
15 | */ | 15 | */ |
16 | |||
17 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
18 | |||
16 | #include <linux/types.h> | 19 | #include <linux/types.h> |
17 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
18 | #include <linux/sched.h> | 21 | #include <linux/sched.h> |
@@ -163,7 +166,7 @@ static int omap_cpufreq_probe(struct platform_device *pdev) | |||
163 | { | 166 | { |
164 | mpu_dev = get_cpu_device(0); | 167 | mpu_dev = get_cpu_device(0); |
165 | if (!mpu_dev) { | 168 | if (!mpu_dev) { |
166 | pr_warn("%s: unable to get the mpu device\n", __func__); | 169 | pr_warn("%s: unable to get the MPU device\n", __func__); |
167 | return -EINVAL; | 170 | return -EINVAL; |
168 | } | 171 | } |
169 | 172 | ||
diff --git a/drivers/cpufreq/p4-clockmod.c b/drivers/cpufreq/p4-clockmod.c index 4d1a44370338..fd77812313f3 100644 --- a/drivers/cpufreq/p4-clockmod.c +++ b/drivers/cpufreq/p4-clockmod.c | |||
@@ -20,6 +20,8 @@ | |||
20 | * | 20 | * |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
24 | |||
23 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
24 | #include <linux/module.h> | 26 | #include <linux/module.h> |
25 | #include <linux/init.h> | 27 | #include <linux/init.h> |
@@ -35,8 +37,6 @@ | |||
35 | 37 | ||
36 | #include "speedstep-lib.h" | 38 | #include "speedstep-lib.h" |
37 | 39 | ||
38 | #define PFX "p4-clockmod: " | ||
39 | |||
40 | /* | 40 | /* |
41 | * Duty Cycle (3bits), note DC_DISABLE is not specified in | 41 | * Duty Cycle (3bits), note DC_DISABLE is not specified in |
42 | * intel docs i just use it to mean disable | 42 | * intel docs i just use it to mean disable |
@@ -124,7 +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 | 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"); | 127 | pr_warn_once("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 | switch (c->x86_model) { | 128 | switch (c->x86_model) { |
129 | case 0x0E: /* Core */ | 129 | case 0x0E: /* Core */ |
130 | case 0x0F: /* Core Duo */ | 130 | case 0x0F: /* Core Duo */ |
@@ -148,7 +148,7 @@ static unsigned int cpufreq_p4_get_frequency(struct cpuinfo_x86 *c) | |||
148 | p4clockmod_driver.flags |= CPUFREQ_CONST_LOOPS; | 148 | p4clockmod_driver.flags |= CPUFREQ_CONST_LOOPS; |
149 | 149 | ||
150 | if (speedstep_detect_processor() == SPEEDSTEP_CPU_P4M) { | 150 | if (speedstep_detect_processor() == SPEEDSTEP_CPU_P4M) { |
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"); | 151 | pr_warn("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"); |
152 | return speedstep_get_frequency(SPEEDSTEP_CPU_P4M); | 152 | return speedstep_get_frequency(SPEEDSTEP_CPU_P4M); |
153 | } | 153 | } |
154 | 154 | ||
@@ -257,7 +257,7 @@ static int __init cpufreq_p4_init(void) | |||
257 | 257 | ||
258 | ret = cpufreq_register_driver(&p4clockmod_driver); | 258 | ret = cpufreq_register_driver(&p4clockmod_driver); |
259 | if (!ret) | 259 | if (!ret) |
260 | pr_info(PFX "P4/Xeon(TM) CPU On-Demand Clock Modulation available\n"); | 260 | pr_info("P4/Xeon(TM) CPU On-Demand Clock Modulation available\n"); |
261 | 261 | ||
262 | return ret; | 262 | return ret; |
263 | } | 263 | } |
diff --git a/drivers/cpufreq/pmac32-cpufreq.c b/drivers/cpufreq/pmac32-cpufreq.c index 072d7b3841b9..b7b576e53e92 100644 --- a/drivers/cpufreq/pmac32-cpufreq.c +++ b/drivers/cpufreq/pmac32-cpufreq.c | |||
@@ -13,6 +13,8 @@ | |||
13 | * | 13 | * |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
17 | |||
16 | #include <linux/module.h> | 18 | #include <linux/module.h> |
17 | #include <linux/types.h> | 19 | #include <linux/types.h> |
18 | #include <linux/errno.h> | 20 | #include <linux/errno.h> |
@@ -481,13 +483,13 @@ static int pmac_cpufreq_init_MacRISC3(struct device_node *cpunode) | |||
481 | freqs = of_get_property(cpunode, "bus-frequencies", &lenp); | 483 | freqs = of_get_property(cpunode, "bus-frequencies", &lenp); |
482 | lenp /= sizeof(u32); | 484 | lenp /= sizeof(u32); |
483 | if (freqs == NULL || lenp != 2) { | 485 | if (freqs == NULL || lenp != 2) { |
484 | pr_err("cpufreq: bus-frequencies incorrect or missing\n"); | 486 | pr_err("bus-frequencies incorrect or missing\n"); |
485 | return 1; | 487 | return 1; |
486 | } | 488 | } |
487 | ratio = of_get_property(cpunode, "processor-to-bus-ratio*2", | 489 | ratio = of_get_property(cpunode, "processor-to-bus-ratio*2", |
488 | NULL); | 490 | NULL); |
489 | if (ratio == NULL) { | 491 | if (ratio == NULL) { |
490 | pr_err("cpufreq: processor-to-bus-ratio*2 missing\n"); | 492 | pr_err("processor-to-bus-ratio*2 missing\n"); |
491 | return 1; | 493 | return 1; |
492 | } | 494 | } |
493 | 495 | ||
@@ -550,7 +552,7 @@ static int pmac_cpufreq_init_7447A(struct device_node *cpunode) | |||
550 | if (volt_gpio_np) | 552 | if (volt_gpio_np) |
551 | voltage_gpio = read_gpio(volt_gpio_np); | 553 | voltage_gpio = read_gpio(volt_gpio_np); |
552 | if (!voltage_gpio){ | 554 | if (!voltage_gpio){ |
553 | pr_err("cpufreq: missing cpu-vcore-select gpio\n"); | 555 | pr_err("missing cpu-vcore-select gpio\n"); |
554 | return 1; | 556 | return 1; |
555 | } | 557 | } |
556 | 558 | ||
diff --git a/drivers/cpufreq/pmac64-cpufreq.c b/drivers/cpufreq/pmac64-cpufreq.c index 5ffe0855ba8f..267e0894c62d 100644 --- a/drivers/cpufreq/pmac64-cpufreq.c +++ b/drivers/cpufreq/pmac64-cpufreq.c | |||
@@ -12,6 +12,8 @@ | |||
12 | 12 | ||
13 | #undef DEBUG | 13 | #undef DEBUG |
14 | 14 | ||
15 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
16 | |||
15 | #include <linux/module.h> | 17 | #include <linux/module.h> |
16 | #include <linux/types.h> | 18 | #include <linux/types.h> |
17 | #include <linux/errno.h> | 19 | #include <linux/errno.h> |
@@ -138,7 +140,7 @@ static void g5_vdnap_switch_volt(int speed_mode) | |||
138 | usleep_range(1000, 1000); | 140 | usleep_range(1000, 1000); |
139 | } | 141 | } |
140 | if (done == 0) | 142 | if (done == 0) |
141 | pr_warn("cpufreq: Timeout in clock slewing !\n"); | 143 | pr_warn("Timeout in clock slewing !\n"); |
142 | } | 144 | } |
143 | 145 | ||
144 | 146 | ||
@@ -266,7 +268,7 @@ static int g5_pfunc_switch_freq(int speed_mode) | |||
266 | rc = pmf_call_one(pfunc_cpu_setfreq_low, NULL); | 268 | rc = pmf_call_one(pfunc_cpu_setfreq_low, NULL); |
267 | 269 | ||
268 | if (rc) | 270 | if (rc) |
269 | pr_warn("cpufreq: pfunc switch error %d\n", rc); | 271 | pr_warn("pfunc switch error %d\n", rc); |
270 | 272 | ||
271 | /* It's an irq GPIO so we should be able to just block here, | 273 | /* 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 | 274 | * I'll do that later after I've properly tested the IRQ code for |
@@ -282,7 +284,7 @@ static int g5_pfunc_switch_freq(int speed_mode) | |||
282 | usleep_range(500, 500); | 284 | usleep_range(500, 500); |
283 | } | 285 | } |
284 | if (done == 0) | 286 | if (done == 0) |
285 | pr_warn("cpufreq: Timeout in clock slewing !\n"); | 287 | pr_warn("Timeout in clock slewing !\n"); |
286 | 288 | ||
287 | /* If frequency is going down, last ramp the voltage */ | 289 | /* If frequency is going down, last ramp the voltage */ |
288 | if (speed_mode > g5_pmode_cur) | 290 | if (speed_mode > g5_pmode_cur) |
@@ -368,7 +370,7 @@ static int __init g5_neo2_cpufreq_init(struct device_node *cpunode) | |||
368 | } | 370 | } |
369 | pvr_hi = (*valp) >> 16; | 371 | pvr_hi = (*valp) >> 16; |
370 | if (pvr_hi != 0x3c && pvr_hi != 0x44) { | 372 | if (pvr_hi != 0x3c && pvr_hi != 0x44) { |
371 | pr_err("cpufreq: Unsupported CPU version\n"); | 373 | pr_err("Unsupported CPU version\n"); |
372 | goto bail_noprops; | 374 | goto bail_noprops; |
373 | } | 375 | } |
374 | 376 | ||
@@ -403,7 +405,7 @@ static int __init g5_neo2_cpufreq_init(struct device_node *cpunode) | |||
403 | 405 | ||
404 | root = of_find_node_by_path("/"); | 406 | root = of_find_node_by_path("/"); |
405 | if (root == NULL) { | 407 | if (root == NULL) { |
406 | pr_err("cpufreq: Can't find root of device tree\n"); | 408 | pr_err("Can't find root of device tree\n"); |
407 | goto bail_noprops; | 409 | goto bail_noprops; |
408 | } | 410 | } |
409 | pfunc_set_vdnap0 = pmf_find_function(root, "set-vdnap0"); | 411 | pfunc_set_vdnap0 = pmf_find_function(root, "set-vdnap0"); |
@@ -411,7 +413,7 @@ static int __init g5_neo2_cpufreq_init(struct device_node *cpunode) | |||
411 | pmf_find_function(root, "slewing-done"); | 413 | pmf_find_function(root, "slewing-done"); |
412 | if (pfunc_set_vdnap0 == NULL || | 414 | if (pfunc_set_vdnap0 == NULL || |
413 | pfunc_vdnap0_complete == NULL) { | 415 | pfunc_vdnap0_complete == NULL) { |
414 | pr_err("cpufreq: Can't find required platform function\n"); | 416 | pr_err("Can't find required platform function\n"); |
415 | goto bail_noprops; | 417 | goto bail_noprops; |
416 | } | 418 | } |
417 | 419 | ||
@@ -491,7 +493,7 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpunode) | |||
491 | if (cpuid != NULL) | 493 | if (cpuid != NULL) |
492 | eeprom = of_get_property(cpuid, "cpuid", NULL); | 494 | eeprom = of_get_property(cpuid, "cpuid", NULL); |
493 | if (eeprom == NULL) { | 495 | if (eeprom == NULL) { |
494 | pr_err("cpufreq: Can't find cpuid EEPROM !\n"); | 496 | pr_err("Can't find cpuid EEPROM !\n"); |
495 | rc = -ENODEV; | 497 | rc = -ENODEV; |
496 | goto bail; | 498 | goto bail; |
497 | } | 499 | } |
@@ -509,7 +511,7 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpunode) | |||
509 | break; | 511 | break; |
510 | } | 512 | } |
511 | if (hwclock == NULL) { | 513 | if (hwclock == NULL) { |
512 | pr_err("cpufreq: Can't find i2c clock chip !\n"); | 514 | pr_err("Can't find i2c clock chip !\n"); |
513 | rc = -ENODEV; | 515 | rc = -ENODEV; |
514 | goto bail; | 516 | goto bail; |
515 | } | 517 | } |
@@ -537,7 +539,7 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpunode) | |||
537 | /* Check we have minimum requirements */ | 539 | /* Check we have minimum requirements */ |
538 | if (pfunc_cpu_getfreq == NULL || pfunc_cpu_setfreq_high == NULL || | 540 | if (pfunc_cpu_getfreq == NULL || pfunc_cpu_setfreq_high == NULL || |
539 | pfunc_cpu_setfreq_low == NULL || pfunc_slewing_done == NULL) { | 541 | pfunc_cpu_setfreq_low == NULL || pfunc_slewing_done == NULL) { |
540 | pr_err("cpufreq: Can't find platform functions !\n"); | 542 | pr_err("Can't find platform functions !\n"); |
541 | rc = -ENODEV; | 543 | rc = -ENODEV; |
542 | goto bail; | 544 | goto bail; |
543 | } | 545 | } |
@@ -565,7 +567,7 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpunode) | |||
565 | /* Get max frequency from device-tree */ | 567 | /* Get max frequency from device-tree */ |
566 | valp = of_get_property(cpunode, "clock-frequency", NULL); | 568 | valp = of_get_property(cpunode, "clock-frequency", NULL); |
567 | if (!valp) { | 569 | if (!valp) { |
568 | pr_err("cpufreq: Can't find CPU frequency !\n"); | 570 | pr_err("Can't find CPU frequency !\n"); |
569 | rc = -ENODEV; | 571 | rc = -ENODEV; |
570 | goto bail; | 572 | goto bail; |
571 | } | 573 | } |
@@ -581,7 +583,7 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpunode) | |||
581 | 583 | ||
582 | /* Check for machines with no useful settings */ | 584 | /* Check for machines with no useful settings */ |
583 | if (il == ih) { | 585 | if (il == ih) { |
584 | pr_warn("cpufreq: No low frequency mode available on this model !\n"); | 586 | pr_warn("No low frequency mode available on this model !\n"); |
585 | rc = -ENODEV; | 587 | rc = -ENODEV; |
586 | goto bail; | 588 | goto bail; |
587 | } | 589 | } |
@@ -592,7 +594,7 @@ static int __init g5_pm72_cpufreq_init(struct device_node *cpunode) | |||
592 | 594 | ||
593 | /* Sanity check */ | 595 | /* Sanity check */ |
594 | if (min_freq >= max_freq || min_freq < 1000) { | 596 | if (min_freq >= max_freq || min_freq < 1000) { |
595 | pr_err("cpufreq: Can't calculate low frequency !\n"); | 597 | pr_err("Can't calculate low frequency !\n"); |
596 | rc = -ENXIO; | 598 | rc = -ENXIO; |
597 | goto bail; | 599 | goto bail; |
598 | } | 600 | } |
@@ -651,7 +653,7 @@ static int __init g5_cpufreq_init(void) | |||
651 | /* Get first CPU node */ | 653 | /* Get first CPU node */ |
652 | cpunode = of_cpu_device_node_get(0); | 654 | cpunode = of_cpu_device_node_get(0); |
653 | if (cpunode == NULL) { | 655 | if (cpunode == NULL) { |
654 | pr_err("cpufreq: Can't find any CPU node\n"); | 656 | pr_err("Can't find any CPU node\n"); |
655 | return -ENODEV; | 657 | return -ENODEV; |
656 | } | 658 | } |
657 | 659 | ||
diff --git a/drivers/cpufreq/powernow-k6.c b/drivers/cpufreq/powernow-k6.c index 981f40b1caf4..dedd2568e852 100644 --- a/drivers/cpufreq/powernow-k6.c +++ b/drivers/cpufreq/powernow-k6.c | |||
@@ -8,6 +8,8 @@ | |||
8 | * BIG FAT DISCLAIMER: Work in progress code. Possibly *dangerous* | 8 | * BIG FAT DISCLAIMER: Work in progress code. Possibly *dangerous* |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
12 | |||
11 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
12 | #include <linux/module.h> | 14 | #include <linux/module.h> |
13 | #include <linux/init.h> | 15 | #include <linux/init.h> |
@@ -22,7 +24,6 @@ | |||
22 | #define POWERNOW_IOPORT 0xfff0 /* it doesn't matter where, as long | 24 | #define POWERNOW_IOPORT 0xfff0 /* it doesn't matter where, as long |
23 | as it is unused */ | 25 | as it is unused */ |
24 | 26 | ||
25 | #define PFX "powernow-k6: " | ||
26 | static unsigned int busfreq; /* FSB, in 10 kHz */ | 27 | static unsigned int busfreq; /* FSB, in 10 kHz */ |
27 | static unsigned int max_multiplier; | 28 | static unsigned int max_multiplier; |
28 | 29 | ||
@@ -141,7 +142,7 @@ static int powernow_k6_target(struct cpufreq_policy *policy, | |||
141 | { | 142 | { |
142 | 143 | ||
143 | if (clock_ratio[best_i].driver_data > max_multiplier) { | 144 | if (clock_ratio[best_i].driver_data > max_multiplier) { |
144 | pr_err(PFX "invalid target frequency\n"); | 145 | pr_err("invalid target frequency\n"); |
145 | return -EINVAL; | 146 | return -EINVAL; |
146 | } | 147 | } |
147 | 148 | ||
@@ -175,14 +176,14 @@ static int powernow_k6_cpu_init(struct cpufreq_policy *policy) | |||
175 | max_multiplier = param_max_multiplier; | 176 | max_multiplier = param_max_multiplier; |
176 | goto have_max_multiplier; | 177 | goto have_max_multiplier; |
177 | } | 178 | } |
178 | pr_err("powernow-k6: invalid max_multiplier parameter, valid parameters 20, 30, 35, 40, 45, 50, 55, 60\n"); | 179 | pr_err("invalid max_multiplier parameter, valid parameters 20, 30, 35, 40, 45, 50, 55, 60\n"); |
179 | return -EINVAL; | 180 | return -EINVAL; |
180 | } | 181 | } |
181 | 182 | ||
182 | if (!max_multiplier) { | 183 | if (!max_multiplier) { |
183 | pr_warn("powernow-k6: unknown frequency %u, cannot determine current multiplier\n", | 184 | pr_warn("unknown frequency %u, cannot determine current multiplier\n", |
184 | khz); | 185 | khz); |
185 | pr_warn("powernow-k6: use module parameters max_multiplier and bus_frequency\n"); | 186 | pr_warn("use module parameters max_multiplier and bus_frequency\n"); |
186 | return -EOPNOTSUPP; | 187 | return -EOPNOTSUPP; |
187 | } | 188 | } |
188 | 189 | ||
@@ -194,7 +195,7 @@ have_max_multiplier: | |||
194 | busfreq = param_busfreq / 10; | 195 | busfreq = param_busfreq / 10; |
195 | goto have_busfreq; | 196 | goto have_busfreq; |
196 | } | 197 | } |
197 | pr_err("powernow-k6: invalid bus_frequency parameter, allowed range 50000 - 150000 kHz\n"); | 198 | pr_err("invalid bus_frequency parameter, allowed range 50000 - 150000 kHz\n"); |
198 | return -EINVAL; | 199 | return -EINVAL; |
199 | } | 200 | } |
200 | 201 | ||
@@ -276,7 +277,7 @@ static int __init powernow_k6_init(void) | |||
276 | return -ENODEV; | 277 | return -ENODEV; |
277 | 278 | ||
278 | if (!request_region(POWERNOW_IOPORT, 16, "PowerNow!")) { | 279 | if (!request_region(POWERNOW_IOPORT, 16, "PowerNow!")) { |
279 | pr_info(PFX "PowerNow IOPORT region already used\n"); | 280 | pr_info("PowerNow IOPORT region already used\n"); |
280 | return -EIO; | 281 | return -EIO; |
281 | } | 282 | } |
282 | 283 | ||
diff --git a/drivers/cpufreq/powernow-k7.c b/drivers/cpufreq/powernow-k7.c index 4a1b420da72e..9f013ed42977 100644 --- a/drivers/cpufreq/powernow-k7.c +++ b/drivers/cpufreq/powernow-k7.c | |||
@@ -13,6 +13,8 @@ | |||
13 | * - We disable half multipliers if ACPI is used on A0 stepping CPUs. | 13 | * - We disable half multipliers if ACPI is used on A0 stepping CPUs. |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
17 | |||
16 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
17 | #include <linux/module.h> | 19 | #include <linux/module.h> |
18 | #include <linux/moduleparam.h> | 20 | #include <linux/moduleparam.h> |
@@ -35,9 +37,6 @@ | |||
35 | 37 | ||
36 | #include "powernow-k7.h" | 38 | #include "powernow-k7.h" |
37 | 39 | ||
38 | #define PFX "powernow: " | ||
39 | |||
40 | |||
41 | struct psb_s { | 40 | struct psb_s { |
42 | u8 signature[10]; | 41 | u8 signature[10]; |
43 | u8 tableversion; | 42 | u8 tableversion; |
@@ -127,13 +126,13 @@ static int check_powernow(void) | |||
127 | maxei = cpuid_eax(0x80000000); | 126 | maxei = cpuid_eax(0x80000000); |
128 | if (maxei < 0x80000007) { /* Any powernow info ? */ | 127 | if (maxei < 0x80000007) { /* Any powernow info ? */ |
129 | #ifdef MODULE | 128 | #ifdef MODULE |
130 | pr_info(PFX "No powernow capabilities detected\n"); | 129 | pr_info("No powernow capabilities detected\n"); |
131 | #endif | 130 | #endif |
132 | return 0; | 131 | return 0; |
133 | } | 132 | } |
134 | 133 | ||
135 | if ((c->x86_model == 6) && (c->x86_mask == 0)) { | 134 | if ((c->x86_model == 6) && (c->x86_mask == 0)) { |
136 | pr_info(PFX "K7 660[A0] core detected, enabling errata workarounds\n"); | 135 | pr_info("K7 660[A0] core detected, enabling errata workarounds\n"); |
137 | have_a0 = 1; | 136 | have_a0 = 1; |
138 | } | 137 | } |
139 | 138 | ||
@@ -143,7 +142,7 @@ static int check_powernow(void) | |||
143 | if (!(edx & (1 << 1 | 1 << 2))) | 142 | if (!(edx & (1 << 1 | 1 << 2))) |
144 | return 0; | 143 | return 0; |
145 | 144 | ||
146 | pr_info(PFX "PowerNOW! Technology present. Can scale: "); | 145 | pr_info("PowerNOW! Technology present. Can scale: "); |
147 | 146 | ||
148 | if (edx & 1 << 1) { | 147 | if (edx & 1 << 1) { |
149 | pr_cont("frequency"); | 148 | pr_cont("frequency"); |
@@ -426,14 +425,14 @@ err1: | |||
426 | err05: | 425 | err05: |
427 | kfree(acpi_processor_perf); | 426 | kfree(acpi_processor_perf); |
428 | err0: | 427 | err0: |
429 | pr_warn(PFX "ACPI perflib can not be used on this platform\n"); | 428 | pr_warn("ACPI perflib can not be used on this platform\n"); |
430 | acpi_processor_perf = NULL; | 429 | acpi_processor_perf = NULL; |
431 | return retval; | 430 | return retval; |
432 | } | 431 | } |
433 | #else | 432 | #else |
434 | static int powernow_acpi_init(void) | 433 | static int powernow_acpi_init(void) |
435 | { | 434 | { |
436 | pr_info(PFX "no support for ACPI processor found - please recompile your kernel with ACPI processor\n"); | 435 | pr_info("no support for ACPI processor found - please recompile your kernel with ACPI processor\n"); |
437 | return -EINVAL; | 436 | return -EINVAL; |
438 | } | 437 | } |
439 | #endif | 438 | #endif |
@@ -465,7 +464,7 @@ static int powernow_decode_bios(int maxfid, int startvid) | |||
465 | psb = (struct psb_s *) p; | 464 | psb = (struct psb_s *) p; |
466 | pr_debug("Table version: 0x%x\n", psb->tableversion); | 465 | pr_debug("Table version: 0x%x\n", psb->tableversion); |
467 | if (psb->tableversion != 0x12) { | 466 | if (psb->tableversion != 0x12) { |
468 | pr_info(PFX "Sorry, only v1.2 tables supported right now\n"); | 467 | pr_info("Sorry, only v1.2 tables supported right now\n"); |
469 | return -ENODEV; | 468 | return -ENODEV; |
470 | } | 469 | } |
471 | 470 | ||
@@ -477,7 +476,7 @@ static int powernow_decode_bios(int maxfid, int startvid) | |||
477 | 476 | ||
478 | latency = psb->settlingtime; | 477 | latency = psb->settlingtime; |
479 | if (latency < 100) { | 478 | if (latency < 100) { |
480 | pr_info(PFX "BIOS set settling time to %d microseconds. Should be at least 100. Correcting.\n", | 479 | pr_info("BIOS set settling time to %d microseconds. Should be at least 100. Correcting.\n", |
481 | latency); | 480 | latency); |
482 | latency = 100; | 481 | latency = 100; |
483 | } | 482 | } |
@@ -510,9 +509,9 @@ static int powernow_decode_bios(int maxfid, int startvid) | |||
510 | p += 2; | 509 | p += 2; |
511 | } | 510 | } |
512 | } | 511 | } |
513 | pr_info(PFX "No PST tables match this cpuid (0x%x)\n", | 512 | pr_info("No PST tables match this cpuid (0x%x)\n", |
514 | etuple); | 513 | etuple); |
515 | pr_info(PFX "This is indicative of a broken BIOS\n"); | 514 | pr_info("This is indicative of a broken BIOS\n"); |
516 | 515 | ||
517 | return -EINVAL; | 516 | return -EINVAL; |
518 | } | 517 | } |
@@ -545,7 +544,7 @@ static int fixup_sgtc(void) | |||
545 | sgtc = 100 * m * latency; | 544 | sgtc = 100 * m * latency; |
546 | sgtc = sgtc / 3; | 545 | sgtc = sgtc / 3; |
547 | if (sgtc > 0xfffff) { | 546 | if (sgtc > 0xfffff) { |
548 | pr_warn(PFX "SGTC too large %d\n", sgtc); | 547 | pr_warn("SGTC too large %d\n", sgtc); |
549 | sgtc = 0xfffff; | 548 | sgtc = 0xfffff; |
550 | } | 549 | } |
551 | return sgtc; | 550 | return sgtc; |
@@ -567,10 +566,10 @@ static unsigned int powernow_get(unsigned int cpu) | |||
567 | 566 | ||
568 | static int acer_cpufreq_pst(const struct dmi_system_id *d) | 567 | static int acer_cpufreq_pst(const struct dmi_system_id *d) |
569 | { | 568 | { |
570 | pr_warn(PFX "%s laptop with broken PST tables in BIOS detected\n", | 569 | pr_warn("%s laptop with broken PST tables in BIOS detected\n", |
571 | d->ident); | 570 | d->ident); |
572 | pr_warn(PFX "You need to downgrade to 3A21 (09/09/2002), or try a newer BIOS than 3A71 (01/20/2003)\n"); | 571 | pr_warn("You need to downgrade to 3A21 (09/09/2002), or try a newer BIOS than 3A71 (01/20/2003)\n"); |
573 | pr_warn(PFX "cpufreq scaling has been disabled as a result of this\n"); | 572 | pr_warn("cpufreq scaling has been disabled as a result of this\n"); |
574 | return 0; | 573 | return 0; |
575 | } | 574 | } |
576 | 575 | ||
@@ -605,37 +604,37 @@ static int powernow_cpu_init(struct cpufreq_policy *policy) | |||
605 | 604 | ||
606 | fsb = (10 * cpu_khz) / fid_codes[fidvidstatus.bits.CFID]; | 605 | fsb = (10 * cpu_khz) / fid_codes[fidvidstatus.bits.CFID]; |
607 | if (!fsb) { | 606 | if (!fsb) { |
608 | pr_warn(PFX "can not determine bus frequency\n"); | 607 | pr_warn("can not determine bus frequency\n"); |
609 | return -EINVAL; | 608 | return -EINVAL; |
610 | } | 609 | } |
611 | pr_debug("FSB: %3dMHz\n", fsb/1000); | 610 | pr_debug("FSB: %3dMHz\n", fsb/1000); |
612 | 611 | ||
613 | if (dmi_check_system(powernow_dmi_table) || acpi_force) { | 612 | if (dmi_check_system(powernow_dmi_table) || acpi_force) { |
614 | pr_info(PFX "PSB/PST known to be broken - trying ACPI instead\n"); | 613 | pr_info("PSB/PST known to be broken - trying ACPI instead\n"); |
615 | result = powernow_acpi_init(); | 614 | result = powernow_acpi_init(); |
616 | } else { | 615 | } else { |
617 | result = powernow_decode_bios(fidvidstatus.bits.MFID, | 616 | result = powernow_decode_bios(fidvidstatus.bits.MFID, |
618 | fidvidstatus.bits.SVID); | 617 | fidvidstatus.bits.SVID); |
619 | if (result) { | 618 | if (result) { |
620 | pr_info(PFX "Trying ACPI perflib\n"); | 619 | pr_info("Trying ACPI perflib\n"); |
621 | maximum_speed = 0; | 620 | maximum_speed = 0; |
622 | minimum_speed = -1; | 621 | minimum_speed = -1; |
623 | latency = 0; | 622 | latency = 0; |
624 | result = powernow_acpi_init(); | 623 | result = powernow_acpi_init(); |
625 | if (result) { | 624 | if (result) { |
626 | pr_info(PFX "ACPI and legacy methods failed\n"); | 625 | pr_info("ACPI and legacy methods failed\n"); |
627 | } | 626 | } |
628 | } else { | 627 | } else { |
629 | /* SGTC use the bus clock as timer */ | 628 | /* SGTC use the bus clock as timer */ |
630 | latency = fixup_sgtc(); | 629 | latency = fixup_sgtc(); |
631 | pr_info(PFX "SGTC: %d\n", latency); | 630 | pr_info("SGTC: %d\n", latency); |
632 | } | 631 | } |
633 | } | 632 | } |
634 | 633 | ||
635 | if (result) | 634 | if (result) |
636 | return result; | 635 | return result; |
637 | 636 | ||
638 | pr_info(PFX "Minimum speed %d MHz - Maximum speed %d MHz\n", | 637 | pr_info("Minimum speed %d MHz - Maximum speed %d MHz\n", |
639 | minimum_speed/1000, maximum_speed/1000); | 638 | minimum_speed/1000, maximum_speed/1000); |
640 | 639 | ||
641 | policy->cpuinfo.transition_latency = | 640 | policy->cpuinfo.transition_latency = |
diff --git a/drivers/cpufreq/pxa2xx-cpufreq.c b/drivers/cpufreq/pxa2xx-cpufreq.c index 8a27667c16fa..ce345bf34d5d 100644 --- a/drivers/cpufreq/pxa2xx-cpufreq.c +++ b/drivers/cpufreq/pxa2xx-cpufreq.c | |||
@@ -29,6 +29,8 @@ | |||
29 | * | 29 | * |
30 | */ | 30 | */ |
31 | 31 | ||
32 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
33 | |||
32 | #include <linux/kernel.h> | 34 | #include <linux/kernel.h> |
33 | #include <linux/module.h> | 35 | #include <linux/module.h> |
34 | #include <linux/sched.h> | 36 | #include <linux/sched.h> |
@@ -186,8 +188,7 @@ static int pxa_cpufreq_change_voltage(const struct pxa_freqs *pxa_freq) | |||
186 | 188 | ||
187 | ret = regulator_set_voltage(vcc_core, vmin, vmax); | 189 | ret = regulator_set_voltage(vcc_core, vmin, vmax); |
188 | if (ret) | 190 | if (ret) |
189 | pr_err("cpufreq: Failed to set vcc_core in [%dmV..%dmV]\n", | 191 | pr_err("Failed to set vcc_core in [%dmV..%dmV]\n", vmin, vmax); |
190 | vmin, vmax); | ||
191 | return ret; | 192 | return ret; |
192 | } | 193 | } |
193 | 194 | ||
@@ -195,10 +196,10 @@ static void __init pxa_cpufreq_init_voltages(void) | |||
195 | { | 196 | { |
196 | vcc_core = regulator_get(NULL, "vcc_core"); | 197 | vcc_core = regulator_get(NULL, "vcc_core"); |
197 | if (IS_ERR(vcc_core)) { | 198 | if (IS_ERR(vcc_core)) { |
198 | pr_info("cpufreq: Didn't find vcc_core regulator\n"); | 199 | pr_info("Didn't find vcc_core regulator\n"); |
199 | vcc_core = NULL; | 200 | vcc_core = NULL; |
200 | } else { | 201 | } else { |
201 | pr_info("cpufreq: Found vcc_core regulator\n"); | 202 | pr_info("Found vcc_core regulator\n"); |
202 | } | 203 | } |
203 | } | 204 | } |
204 | #else | 205 | #else |
@@ -407,7 +408,7 @@ static int pxa_cpufreq_init(struct cpufreq_policy *policy) | |||
407 | */ | 408 | */ |
408 | if (cpu_is_pxa25x()) { | 409 | if (cpu_is_pxa25x()) { |
409 | find_freq_tables(&pxa255_freq_table, &pxa255_freqs); | 410 | find_freq_tables(&pxa255_freq_table, &pxa255_freqs); |
410 | pr_info("PXA255 cpufreq using %s frequency table\n", | 411 | pr_info("using %s frequency table\n", |
411 | pxa255_turbo_table ? "turbo" : "run"); | 412 | pxa255_turbo_table ? "turbo" : "run"); |
412 | 413 | ||
413 | cpufreq_table_validate_and_show(policy, pxa255_freq_table); | 414 | cpufreq_table_validate_and_show(policy, pxa255_freq_table); |
@@ -416,7 +417,7 @@ static int pxa_cpufreq_init(struct cpufreq_policy *policy) | |||
416 | cpufreq_table_validate_and_show(policy, pxa27x_freq_table); | 417 | cpufreq_table_validate_and_show(policy, pxa27x_freq_table); |
417 | } | 418 | } |
418 | 419 | ||
419 | pr_info("PXA CPU frequency change support initialized\n"); | 420 | pr_info("frequency change support initialized\n"); |
420 | 421 | ||
421 | return 0; | 422 | return 0; |
422 | } | 423 | } |
diff --git a/drivers/cpufreq/s3c2412-cpufreq.c b/drivers/cpufreq/s3c2412-cpufreq.c index f9447bac9e22..b04b6f02bbdc 100644 --- a/drivers/cpufreq/s3c2412-cpufreq.c +++ b/drivers/cpufreq/s3c2412-cpufreq.c | |||
@@ -10,6 +10,8 @@ | |||
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
14 | |||
13 | #include <linux/init.h> | 15 | #include <linux/init.h> |
14 | #include <linux/module.h> | 16 | #include <linux/module.h> |
15 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
@@ -197,20 +199,20 @@ static int s3c2412_cpufreq_add(struct device *dev, | |||
197 | 199 | ||
198 | hclk = clk_get(NULL, "hclk"); | 200 | hclk = clk_get(NULL, "hclk"); |
199 | if (IS_ERR(hclk)) { | 201 | if (IS_ERR(hclk)) { |
200 | pr_err("%s: cannot find hclk clock\n", __func__); | 202 | pr_err("cannot find hclk clock\n"); |
201 | return -ENOENT; | 203 | return -ENOENT; |
202 | } | 204 | } |
203 | 205 | ||
204 | fclk = clk_get(NULL, "fclk"); | 206 | fclk = clk_get(NULL, "fclk"); |
205 | if (IS_ERR(fclk)) { | 207 | if (IS_ERR(fclk)) { |
206 | pr_err("%s: cannot find fclk clock\n", __func__); | 208 | pr_err("cannot find fclk clock\n"); |
207 | goto err_fclk; | 209 | goto err_fclk; |
208 | } | 210 | } |
209 | 211 | ||
210 | fclk_rate = clk_get_rate(fclk); | 212 | fclk_rate = clk_get_rate(fclk); |
211 | if (fclk_rate > 200000000) { | 213 | if (fclk_rate > 200000000) { |
212 | pr_info("%s: fclk %ld MHz, assuming 266MHz capable part\n", | 214 | pr_info("fclk %ld MHz, assuming 266MHz capable part\n", |
213 | __func__, fclk_rate / 1000000); | 215 | fclk_rate / 1000000); |
214 | s3c2412_cpufreq_info.max.fclk = 266000000; | 216 | s3c2412_cpufreq_info.max.fclk = 266000000; |
215 | s3c2412_cpufreq_info.max.hclk = 133000000; | 217 | s3c2412_cpufreq_info.max.hclk = 133000000; |
216 | s3c2412_cpufreq_info.max.pclk = 66000000; | 218 | s3c2412_cpufreq_info.max.pclk = 66000000; |
@@ -218,13 +220,13 @@ static int s3c2412_cpufreq_add(struct device *dev, | |||
218 | 220 | ||
219 | armclk = clk_get(NULL, "armclk"); | 221 | armclk = clk_get(NULL, "armclk"); |
220 | if (IS_ERR(armclk)) { | 222 | if (IS_ERR(armclk)) { |
221 | pr_err("%s: cannot find arm clock\n", __func__); | 223 | pr_err("cannot find arm clock\n"); |
222 | goto err_armclk; | 224 | goto err_armclk; |
223 | } | 225 | } |
224 | 226 | ||
225 | xtal = clk_get(NULL, "xtal"); | 227 | xtal = clk_get(NULL, "xtal"); |
226 | if (IS_ERR(xtal)) { | 228 | if (IS_ERR(xtal)) { |
227 | pr_err("%s: cannot find xtal clock\n", __func__); | 229 | pr_err("cannot find xtal clock\n"); |
228 | goto err_xtal; | 230 | goto err_xtal; |
229 | } | 231 | } |
230 | 232 | ||
diff --git a/drivers/cpufreq/s3c2440-cpufreq.c b/drivers/cpufreq/s3c2440-cpufreq.c index f6cefe34e411..d0d75b65ddd6 100644 --- a/drivers/cpufreq/s3c2440-cpufreq.c +++ b/drivers/cpufreq/s3c2440-cpufreq.c | |||
@@ -11,6 +11,8 @@ | |||
11 | * published by the Free Software Foundation. | 11 | * published by the Free Software Foundation. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
15 | |||
14 | #include <linux/init.h> | 16 | #include <linux/init.h> |
15 | #include <linux/module.h> | 17 | #include <linux/module.h> |
16 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
diff --git a/drivers/cpufreq/s3c24xx-cpufreq-debugfs.c b/drivers/cpufreq/s3c24xx-cpufreq-debugfs.c index 8182608aeac1..4d976e8dbb2f 100644 --- a/drivers/cpufreq/s3c24xx-cpufreq-debugfs.c +++ b/drivers/cpufreq/s3c24xx-cpufreq-debugfs.c | |||
@@ -10,6 +10,8 @@ | |||
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
14 | |||
13 | #include <linux/init.h> | 15 | #include <linux/init.h> |
14 | #include <linux/export.h> | 16 | #include <linux/export.h> |
15 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
diff --git a/drivers/cpufreq/s3c24xx-cpufreq.c b/drivers/cpufreq/s3c24xx-cpufreq.c index 68f883744500..ae8eaed77b70 100644 --- a/drivers/cpufreq/s3c24xx-cpufreq.c +++ b/drivers/cpufreq/s3c24xx-cpufreq.c | |||
@@ -10,6 +10,8 @@ | |||
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
14 | |||
13 | #include <linux/init.h> | 15 | #include <linux/init.h> |
14 | #include <linux/module.h> | 16 | #include <linux/module.h> |
15 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
@@ -356,7 +358,7 @@ struct clk *s3c_cpufreq_clk_get(struct device *dev, const char *name) | |||
356 | 358 | ||
357 | clk = clk_get(dev, name); | 359 | clk = clk_get(dev, name); |
358 | if (IS_ERR(clk)) | 360 | if (IS_ERR(clk)) |
359 | pr_err("cpufreq: failed to get clock '%s'\n", name); | 361 | pr_err("failed to get clock '%s'\n", name); |
360 | 362 | ||
361 | return clk; | 363 | return clk; |
362 | } | 364 | } |
@@ -665,9 +667,9 @@ int s3c_plltab_register(struct cpufreq_frequency_table *plls, | |||
665 | vals += plls_no; | 667 | vals += plls_no; |
666 | vals->frequency = CPUFREQ_TABLE_END; | 668 | vals->frequency = CPUFREQ_TABLE_END; |
667 | 669 | ||
668 | pr_info("cpufreq: %d PLL entries\n", plls_no); | 670 | pr_info("%d PLL entries\n", plls_no); |
669 | } else | 671 | } else |
670 | pr_err("cpufreq: no memory for PLL tables\n"); | 672 | pr_err("no memory for PLL tables\n"); |
671 | 673 | ||
672 | return vals ? 0 : -ENOMEM; | 674 | return vals ? 0 : -ENOMEM; |
673 | } | 675 | } |
diff --git a/drivers/cpufreq/s5pv210-cpufreq.c b/drivers/cpufreq/s5pv210-cpufreq.c index 344e584412ed..06d85917b6d5 100644 --- a/drivers/cpufreq/s5pv210-cpufreq.c +++ b/drivers/cpufreq/s5pv210-cpufreq.c | |||
@@ -9,6 +9,8 @@ | |||
9 | * published by the Free Software Foundation. | 9 | * published by the Free Software Foundation. |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
13 | |||
12 | #include <linux/types.h> | 14 | #include <linux/types.h> |
13 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
14 | #include <linux/init.h> | 16 | #include <linux/init.h> |
@@ -635,13 +637,13 @@ static int s5pv210_cpufreq_probe(struct platform_device *pdev) | |||
635 | 637 | ||
636 | arm_regulator = regulator_get(NULL, "vddarm"); | 638 | arm_regulator = regulator_get(NULL, "vddarm"); |
637 | if (IS_ERR(arm_regulator)) { | 639 | if (IS_ERR(arm_regulator)) { |
638 | pr_err("failed to get regulator vddarm"); | 640 | pr_err("failed to get regulator vddarm\n"); |
639 | return PTR_ERR(arm_regulator); | 641 | return PTR_ERR(arm_regulator); |
640 | } | 642 | } |
641 | 643 | ||
642 | int_regulator = regulator_get(NULL, "vddint"); | 644 | int_regulator = regulator_get(NULL, "vddint"); |
643 | if (IS_ERR(int_regulator)) { | 645 | if (IS_ERR(int_regulator)) { |
644 | pr_err("failed to get regulator vddint"); | 646 | pr_err("failed to get regulator vddint\n"); |
645 | regulator_put(arm_regulator); | 647 | regulator_put(arm_regulator); |
646 | return PTR_ERR(int_regulator); | 648 | return PTR_ERR(int_regulator); |
647 | } | 649 | } |
diff --git a/drivers/cpufreq/sc520_freq.c b/drivers/cpufreq/sc520_freq.c index 57bbddf55786..4225501a4b78 100644 --- a/drivers/cpufreq/sc520_freq.c +++ b/drivers/cpufreq/sc520_freq.c | |||
@@ -13,6 +13,8 @@ | |||
13 | * 2005-03-30: - initial revision | 13 | * 2005-03-30: - initial revision |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
17 | |||
16 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
17 | #include <linux/module.h> | 19 | #include <linux/module.h> |
18 | #include <linux/init.h> | 20 | #include <linux/init.h> |
@@ -30,8 +32,6 @@ | |||
30 | 32 | ||
31 | static __u8 __iomem *cpuctl; | 33 | static __u8 __iomem *cpuctl; |
32 | 34 | ||
33 | #define PFX "sc520_freq: " | ||
34 | |||
35 | static struct cpufreq_frequency_table sc520_freq_table[] = { | 35 | static struct cpufreq_frequency_table sc520_freq_table[] = { |
36 | {0, 0x01, 100000}, | 36 | {0, 0x01, 100000}, |
37 | {0, 0x02, 133000}, | 37 | {0, 0x02, 133000}, |
@@ -44,7 +44,7 @@ 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 | pr_err(PFX "error: cpuctl register has unexpected value %02x\n", | 47 | pr_err("error: cpuctl register has unexpected value %02x\n", |
48 | clockspeed_reg); | 48 | clockspeed_reg); |
49 | case 0x01: | 49 | case 0x01: |
50 | return 100000; | 50 | return 100000; |
diff --git a/drivers/cpufreq/speedstep-centrino.c b/drivers/cpufreq/speedstep-centrino.c index 47df2d649b78..41bc5397f4bb 100644 --- a/drivers/cpufreq/speedstep-centrino.c +++ b/drivers/cpufreq/speedstep-centrino.c | |||
@@ -13,6 +13,8 @@ | |||
13 | * Copyright (C) 2003 Jeremy Fitzhardinge <jeremy@goop.org> | 13 | * Copyright (C) 2003 Jeremy Fitzhardinge <jeremy@goop.org> |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
17 | |||
16 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
17 | #include <linux/module.h> | 19 | #include <linux/module.h> |
18 | #include <linux/init.h> | 20 | #include <linux/init.h> |
@@ -27,7 +29,6 @@ | |||
27 | #include <asm/cpufeature.h> | 29 | #include <asm/cpufeature.h> |
28 | #include <asm/cpu_device_id.h> | 30 | #include <asm/cpu_device_id.h> |
29 | 31 | ||
30 | #define PFX "speedstep-centrino: " | ||
31 | #define MAINTAINER "linux-pm@vger.kernel.org" | 32 | #define MAINTAINER "linux-pm@vger.kernel.org" |
32 | 33 | ||
33 | #define INTEL_MSR_RANGE (0xffff) | 34 | #define INTEL_MSR_RANGE (0xffff) |
@@ -386,7 +387,7 @@ static int centrino_cpu_init(struct cpufreq_policy *policy) | |||
386 | /* check to see if it stuck */ | 387 | /* check to see if it stuck */ |
387 | rdmsr(MSR_IA32_MISC_ENABLE, l, h); | 388 | rdmsr(MSR_IA32_MISC_ENABLE, l, h); |
388 | if (!(l & MSR_IA32_MISC_ENABLE_ENHANCED_SPEEDSTEP)) { | 389 | if (!(l & MSR_IA32_MISC_ENABLE_ENHANCED_SPEEDSTEP)) { |
389 | pr_info(PFX "couldn't enable Enhanced SpeedStep\n"); | 390 | pr_info("couldn't enable Enhanced SpeedStep\n"); |
390 | return -ENODEV; | 391 | return -ENODEV; |
391 | } | 392 | } |
392 | } | 393 | } |
diff --git a/drivers/cpufreq/speedstep-ich.c b/drivers/cpufreq/speedstep-ich.c index 9d00c226a6aa..b86953a3ddc4 100644 --- a/drivers/cpufreq/speedstep-ich.c +++ b/drivers/cpufreq/speedstep-ich.c | |||
@@ -18,6 +18,8 @@ | |||
18 | * SPEEDSTEP - DEFINITIONS * | 18 | * SPEEDSTEP - DEFINITIONS * |
19 | *********************************************************************/ | 19 | *********************************************************************/ |
20 | 20 | ||
21 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
22 | |||
21 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
22 | #include <linux/module.h> | 24 | #include <linux/module.h> |
23 | #include <linux/init.h> | 25 | #include <linux/init.h> |
@@ -68,13 +70,13 @@ static int speedstep_find_register(void) | |||
68 | /* get PMBASE */ | 70 | /* get PMBASE */ |
69 | pci_read_config_dword(speedstep_chipset_dev, 0x40, &pmbase); | 71 | pci_read_config_dword(speedstep_chipset_dev, 0x40, &pmbase); |
70 | if (!(pmbase & 0x01)) { | 72 | if (!(pmbase & 0x01)) { |
71 | pr_err("speedstep-ich: could not find speedstep register\n"); | 73 | pr_err("could not find speedstep register\n"); |
72 | return -ENODEV; | 74 | return -ENODEV; |
73 | } | 75 | } |
74 | 76 | ||
75 | pmbase &= 0xFFFFFFFE; | 77 | pmbase &= 0xFFFFFFFE; |
76 | if (!pmbase) { | 78 | if (!pmbase) { |
77 | pr_err("speedstep-ich: could not find speedstep register\n"); | 79 | pr_err("could not find speedstep register\n"); |
78 | return -ENODEV; | 80 | return -ENODEV; |
79 | } | 81 | } |
80 | 82 | ||
@@ -136,7 +138,7 @@ static void speedstep_set_state(unsigned int state) | |||
136 | pr_debug("change to %u MHz succeeded\n", | 138 | pr_debug("change to %u MHz succeeded\n", |
137 | speedstep_get_frequency(speedstep_processor) / 1000); | 139 | speedstep_get_frequency(speedstep_processor) / 1000); |
138 | else | 140 | else |
139 | pr_err("cpufreq: change failed - I/O error\n"); | 141 | pr_err("change failed - I/O error\n"); |
140 | 142 | ||
141 | return; | 143 | return; |
142 | } | 144 | } |
diff --git a/drivers/cpufreq/speedstep-lib.c b/drivers/cpufreq/speedstep-lib.c index 32bdf1df9517..1b8062182c81 100644 --- a/drivers/cpufreq/speedstep-lib.c +++ b/drivers/cpufreq/speedstep-lib.c | |||
@@ -8,6 +8,8 @@ | |||
8 | * BIG FAT DISCLAIMER: Work in progress code. Possibly *dangerous* | 8 | * BIG FAT DISCLAIMER: Work in progress code. Possibly *dangerous* |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | ||
12 | |||
11 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
12 | #include <linux/module.h> | 14 | #include <linux/module.h> |
13 | #include <linux/moduleparam.h> | 15 | #include <linux/moduleparam.h> |
@@ -453,7 +455,7 @@ unsigned int speedstep_get_freqs(enum speedstep_processor processor, | |||
453 | */ | 455 | */ |
454 | if (*transition_latency > 10000000 || | 456 | if (*transition_latency > 10000000 || |
455 | *transition_latency < 50000) { | 457 | *transition_latency < 50000) { |
456 | pr_warn(PFX "frequency transition measured seems out of range (%u nSec), falling back to a safe one of %u nSec\n", | 458 | pr_warn("frequency transition measured seems out of range (%u nSec), falling back to a safe one of %u nSec\n", |
457 | *transition_latency, 500000); | 459 | *transition_latency, 500000); |
458 | *transition_latency = 500000; | 460 | *transition_latency = 500000; |
459 | } | 461 | } |
diff --git a/drivers/cpufreq/speedstep-smi.c b/drivers/cpufreq/speedstep-smi.c index af32a5f38806..770a9ae1999a 100644 --- a/drivers/cpufreq/speedstep-smi.c +++ b/drivers/cpufreq/speedstep-smi.c | |||
@@ -12,6 +12,8 @@ | |||
12 | * SPEEDSTEP - DEFINITIONS * | 12 | * SPEEDSTEP - DEFINITIONS * |
13 | *********************************************************************/ | 13 | *********************************************************************/ |
14 | 14 | ||
15 | #define pr_fmt(fmt) "cpufreq: " fmt | ||
16 | |||
15 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
16 | #include <linux/module.h> | 18 | #include <linux/module.h> |
17 | #include <linux/moduleparam.h> | 19 | #include <linux/moduleparam.h> |
@@ -204,7 +206,7 @@ static void speedstep_set_state(unsigned int state) | |||
204 | (speedstep_freqs[new_state].frequency / 1000), | 206 | (speedstep_freqs[new_state].frequency / 1000), |
205 | retry, result); | 207 | retry, result); |
206 | else | 208 | else |
207 | pr_err("cpufreq: change to state %u failed with new_state %u and result %u\n", | 209 | pr_err("change to state %u failed with new_state %u and result %u\n", |
208 | state, new_state, result); | 210 | state, new_state, result); |
209 | 211 | ||
210 | return; | 212 | return; |