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