diff options
Diffstat (limited to 'drivers/acpi/processor_idle.c')
-rw-r--r-- | drivers/acpi/processor_idle.c | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 893b074e3d1a..2c04740c6543 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
@@ -81,30 +81,32 @@ module_param(bm_history, uint, 0644); | |||
81 | * | 81 | * |
82 | * To skip this limit, boot/load with a large max_cstate limit. | 82 | * To skip this limit, boot/load with a large max_cstate limit. |
83 | */ | 83 | */ |
84 | static int no_c2c3(struct dmi_system_id *id) | 84 | static int set_max_cstate(struct dmi_system_id *id) |
85 | { | 85 | { |
86 | if (max_cstate > ACPI_PROCESSOR_MAX_POWER) | 86 | if (max_cstate > ACPI_PROCESSOR_MAX_POWER) |
87 | return 0; | 87 | return 0; |
88 | 88 | ||
89 | printk(KERN_NOTICE PREFIX "%s detected - C2,C3 disabled." | 89 | printk(KERN_NOTICE PREFIX "%s detected - limiting to C%ld max_cstate." |
90 | " Override with \"processor.max_cstate=%d\"\n", id->ident, | 90 | " Override with \"processor.max_cstate=%d\"\n", id->ident, |
91 | ACPI_PROCESSOR_MAX_POWER + 1); | 91 | (long)id->driver_data, ACPI_PROCESSOR_MAX_POWER + 1); |
92 | 92 | ||
93 | max_cstate = 1; | 93 | max_cstate = (long)id->driver_data; |
94 | 94 | ||
95 | return 0; | 95 | return 0; |
96 | } | 96 | } |
97 | 97 | ||
98 | 98 | ||
99 | |||
100 | |||
101 | static struct dmi_system_id __initdata processor_power_dmi_table[] = { | 99 | static struct dmi_system_id __initdata processor_power_dmi_table[] = { |
102 | { no_c2c3, "IBM ThinkPad R40e", { | 100 | { set_max_cstate, "IBM ThinkPad R40e", { |
103 | DMI_MATCH(DMI_BIOS_VENDOR,"IBM"), | 101 | DMI_MATCH(DMI_BIOS_VENDOR,"IBM"), |
104 | DMI_MATCH(DMI_BIOS_VERSION,"1SET60WW") }}, | 102 | DMI_MATCH(DMI_BIOS_VERSION,"1SET60WW") }, (void*)1}, |
105 | { no_c2c3, "Medion 41700", { | 103 | { set_max_cstate, "Medion 41700", { |
104 | DMI_MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"), | ||
105 | DMI_MATCH(DMI_BIOS_VERSION,"R01-A1J") }, (void*)1}, | ||
106 | { set_max_cstate, "Clevo 5600D", { | ||
106 | DMI_MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"), | 107 | DMI_MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"), |
107 | DMI_MATCH(DMI_BIOS_VERSION,"R01-A1J") }}, | 108 | DMI_MATCH(DMI_BIOS_VERSION,"SHE845M0.86C.0013.D.0302131307") }, |
109 | (void*)2}, | ||
108 | {}, | 110 | {}, |
109 | }; | 111 | }; |
110 | 112 | ||
@@ -549,7 +551,8 @@ static int acpi_processor_get_power_info_default_c1 (struct acpi_processor *pr) | |||
549 | ACPI_FUNCTION_TRACE("acpi_processor_get_power_info_default_c1"); | 551 | ACPI_FUNCTION_TRACE("acpi_processor_get_power_info_default_c1"); |
550 | 552 | ||
551 | for (i = 0; i < ACPI_PROCESSOR_MAX_POWER; i++) | 553 | for (i = 0; i < ACPI_PROCESSOR_MAX_POWER; i++) |
552 | memset(pr->power.states, 0, sizeof(struct acpi_processor_cx)); | 554 | memset(&(pr->power.states[i]), 0, |
555 | sizeof(struct acpi_processor_cx)); | ||
553 | 556 | ||
554 | /* if info is obtained from pblk/fadt, type equals state */ | 557 | /* if info is obtained from pblk/fadt, type equals state */ |
555 | pr->power.states[ACPI_STATE_C1].type = ACPI_STATE_C1; | 558 | pr->power.states[ACPI_STATE_C1].type = ACPI_STATE_C1; |
@@ -580,7 +583,8 @@ static int acpi_processor_get_power_info_cst (struct acpi_processor *pr) | |||
580 | 583 | ||
581 | pr->power.count = 0; | 584 | pr->power.count = 0; |
582 | for (i = 0; i < ACPI_PROCESSOR_MAX_POWER; i++) | 585 | for (i = 0; i < ACPI_PROCESSOR_MAX_POWER; i++) |
583 | memset(pr->power.states, 0, sizeof(struct acpi_processor_cx)); | 586 | memset(&(pr->power.states[i]), 0, |
587 | sizeof(struct acpi_processor_cx)); | ||
584 | 588 | ||
585 | status = acpi_evaluate_object(pr->handle, "_CST", NULL, &buffer); | 589 | status = acpi_evaluate_object(pr->handle, "_CST", NULL, &buffer); |
586 | if (ACPI_FAILURE(status)) { | 590 | if (ACPI_FAILURE(status)) { |
@@ -763,7 +767,6 @@ static void acpi_processor_power_verify_c3( | |||
763 | } | 767 | } |
764 | 768 | ||
765 | if (pr->flags.bm_check) { | 769 | if (pr->flags.bm_check) { |
766 | printk("Disabling BM access before entering C3\n"); | ||
767 | /* bus mastering control is necessary */ | 770 | /* bus mastering control is necessary */ |
768 | if (!pr->flags.bm_control) { | 771 | if (!pr->flags.bm_control) { |
769 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 772 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
@@ -771,7 +774,6 @@ static void acpi_processor_power_verify_c3( | |||
771 | return_VOID; | 774 | return_VOID; |
772 | } | 775 | } |
773 | } else { | 776 | } else { |
774 | printk("Invalidating cache before entering C3\n"); | ||
775 | /* | 777 | /* |
776 | * WBINVD should be set in fadt, for C3 state to be | 778 | * WBINVD should be set in fadt, for C3 state to be |
777 | * supported on when bm_check is not required. | 779 | * supported on when bm_check is not required. |
@@ -842,7 +844,7 @@ static int acpi_processor_get_power_info ( | |||
842 | result = acpi_processor_get_power_info_cst(pr); | 844 | result = acpi_processor_get_power_info_cst(pr); |
843 | if ((result) || (acpi_processor_power_verify(pr) < 2)) { | 845 | if ((result) || (acpi_processor_power_verify(pr) < 2)) { |
844 | result = acpi_processor_get_power_info_fadt(pr); | 846 | result = acpi_processor_get_power_info_fadt(pr); |
845 | if (result) | 847 | if ((result) || (acpi_processor_power_verify(pr) < 2)) |
846 | result = acpi_processor_get_power_info_default_c1(pr); | 848 | result = acpi_processor_get_power_info_default_c1(pr); |
847 | } | 849 | } |
848 | 850 | ||