diff options
Diffstat (limited to 'arch/x86/kernel/cpu/cpufreq')
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/Kconfig | 9 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c | 8 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/powernow-k7.c | 2 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/powernow-k8.c | 15 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c | 2 |
5 files changed, 18 insertions, 18 deletions
diff --git a/arch/x86/kernel/cpu/cpufreq/Kconfig b/arch/x86/kernel/cpu/cpufreq/Kconfig index 52c839875478..f138c6c389b9 100644 --- a/arch/x86/kernel/cpu/cpufreq/Kconfig +++ b/arch/x86/kernel/cpu/cpufreq/Kconfig | |||
@@ -220,11 +220,14 @@ config X86_LONGHAUL | |||
220 | If in doubt, say N. | 220 | If in doubt, say N. |
221 | 221 | ||
222 | config X86_E_POWERSAVER | 222 | config X86_E_POWERSAVER |
223 | tristate "VIA C7 Enhanced PowerSaver" | 223 | tristate "VIA C7 Enhanced PowerSaver (DANGEROUS)" |
224 | select CPU_FREQ_TABLE | 224 | select CPU_FREQ_TABLE |
225 | depends on X86_32 | 225 | depends on X86_32 && EXPERIMENTAL |
226 | help | 226 | help |
227 | This adds the CPUFreq driver for VIA C7 processors. | 227 | This adds the CPUFreq driver for VIA C7 processors. However, this driver |
228 | does not have any safeguards to prevent operating the CPU out of spec | ||
229 | and is thus considered dangerous. Please use the regular ACPI cpufreq | ||
230 | driver, enabled by CONFIG_X86_ACPI_CPUFREQ. | ||
228 | 231 | ||
229 | If in doubt, say N. | 232 | If in doubt, say N. |
230 | 233 | ||
diff --git a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c index 54b6de2cd947..ae9b503220ca 100644 --- a/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c +++ b/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.c | |||
@@ -90,11 +90,7 @@ static int check_est_cpu(unsigned int cpuid) | |||
90 | { | 90 | { |
91 | struct cpuinfo_x86 *cpu = &cpu_data(cpuid); | 91 | struct cpuinfo_x86 *cpu = &cpu_data(cpuid); |
92 | 92 | ||
93 | if (cpu->x86_vendor != X86_VENDOR_INTEL || | 93 | return cpu_has(cpu, X86_FEATURE_EST); |
94 | !cpu_has(cpu, X86_FEATURE_EST)) | ||
95 | return 0; | ||
96 | |||
97 | return 1; | ||
98 | } | 94 | } |
99 | 95 | ||
100 | static unsigned extract_io(u32 value, struct acpi_cpufreq_data *data) | 96 | static unsigned extract_io(u32 value, struct acpi_cpufreq_data *data) |
@@ -550,7 +546,7 @@ static int __init acpi_cpufreq_early_init(void) | |||
550 | return -ENOMEM; | 546 | return -ENOMEM; |
551 | } | 547 | } |
552 | for_each_possible_cpu(i) { | 548 | for_each_possible_cpu(i) { |
553 | if (!alloc_cpumask_var_node( | 549 | if (!zalloc_cpumask_var_node( |
554 | &per_cpu_ptr(acpi_perf_data, i)->shared_cpu_map, | 550 | &per_cpu_ptr(acpi_perf_data, i)->shared_cpu_map, |
555 | GFP_KERNEL, cpu_to_node(i))) { | 551 | GFP_KERNEL, cpu_to_node(i))) { |
556 | 552 | ||
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k7.c b/arch/x86/kernel/cpu/cpufreq/powernow-k7.c index a8363e5be4ef..d47c775eb0ab 100644 --- a/arch/x86/kernel/cpu/cpufreq/powernow-k7.c +++ b/arch/x86/kernel/cpu/cpufreq/powernow-k7.c | |||
@@ -322,7 +322,7 @@ static int powernow_acpi_init(void) | |||
322 | goto err0; | 322 | goto err0; |
323 | } | 323 | } |
324 | 324 | ||
325 | if (!alloc_cpumask_var(&acpi_processor_perf->shared_cpu_map, | 325 | if (!zalloc_cpumask_var(&acpi_processor_perf->shared_cpu_map, |
326 | GFP_KERNEL)) { | 326 | GFP_KERNEL)) { |
327 | retval = -ENOMEM; | 327 | retval = -ENOMEM; |
328 | goto err05; | 328 | goto err05; |
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c index f6b32d112357..cf52215d9eb1 100644 --- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c +++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c | |||
@@ -835,7 +835,7 @@ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data) | |||
835 | { | 835 | { |
836 | struct cpufreq_frequency_table *powernow_table; | 836 | struct cpufreq_frequency_table *powernow_table; |
837 | int ret_val = -ENODEV; | 837 | int ret_val = -ENODEV; |
838 | acpi_integer space_id; | 838 | acpi_integer control, status; |
839 | 839 | ||
840 | if (acpi_processor_register_performance(&data->acpi_data, data->cpu)) { | 840 | if (acpi_processor_register_performance(&data->acpi_data, data->cpu)) { |
841 | dprintk("register performance failed: bad ACPI data\n"); | 841 | dprintk("register performance failed: bad ACPI data\n"); |
@@ -848,12 +848,13 @@ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data) | |||
848 | goto err_out; | 848 | goto err_out; |
849 | } | 849 | } |
850 | 850 | ||
851 | space_id = data->acpi_data.control_register.space_id; | 851 | control = data->acpi_data.control_register.space_id; |
852 | if ((space_id != ACPI_ADR_SPACE_FIXED_HARDWARE) || | 852 | status = data->acpi_data.status_register.space_id; |
853 | (space_id != ACPI_ADR_SPACE_FIXED_HARDWARE)) { | 853 | |
854 | if ((control != ACPI_ADR_SPACE_FIXED_HARDWARE) || | ||
855 | (status != ACPI_ADR_SPACE_FIXED_HARDWARE)) { | ||
854 | dprintk("Invalid control/status registers (%x - %x)\n", | 856 | dprintk("Invalid control/status registers (%x - %x)\n", |
855 | data->acpi_data.control_register.space_id, | 857 | control, status); |
856 | space_id); | ||
857 | goto err_out; | 858 | goto err_out; |
858 | } | 859 | } |
859 | 860 | ||
@@ -886,7 +887,7 @@ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data) | |||
886 | /* notify BIOS that we exist */ | 887 | /* notify BIOS that we exist */ |
887 | acpi_processor_notify_smm(THIS_MODULE); | 888 | acpi_processor_notify_smm(THIS_MODULE); |
888 | 889 | ||
889 | if (!alloc_cpumask_var(&data->acpi_data.shared_cpu_map, GFP_KERNEL)) { | 890 | if (!zalloc_cpumask_var(&data->acpi_data.shared_cpu_map, GFP_KERNEL)) { |
890 | printk(KERN_ERR PFX | 891 | printk(KERN_ERR PFX |
891 | "unable to alloc powernow_k8_data cpumask\n"); | 892 | "unable to alloc powernow_k8_data cpumask\n"); |
892 | ret_val = -ENOMEM; | 893 | ret_val = -ENOMEM; |
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c index c9f1fdc02830..55c831ed71ce 100644 --- a/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c +++ b/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c | |||
@@ -471,7 +471,7 @@ static int centrino_target (struct cpufreq_policy *policy, | |||
471 | 471 | ||
472 | if (unlikely(!alloc_cpumask_var(&saved_mask, GFP_KERNEL))) | 472 | if (unlikely(!alloc_cpumask_var(&saved_mask, GFP_KERNEL))) |
473 | return -ENOMEM; | 473 | return -ENOMEM; |
474 | if (unlikely(!alloc_cpumask_var(&covered_cpus, GFP_KERNEL))) { | 474 | if (unlikely(!zalloc_cpumask_var(&covered_cpus, GFP_KERNEL))) { |
475 | free_cpumask_var(saved_mask); | 475 | free_cpumask_var(saved_mask); |
476 | return -ENOMEM; | 476 | return -ENOMEM; |
477 | } | 477 | } |