Skip to content

Commit

Permalink
Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq
Browse files Browse the repository at this point in the history
  • Loading branch information
Linus Torvalds committed Sep 9, 2005
2 parents e3e3679 + 52c18fd commit 529980c
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 14 deletions.
4 changes: 2 additions & 2 deletions arch/i386/kernel/cpu/cpufreq/longhaul.c
Original file line number Diff line number Diff line change
Expand Up @@ -467,11 +467,11 @@ static void __init longhaul_setup_voltagescaling(void)
}

if (vrmrev==0) {
dprintk ("VRM 8.5 \n");
dprintk ("VRM 8.5\n");
memcpy (voltage_table, vrm85scales, sizeof(voltage_table));
numvscales = (voltage_table[maxvid]-voltage_table[minvid])/25;
} else {
dprintk ("Mobile VRM \n");
dprintk ("Mobile VRM\n");
memcpy (voltage_table, mobilevrmscales, sizeof(voltage_table));
numvscales = (voltage_table[maxvid]-voltage_table[minvid])/5;
}
Expand Down
20 changes: 10 additions & 10 deletions arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ static int centrino_cpu_init_table(struct cpufreq_policy *policy)

if (model->op_points == NULL) {
/* 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);
#ifndef CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI
dprintk(KERN_INFO PFX "try compiling with CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI enabled\n");
Expand Down Expand Up @@ -402,7 +402,7 @@ static int centrino_cpu_init_acpi(struct cpufreq_policy *policy)

for (i=0; i<p.state_count; i++) {
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);
result = -EINVAL;
goto err_unreg;
Expand All @@ -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) {
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 = 0;
continue;
Expand Down Expand Up @@ -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))
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)) {
centrino_driver.flags |= CPUFREQ_CONST_LOOPS;
}
Expand All @@ -513,6 +506,13 @@ static int centrino_cpu_init(struct cpufreq_policy *policy)
if (policy->cpu != 0)
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]) {
dprintk(KERN_INFO PFX "found unsupported CPU with "
"Enhanced SpeedStep: send /proc/cpuinfo to "
Expand Down
2 changes: 1 addition & 1 deletion arch/i386/kernel/cpu/cpufreq/speedstep-smi.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ static int speedstep_smi_get_freqs (unsigned int *low, unsigned int *high)
u32 function = GET_SPEEDSTEP_FREQS;

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;
}

Expand Down
6 changes: 5 additions & 1 deletion drivers/cpufreq/cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ static int cpufreq_add_dev (struct sys_device * sys_dev)

ret = kobject_register(&policy->kobj);
if (ret)
goto err_out;
goto err_out_driver_exit;

/* set up files for this cpu device */
drv_attr = cpufreq_driver->attr;
Expand Down Expand Up @@ -673,6 +673,10 @@ static int cpufreq_add_dev (struct sys_device * sys_dev)
kobject_unregister(&policy->kobj);
wait_for_completion(&policy->kobj_unregister);

err_out_driver_exit:
if (cpufreq_driver->exit)
cpufreq_driver->exit(policy);

err_out:
kfree(policy);

Expand Down

0 comments on commit 529980c

Please sign in to comment.