Commit 529980c8 authored by Linus Torvalds's avatar Linus Torvalds

Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq

parents e3e3679c 52c18fd2
...@@ -467,11 +467,11 @@ static void __init longhaul_setup_voltagescaling(void) ...@@ -467,11 +467,11 @@ static void __init longhaul_setup_voltagescaling(void)
} }
if (vrmrev==0) { if (vrmrev==0) {
dprintk ("VRM 8.5 \n"); dprintk ("VRM 8.5\n");
memcpy (voltage_table, vrm85scales, sizeof(voltage_table)); memcpy (voltage_table, vrm85scales, sizeof(voltage_table));
numvscales = (voltage_table[maxvid]-voltage_table[minvid])/25; numvscales = (voltage_table[maxvid]-voltage_table[minvid])/25;
} else { } else {
dprintk ("Mobile VRM \n"); dprintk ("Mobile VRM\n");
memcpy (voltage_table, mobilevrmscales, sizeof(voltage_table)); memcpy (voltage_table, mobilevrmscales, sizeof(voltage_table));
numvscales = (voltage_table[maxvid]-voltage_table[minvid])/5; numvscales = (voltage_table[maxvid]-voltage_table[minvid])/5;
} }
......
...@@ -259,7 +259,7 @@ static int centrino_cpu_init_table(struct cpufreq_policy *policy) ...@@ -259,7 +259,7 @@ static int centrino_cpu_init_table(struct cpufreq_policy *policy)
if (model->op_points == NULL) { if (model->op_points == NULL) {
/* Matched a non-match */ /* Matched a non-match */
dprintk(KERN_INFO PFX "no table support for CPU model \"%s\": \n", dprintk(KERN_INFO PFX "no table support for CPU model \"%s\"\n",
cpu->x86_model_id); cpu->x86_model_id);
#ifndef CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI #ifndef CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI
dprintk(KERN_INFO PFX "try compiling with CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI enabled\n"); dprintk(KERN_INFO PFX "try compiling with CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI enabled\n");
...@@ -402,7 +402,7 @@ static int centrino_cpu_init_acpi(struct cpufreq_policy *policy) ...@@ -402,7 +402,7 @@ static int centrino_cpu_init_acpi(struct cpufreq_policy *policy)
for (i=0; i<p.state_count; i++) { for (i=0; i<p.state_count; i++) {
if (p.states[i].control != p.states[i].status) { if (p.states[i].control != p.states[i].status) {
dprintk("Different control (%x) and status values (%x)\n", dprintk("Different control (%llu) and status values (%llu)\n",
p.states[i].control, p.states[i].status); p.states[i].control, p.states[i].status);
result = -EINVAL; result = -EINVAL;
goto err_unreg; goto err_unreg;
...@@ -415,7 +415,7 @@ static int centrino_cpu_init_acpi(struct cpufreq_policy *policy) ...@@ -415,7 +415,7 @@ static int centrino_cpu_init_acpi(struct cpufreq_policy *policy)
} }
if (p.states[i].core_frequency > p.states[0].core_frequency) { if (p.states[i].core_frequency > p.states[0].core_frequency) {
dprintk("P%u has larger frequency (%u) than P0 (%u), skipping\n", i, dprintk("P%u has larger frequency (%llu) than P0 (%llu), skipping\n", i,
p.states[i].core_frequency, p.states[0].core_frequency); p.states[i].core_frequency, p.states[0].core_frequency);
p.states[i].core_frequency = 0; p.states[i].core_frequency = 0;
continue; continue;
...@@ -498,13 +498,6 @@ static int centrino_cpu_init(struct cpufreq_policy *policy) ...@@ -498,13 +498,6 @@ static int centrino_cpu_init(struct cpufreq_policy *policy)
if (cpu->x86_vendor != X86_VENDOR_INTEL || !cpu_has(cpu, X86_FEATURE_EST)) if (cpu->x86_vendor != X86_VENDOR_INTEL || !cpu_has(cpu, X86_FEATURE_EST))
return -ENODEV; return -ENODEV;
for (i = 0; i < N_IDS; i++)
if (centrino_verify_cpu_id(cpu, &cpu_ids[i]))
break;
if (i != N_IDS)
centrino_cpu[policy->cpu] = &cpu_ids[i];
if (is_const_loops_cpu(policy->cpu)) { if (is_const_loops_cpu(policy->cpu)) {
centrino_driver.flags |= CPUFREQ_CONST_LOOPS; centrino_driver.flags |= CPUFREQ_CONST_LOOPS;
} }
...@@ -513,6 +506,13 @@ static int centrino_cpu_init(struct cpufreq_policy *policy) ...@@ -513,6 +506,13 @@ static int centrino_cpu_init(struct cpufreq_policy *policy)
if (policy->cpu != 0) if (policy->cpu != 0)
return -ENODEV; return -ENODEV;
for (i = 0; i < N_IDS; i++)
if (centrino_verify_cpu_id(cpu, &cpu_ids[i]))
break;
if (i != N_IDS)
centrino_cpu[policy->cpu] = &cpu_ids[i];
if (!centrino_cpu[policy->cpu]) { if (!centrino_cpu[policy->cpu]) {
dprintk(KERN_INFO PFX "found unsupported CPU with " dprintk(KERN_INFO PFX "found unsupported CPU with "
"Enhanced SpeedStep: send /proc/cpuinfo to " "Enhanced SpeedStep: send /proc/cpuinfo to "
......
...@@ -99,7 +99,7 @@ static int speedstep_smi_get_freqs (unsigned int *low, unsigned int *high) ...@@ -99,7 +99,7 @@ static int speedstep_smi_get_freqs (unsigned int *low, unsigned int *high)
u32 function = GET_SPEEDSTEP_FREQS; u32 function = GET_SPEEDSTEP_FREQS;
if (!(ist_info.event & 0xFFFF)) { if (!(ist_info.event & 0xFFFF)) {
dprintk("bug #1422 -- can't read freqs from BIOS\n", result); dprintk("bug #1422 -- can't read freqs from BIOS\n");
return -ENODEV; return -ENODEV;
} }
......
...@@ -627,7 +627,7 @@ static int cpufreq_add_dev (struct sys_device * sys_dev) ...@@ -627,7 +627,7 @@ static int cpufreq_add_dev (struct sys_device * sys_dev)
ret = kobject_register(&policy->kobj); ret = kobject_register(&policy->kobj);
if (ret) if (ret)
goto err_out; goto err_out_driver_exit;
/* set up files for this cpu device */ /* set up files for this cpu device */
drv_attr = cpufreq_driver->attr; drv_attr = cpufreq_driver->attr;
...@@ -673,6 +673,10 @@ err_out_unregister: ...@@ -673,6 +673,10 @@ err_out_unregister:
kobject_unregister(&policy->kobj); kobject_unregister(&policy->kobj);
wait_for_completion(&policy->kobj_unregister); wait_for_completion(&policy->kobj_unregister);
err_out_driver_exit:
if (cpufreq_driver->exit)
cpufreq_driver->exit(policy);
err_out: err_out:
kfree(policy); kfree(policy);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment