diff options
Diffstat (limited to 'arch/x86/kernel/cpu/cpufreq')
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/longhaul.c | 4 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/p4-clockmod.c | 6 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c | 4 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/powernow-k8.c | 18 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/speedstep-smi.c | 4 |
5 files changed, 20 insertions, 16 deletions
diff --git a/arch/x86/kernel/cpu/cpufreq/longhaul.c b/arch/x86/kernel/cpu/cpufreq/longhaul.c index 03162dac6271..cf48cdd6907d 100644 --- a/arch/x86/kernel/cpu/cpufreq/longhaul.c +++ b/arch/x86/kernel/cpu/cpufreq/longhaul.c | |||
@@ -444,7 +444,7 @@ static int __cpuinit longhaul_get_ranges(void) | |||
444 | return -EINVAL; | 444 | return -EINVAL; |
445 | } | 445 | } |
446 | /* Get max multiplier - as we always did. | 446 | /* Get max multiplier - as we always did. |
447 | * Longhaul MSR is usefull only when voltage scaling is enabled. | 447 | * Longhaul MSR is useful only when voltage scaling is enabled. |
448 | * C3 is booting at max anyway. */ | 448 | * C3 is booting at max anyway. */ |
449 | maxmult = mult; | 449 | maxmult = mult; |
450 | /* Get min multiplier */ | 450 | /* Get min multiplier */ |
@@ -1011,7 +1011,7 @@ static void __exit longhaul_exit(void) | |||
1011 | * trigger frequency transition in some cases. */ | 1011 | * trigger frequency transition in some cases. */ |
1012 | module_param(disable_acpi_c3, int, 0644); | 1012 | module_param(disable_acpi_c3, int, 0644); |
1013 | MODULE_PARM_DESC(disable_acpi_c3, "Don't use ACPI C3 support"); | 1013 | MODULE_PARM_DESC(disable_acpi_c3, "Don't use ACPI C3 support"); |
1014 | /* Change CPU voltage with frequency. Very usefull to save | 1014 | /* Change CPU voltage with frequency. Very useful to save |
1015 | * power, but most VIA C3 processors aren't supporting it. */ | 1015 | * power, but most VIA C3 processors aren't supporting it. */ |
1016 | module_param(scale_voltage, int, 0644); | 1016 | module_param(scale_voltage, int, 0644); |
1017 | MODULE_PARM_DESC(scale_voltage, "Scale voltage of processor"); | 1017 | MODULE_PARM_DESC(scale_voltage, "Scale voltage of processor"); |
diff --git a/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c b/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c index bd1cac747f67..52c93648e492 100644 --- a/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c +++ b/arch/x86/kernel/cpu/cpufreq/p4-clockmod.c | |||
@@ -158,9 +158,9 @@ static unsigned int cpufreq_p4_get_frequency(struct cpuinfo_x86 *c) | |||
158 | { | 158 | { |
159 | if (c->x86 == 0x06) { | 159 | if (c->x86 == 0x06) { |
160 | if (cpu_has(c, X86_FEATURE_EST)) | 160 | if (cpu_has(c, X86_FEATURE_EST)) |
161 | printk(KERN_WARNING PFX "Warning: EST-capable CPU " | 161 | printk_once(KERN_WARNING PFX "Warning: EST-capable " |
162 | "detected. The acpi-cpufreq module offers " | 162 | "CPU detected. The acpi-cpufreq module offers " |
163 | "voltage scaling in addition of frequency " | 163 | "voltage scaling in addition to frequency " |
164 | "scaling. You should use that instead of " | 164 | "scaling. You should use that instead of " |
165 | "p4-clockmod, if possible.\n"); | 165 | "p4-clockmod, if possible.\n"); |
166 | switch (c->x86_model) { | 166 | switch (c->x86_model) { |
diff --git a/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c b/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c index 4f6f679f2799..755a31e0f5b0 100644 --- a/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c +++ b/arch/x86/kernel/cpu/cpufreq/pcc-cpufreq.c | |||
@@ -195,7 +195,7 @@ static unsigned int pcc_get_freq(unsigned int cpu) | |||
195 | cmd_incomplete: | 195 | cmd_incomplete: |
196 | iowrite16(0, &pcch_hdr->status); | 196 | iowrite16(0, &pcch_hdr->status); |
197 | spin_unlock(&pcc_lock); | 197 | spin_unlock(&pcc_lock); |
198 | return -EINVAL; | 198 | return 0; |
199 | } | 199 | } |
200 | 200 | ||
201 | static int pcc_cpufreq_target(struct cpufreq_policy *policy, | 201 | static int pcc_cpufreq_target(struct cpufreq_policy *policy, |
@@ -315,8 +315,6 @@ static int __init pcc_cpufreq_do_osc(acpi_handle *handle) | |||
315 | 315 | ||
316 | input.count = 4; | 316 | input.count = 4; |
317 | input.pointer = in_params; | 317 | input.pointer = in_params; |
318 | input.count = 4; | ||
319 | input.pointer = in_params; | ||
320 | in_params[0].type = ACPI_TYPE_BUFFER; | 318 | in_params[0].type = ACPI_TYPE_BUFFER; |
321 | in_params[0].buffer.length = 16; | 319 | in_params[0].buffer.length = 16; |
322 | in_params[0].buffer.pointer = OSC_UUID; | 320 | in_params[0].buffer.pointer = OSC_UUID; |
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c index 35c7e65e59be..2368e38327b3 100644 --- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c +++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c | |||
@@ -630,8 +630,7 @@ static void print_basics(struct powernow_k8_data *data) | |||
630 | data->powernow_table[j].frequency/1000); | 630 | data->powernow_table[j].frequency/1000); |
631 | } else { | 631 | } else { |
632 | printk(KERN_INFO PFX | 632 | printk(KERN_INFO PFX |
633 | " %d : fid 0x%x (%d MHz), vid 0x%x\n", | 633 | "fid 0x%x (%d MHz), vid 0x%x\n", |
634 | j, | ||
635 | data->powernow_table[j].index & 0xff, | 634 | data->powernow_table[j].index & 0xff, |
636 | data->powernow_table[j].frequency/1000, | 635 | data->powernow_table[j].frequency/1000, |
637 | data->powernow_table[j].index >> 8); | 636 | data->powernow_table[j].index >> 8); |
@@ -1276,7 +1275,7 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol) | |||
1276 | 1275 | ||
1277 | if (powernow_k8_cpu_init_acpi(data)) { | 1276 | if (powernow_k8_cpu_init_acpi(data)) { |
1278 | /* | 1277 | /* |
1279 | * Use the PSB BIOS structure. This is only availabe on | 1278 | * Use the PSB BIOS structure. This is only available on |
1280 | * an UP version, and is deprecated by AMD. | 1279 | * an UP version, and is deprecated by AMD. |
1281 | */ | 1280 | */ |
1282 | if (num_online_cpus() != 1) { | 1281 | if (num_online_cpus() != 1) { |
@@ -1537,6 +1536,7 @@ static struct notifier_block cpb_nb = { | |||
1537 | static int __cpuinit powernowk8_init(void) | 1536 | static int __cpuinit powernowk8_init(void) |
1538 | { | 1537 | { |
1539 | unsigned int i, supported_cpus = 0, cpu; | 1538 | unsigned int i, supported_cpus = 0, cpu; |
1539 | int rv; | ||
1540 | 1540 | ||
1541 | for_each_online_cpu(i) { | 1541 | for_each_online_cpu(i) { |
1542 | int rc; | 1542 | int rc; |
@@ -1555,14 +1555,14 @@ static int __cpuinit powernowk8_init(void) | |||
1555 | 1555 | ||
1556 | cpb_capable = true; | 1556 | cpb_capable = true; |
1557 | 1557 | ||
1558 | register_cpu_notifier(&cpb_nb); | ||
1559 | |||
1560 | msrs = msrs_alloc(); | 1558 | msrs = msrs_alloc(); |
1561 | if (!msrs) { | 1559 | if (!msrs) { |
1562 | printk(KERN_ERR "%s: Error allocating msrs!\n", __func__); | 1560 | printk(KERN_ERR "%s: Error allocating msrs!\n", __func__); |
1563 | return -ENOMEM; | 1561 | return -ENOMEM; |
1564 | } | 1562 | } |
1565 | 1563 | ||
1564 | register_cpu_notifier(&cpb_nb); | ||
1565 | |||
1566 | rdmsr_on_cpus(cpu_online_mask, MSR_K7_HWCR, msrs); | 1566 | rdmsr_on_cpus(cpu_online_mask, MSR_K7_HWCR, msrs); |
1567 | 1567 | ||
1568 | for_each_cpu(cpu, cpu_online_mask) { | 1568 | for_each_cpu(cpu, cpu_online_mask) { |
@@ -1574,7 +1574,13 @@ static int __cpuinit powernowk8_init(void) | |||
1574 | (cpb_enabled ? "on" : "off")); | 1574 | (cpb_enabled ? "on" : "off")); |
1575 | } | 1575 | } |
1576 | 1576 | ||
1577 | return cpufreq_register_driver(&cpufreq_amd64_driver); | 1577 | rv = cpufreq_register_driver(&cpufreq_amd64_driver); |
1578 | if (rv < 0 && boot_cpu_has(X86_FEATURE_CPB)) { | ||
1579 | unregister_cpu_notifier(&cpb_nb); | ||
1580 | msrs_free(msrs); | ||
1581 | msrs = NULL; | ||
1582 | } | ||
1583 | return rv; | ||
1578 | } | 1584 | } |
1579 | 1585 | ||
1580 | /* driver entry point for term */ | 1586 | /* driver entry point for term */ |
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-smi.c b/arch/x86/kernel/cpu/cpufreq/speedstep-smi.c index 8abd869baabf..91bc25b67bc1 100644 --- a/arch/x86/kernel/cpu/cpufreq/speedstep-smi.c +++ b/arch/x86/kernel/cpu/cpufreq/speedstep-smi.c | |||
@@ -292,7 +292,7 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy) | |||
292 | 292 | ||
293 | result = speedstep_smi_ownership(); | 293 | result = speedstep_smi_ownership(); |
294 | if (result) { | 294 | if (result) { |
295 | dprintk("fails in aquiring ownership of a SMI interface.\n"); | 295 | dprintk("fails in acquiring ownership of a SMI interface.\n"); |
296 | return -EINVAL; | 296 | return -EINVAL; |
297 | } | 297 | } |
298 | 298 | ||
@@ -360,7 +360,7 @@ static int speedstep_resume(struct cpufreq_policy *policy) | |||
360 | int result = speedstep_smi_ownership(); | 360 | int result = speedstep_smi_ownership(); |
361 | 361 | ||
362 | if (result) | 362 | if (result) |
363 | dprintk("fails in re-aquiring ownership of a SMI interface.\n"); | 363 | dprintk("fails in re-acquiring ownership of a SMI interface.\n"); |
364 | 364 | ||
365 | return result; | 365 | return result; |
366 | } | 366 | } |