Skip to content

Commit

Permalink
Pull thermal into release branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Len Brown committed Nov 20, 2007
2 parents c2e46d2 + f79f06a commit 614a6bb
Show file tree
Hide file tree
Showing 4 changed files with 244 additions and 82 deletions.
3 changes: 3 additions & 0 deletions arch/x86/kernel/acpi/processor.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ static void init_intel_pdc(struct acpi_processor *pr, struct cpuinfo_x86 *c)
if (cpu_has(c, X86_FEATURE_EST))
buf[2] |= ACPI_PDC_EST_CAPABILITY_SWSMP;

if (cpu_has(c, X86_FEATURE_ACPI))
buf[2] |= ACPI_PDC_T_FFH;

obj->type = ACPI_TYPE_BUFFER;
obj->buffer.length = 12;
obj->buffer.pointer = (u8 *) buf;
Expand Down
25 changes: 9 additions & 16 deletions drivers/acpi/osl.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,17 +387,14 @@ acpi_status acpi_os_read_port(acpi_io_address port, u32 * value, u32 width)
if (!value)
value = &dummy;

switch (width) {
case 8:
*value = 0;
if (width <= 8) {
*(u8 *) value = inb(port);
break;
case 16:
} else if (width <= 16) {
*(u16 *) value = inw(port);
break;
case 32:
} else if (width <= 32) {
*(u32 *) value = inl(port);
break;
default:
} else {
BUG();
}

Expand All @@ -408,17 +405,13 @@ EXPORT_SYMBOL(acpi_os_read_port);

acpi_status acpi_os_write_port(acpi_io_address port, u32 value, u32 width)
{
switch (width) {
case 8:
if (width <= 8) {
outb(value, port);
break;
case 16:
} else if (width <= 16) {
outw(value, port);
break;
case 32:
} else if (width <= 32) {
outl(value, port);
break;
default:
} else {
BUG();
}

Expand Down
12 changes: 6 additions & 6 deletions drivers/acpi/processor_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -612,12 +612,6 @@ static int acpi_processor_get_info(struct acpi_processor *pr, unsigned has_uid)
request_region(pr->throttling.address, 6, "ACPI CPU throttle");
}

#ifdef CONFIG_CPU_FREQ
acpi_processor_ppc_has_changed(pr);
#endif
acpi_processor_get_throttling_info(pr);
acpi_processor_get_limit_info(pr);

return 0;
}

Expand Down Expand Up @@ -665,6 +659,12 @@ static int __cpuinit acpi_processor_start(struct acpi_device *device)
/* _PDC call should be done before doing anything else (if reqd.). */
arch_acpi_processor_init_pdc(pr);
acpi_processor_set_pdc(pr);
#ifdef CONFIG_CPU_FREQ
acpi_processor_ppc_has_changed(pr);
#endif
acpi_processor_get_throttling_info(pr);
acpi_processor_get_limit_info(pr);


acpi_processor_power_init(pr, device);

Expand Down
Loading

0 comments on commit 614a6bb

Please sign in to comment.