diff options
Diffstat (limited to 'drivers/acpi/processor_idle.c')
-rw-r--r-- | drivers/acpi/processor_idle.c | 72 |
1 files changed, 34 insertions, 38 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index d1676b1754d9..e88e8ae04fdb 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
@@ -110,6 +110,14 @@ static struct dmi_system_id __cpuinitdata processor_power_dmi_table[] = { | |||
110 | DMI_MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"), | 110 | DMI_MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"), |
111 | DMI_MATCH(DMI_BIOS_VERSION,"SHE845M0.86C.0013.D.0302131307")}, | 111 | DMI_MATCH(DMI_BIOS_VERSION,"SHE845M0.86C.0013.D.0302131307")}, |
112 | (void *)2}, | 112 | (void *)2}, |
113 | { set_max_cstate, "Pavilion zv5000", { | ||
114 | DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), | ||
115 | DMI_MATCH(DMI_PRODUCT_NAME,"Pavilion zv5000 (DS502A#ABA)")}, | ||
116 | (void *)1}, | ||
117 | { set_max_cstate, "Asus L8400B", { | ||
118 | DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer Inc."), | ||
119 | DMI_MATCH(DMI_PRODUCT_NAME,"L8400B series Notebook PC")}, | ||
120 | (void *)1}, | ||
113 | {}, | 121 | {}, |
114 | }; | 122 | }; |
115 | 123 | ||
@@ -305,6 +313,28 @@ static int acpi_processor_get_power_info_fadt(struct acpi_processor *pr) | |||
305 | pr->power.states[ACPI_STATE_C2].latency = acpi_gbl_FADT.C2latency; | 313 | pr->power.states[ACPI_STATE_C2].latency = acpi_gbl_FADT.C2latency; |
306 | pr->power.states[ACPI_STATE_C3].latency = acpi_gbl_FADT.C3latency; | 314 | pr->power.states[ACPI_STATE_C3].latency = acpi_gbl_FADT.C3latency; |
307 | 315 | ||
316 | /* | ||
317 | * FADT specified C2 latency must be less than or equal to | ||
318 | * 100 microseconds. | ||
319 | */ | ||
320 | if (acpi_gbl_FADT.C2latency > ACPI_PROCESSOR_MAX_C2_LATENCY) { | ||
321 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | ||
322 | "C2 latency too large [%d]\n", acpi_gbl_FADT.C2latency)); | ||
323 | /* invalidate C2 */ | ||
324 | pr->power.states[ACPI_STATE_C2].address = 0; | ||
325 | } | ||
326 | |||
327 | /* | ||
328 | * FADT supplied C3 latency must be less than or equal to | ||
329 | * 1000 microseconds. | ||
330 | */ | ||
331 | if (acpi_gbl_FADT.C3latency > ACPI_PROCESSOR_MAX_C3_LATENCY) { | ||
332 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | ||
333 | "C3 latency too large [%d]\n", acpi_gbl_FADT.C3latency)); | ||
334 | /* invalidate C3 */ | ||
335 | pr->power.states[ACPI_STATE_C3].address = 0; | ||
336 | } | ||
337 | |||
308 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 338 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
309 | "lvl2[0x%08x] lvl3[0x%08x]\n", | 339 | "lvl2[0x%08x] lvl3[0x%08x]\n", |
310 | pr->power.states[ACPI_STATE_C2].address, | 340 | pr->power.states[ACPI_STATE_C2].address, |
@@ -494,33 +524,6 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr) | |||
494 | return status; | 524 | return status; |
495 | } | 525 | } |
496 | 526 | ||
497 | static void acpi_processor_power_verify_c2(struct acpi_processor_cx *cx) | ||
498 | { | ||
499 | |||
500 | if (!cx->address) | ||
501 | return; | ||
502 | |||
503 | /* | ||
504 | * C2 latency must be less than or equal to 100 | ||
505 | * microseconds. | ||
506 | */ | ||
507 | else if (cx->latency > ACPI_PROCESSOR_MAX_C2_LATENCY) { | ||
508 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | ||
509 | "latency too large [%d]\n", cx->latency)); | ||
510 | return; | ||
511 | } | ||
512 | |||
513 | /* | ||
514 | * Otherwise we've met all of our C2 requirements. | ||
515 | * Normalize the C2 latency to expidite policy | ||
516 | */ | ||
517 | cx->valid = 1; | ||
518 | |||
519 | cx->latency_ticks = cx->latency; | ||
520 | |||
521 | return; | ||
522 | } | ||
523 | |||
524 | static void acpi_processor_power_verify_c3(struct acpi_processor *pr, | 527 | static void acpi_processor_power_verify_c3(struct acpi_processor *pr, |
525 | struct acpi_processor_cx *cx) | 528 | struct acpi_processor_cx *cx) |
526 | { | 529 | { |
@@ -532,16 +535,6 @@ static void acpi_processor_power_verify_c3(struct acpi_processor *pr, | |||
532 | return; | 535 | return; |
533 | 536 | ||
534 | /* | 537 | /* |
535 | * C3 latency must be less than or equal to 1000 | ||
536 | * microseconds. | ||
537 | */ | ||
538 | else if (cx->latency > ACPI_PROCESSOR_MAX_C3_LATENCY) { | ||
539 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | ||
540 | "latency too large [%d]\n", cx->latency)); | ||
541 | return; | ||
542 | } | ||
543 | |||
544 | /* | ||
545 | * PIIX4 Erratum #18: We don't support C3 when Type-F (fast) | 538 | * PIIX4 Erratum #18: We don't support C3 when Type-F (fast) |
546 | * DMA transfers are used by any ISA device to avoid livelock. | 539 | * DMA transfers are used by any ISA device to avoid livelock. |
547 | * Note that we could disable Type-F DMA (as recommended by | 540 | * Note that we could disable Type-F DMA (as recommended by |
@@ -629,7 +622,10 @@ static int acpi_processor_power_verify(struct acpi_processor *pr) | |||
629 | break; | 622 | break; |
630 | 623 | ||
631 | case ACPI_STATE_C2: | 624 | case ACPI_STATE_C2: |
632 | acpi_processor_power_verify_c2(cx); | 625 | if (!cx->address) |
626 | break; | ||
627 | cx->valid = 1; | ||
628 | cx->latency_ticks = cx->latency; /* Normalize latency */ | ||
633 | break; | 629 | break; |
634 | 630 | ||
635 | case ACPI_STATE_C3: | 631 | case ACPI_STATE_C3: |