Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 351018
b: refs/heads/master
c: c0939e4
h: refs/heads/master
v: v3
  • Loading branch information
Borislav Petkov authored and Rafael J. Wysocki committed Feb 1, 2013
1 parent 0b4125e commit 2723318
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4827ea6ec9ca1e873a6d387a3ee287f78ea5ee83
refs/heads/master: c0939e46a84c6af89d6f093a34c1c9341dfe1d6e
25 changes: 14 additions & 11 deletions trunk/drivers/cpufreq/powernow-k8.c
Original file line number Diff line number Diff line change
Expand Up @@ -1271,7 +1271,7 @@ static void __request_acpi_cpufreq(void)
static int __cpuinit powernowk8_init(void)
{
unsigned int i, supported_cpus = 0;
int rv;
int ret;

if (static_cpu_has(X86_FEATURE_HW_PSTATE)) {
__request_acpi_cpufreq();
Expand All @@ -1281,24 +1281,27 @@ static int __cpuinit powernowk8_init(void)
if (!x86_match_cpu(powernow_k8_ids))
return -ENODEV;

get_online_cpus();
for_each_online_cpu(i) {
int rc;
smp_call_function_single(i, check_supported_cpu, &rc, 1);
if (rc == 0)
smp_call_function_single(i, check_supported_cpu, &ret, 1);
if (!ret)
supported_cpus++;
}

if (supported_cpus != num_online_cpus())
if (supported_cpus != num_online_cpus()) {
put_online_cpus();
return -ENODEV;
}
put_online_cpus();

rv = cpufreq_register_driver(&cpufreq_amd64_driver);
ret = cpufreq_register_driver(&cpufreq_amd64_driver);
if (ret)
return ret;

if (!rv)
pr_info(PFX "Found %d %s (%d cpu cores) (" VERSION ")\n",
num_online_nodes(), boot_cpu_data.x86_model_id,
supported_cpus);
pr_info(PFX "Found %d %s (%d cpu cores) (" VERSION ")\n",
num_online_nodes(), boot_cpu_data.x86_model_id, supported_cpus);

return rv;
return ret;
}

/* driver entry point for term */
Expand Down

0 comments on commit 2723318

Please sign in to comment.