Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 351017
b: refs/heads/master
c: 4827ea6
h: refs/heads/master
i:
  351015: e1acedd
v: v3
  • Loading branch information
Borislav Petkov authored and Rafael J. Wysocki committed Feb 1, 2013
1 parent f41d345 commit 0b4125e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 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: 9d95046e5d6afd6d7ae86fb71ab59c6faf0db8de
refs/heads/master: 4827ea6ec9ca1e873a6d387a3ee287f78ea5ee83
21 changes: 19 additions & 2 deletions trunk/drivers/cpufreq/powernow-k8.c
Original file line number Diff line number Diff line change
Expand Up @@ -1249,15 +1249,32 @@ static struct cpufreq_driver cpufreq_amd64_driver = {
.attr = powernow_k8_attr,
};

static void __request_acpi_cpufreq(void)
{
const char *cur_drv, *drv = "acpi-cpufreq";

cur_drv = cpufreq_get_current_driver();
if (!cur_drv)
goto request;

if (strncmp(cur_drv, drv, min_t(size_t, strlen(cur_drv), strlen(drv))))
pr_warn(PFX "WTF driver: %s\n", cur_drv);

return;

request:
pr_warn(PFX "This CPU is not supported anymore, using acpi-cpufreq instead.\n");
request_module(drv);
}

/* driver entry point for init */
static int __cpuinit powernowk8_init(void)
{
unsigned int i, supported_cpus = 0;
int rv;

if (static_cpu_has(X86_FEATURE_HW_PSTATE)) {
pr_warn(PFX "this CPU is not supported anymore, using acpi-cpufreq instead.\n");
request_module("acpi-cpufreq");
__request_acpi_cpufreq();
return -ENODEV;
}

Expand Down

0 comments on commit 0b4125e

Please sign in to comment.