Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 288850
b: refs/heads/master
c: 9061e0e
h: refs/heads/master
v: v3
  • Loading branch information
Andi Kleen authored and Greg Kroah-Hartman committed Jan 27, 2012
1 parent fa19e58 commit 2f12459
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b66b8b9a4a79087dde1b358a016e5c8739ccf186
refs/heads/master: 9061e0e16700ef228837e96987ff51794c956197
1 change: 1 addition & 0 deletions trunk/drivers/acpi/processor_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,7 @@ static int __cpuinit acpi_processor_add(struct acpi_device *device)

#ifdef CONFIG_CPU_FREQ
acpi_processor_ppc_has_changed(pr, 0);
acpi_processor_load_module(pr);
#endif
acpi_processor_get_throttling_info(pr);
acpi_processor_get_limit_info(pr);
Expand Down
22 changes: 22 additions & 0 deletions trunk/drivers/acpi/processor_perflib.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,28 @@ void acpi_processor_ppc_exit(void)
acpi_processor_ppc_status &= ~PPC_REGISTERED;
}

/*
* Do a quick check if the systems looks like it should use ACPI
* cpufreq. We look at a _PCT method being available, but don't
* do a whole lot of sanity checks.
*/
void acpi_processor_load_module(struct acpi_processor *pr)
{
static int requested;
acpi_status status = 0;
struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };

if (!arch_has_acpi_pdc() || requested)
return;
status = acpi_evaluate_object(pr->handle, "_PCT", NULL, &buffer);
if (!ACPI_FAILURE(status)) {
printk(KERN_INFO PREFIX "Requesting acpi_cpufreq\n");
request_module_nowait("acpi_cpufreq");
requested = 1;
}
kfree(buffer.pointer);
}

static int acpi_processor_get_performance_control(struct acpi_processor *pr)
{
int result = 0;
Expand Down
1 change: 1 addition & 0 deletions trunk/include/acpi/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ struct acpi_processor_errata {
} piix4;
};

extern void acpi_processor_load_module(struct acpi_processor *pr);
extern int acpi_processor_preregister_performance(struct
acpi_processor_performance
__percpu *performance);
Expand Down

0 comments on commit 2f12459

Please sign in to comment.