* [patch 1/4] acpi: enable C3 Power State on Dell Inspiron 8200
@ 2007-11-21 22:50 akpm
0 siblings, 0 replies; 3+ messages in thread
From: akpm @ 2007-11-21 22:50 UTC (permalink / raw)
To: lenb; +Cc: linux-acpi, akpm, arjan, dag
From: Arjan van de Ven <arjan@infradead.org>
Taken from http://bugzilla.kernel.org/show_bug.cgi?id=8703
[akpm@linux-foundation.org: fix warning]
Cc: Dag Bakke <dag@bakke.com>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/acpi/processor_idle.c | 23 +++++++++++++++++++++--
1 file changed, 21 insertions(+), 2 deletions(-)
diff -puN drivers/acpi/processor_idle.c~acpi-enable-c3-power-state-on-dell-inspiron-8200 drivers/acpi/processor_idle.c
--- a/drivers/acpi/processor_idle.c~acpi-enable-c3-power-state-on-dell-inspiron-8200
+++ a/drivers/acpi/processor_idle.c
@@ -96,6 +96,8 @@ static int acpi_processor_set_power_poli
#endif
+static int forced_c3;
+
/*
* IBM ThinkPad R40e crashes mysteriously when going into C2 or C3.
* For now disable this. Probably a bug somewhere else.
@@ -116,6 +118,19 @@ static int set_max_cstate(const struct d
return 0;
}
+/*
+ * Some (Dell) machines have a too large C3 latency set, but it still works
+ * completely. Dell provides a driver for other operating systems to hack
+ * around this bug, so we know it's safe.
+ */
+static int dmi_force_c3(const struct dmi_system_id *id)
+{
+ forced_c3 = 1;
+ printk(KERN_NOTICE PREFIX "%s detected - Force enabling C3.",
+ id->ident);
+ return 0;
+}
+
/* Actually this shouldn't be __cpuinitdata, would be better to fix the
callers to only run once -AK */
static struct dmi_system_id __cpuinitdata processor_power_dmi_table[] = {
@@ -174,6 +189,9 @@ static struct dmi_system_id __cpuinitdat
DMI_MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"),
DMI_MATCH(DMI_BIOS_VERSION,"SHE845M0.86C.0013.D.0302131307")},
(void *)2},
+ { dmi_force_c3, "Dell Inspiron 8200", {
+ DMI_MATCH(DMI_SYS_VENDOR,"Dell Computer Corporation"),
+ DMI_MATCH(DMI_PRODUCT_NAME,"Inspiron 8200") }, NULL},
{},
};
@@ -993,11 +1011,12 @@ static void acpi_processor_power_verify_
* C3 latency must be less than or equal to 1000
* microseconds.
*/
- else if (cx->latency > ACPI_PROCESSOR_MAX_C3_LATENCY) {
+ if (cx->latency > ACPI_PROCESSOR_MAX_C3_LATENCY && !forced_c3) {
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"latency too large [%d]\n", cx->latency));
return;
- }
+ } else if (forced_c3)
+ cx->latency = ACPI_PROCESSOR_MAX_C3_LATENCY;
/*
* PIIX4 Erratum #18: We don't support C3 when Type-F (fast)
_
^ permalink raw reply [flat|nested] 3+ messages in thread
* [patch 1/4] acpi: enable C3 Power State on Dell Inspiron 8200
@ 2008-07-04 7:05 akpm
2008-07-06 18:43 ` Andi Kleen
0 siblings, 1 reply; 3+ messages in thread
From: akpm @ 2008-07-04 7:05 UTC (permalink / raw)
To: andi; +Cc: linux-acpi, akpm, dag, arjan, lenb
From: Dag Bakke <dag@bakke.com>
Taken from http://bugzilla.kernel.org/show_bug.cgi?id=8703
[akpm@linux-foundation.org: fix warning]
Cc: Arjan van de Ven <arjan@infradead.org>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/acpi/processor_idle.c | 23 +++++++++++++++++++++--
1 file changed, 21 insertions(+), 2 deletions(-)
diff -puN drivers/acpi/processor_idle.c~acpi-enable-c3-power-state-on-dell-inspiron-8200 drivers/acpi/processor_idle.c
--- a/drivers/acpi/processor_idle.c~acpi-enable-c3-power-state-on-dell-inspiron-8200
+++ a/drivers/acpi/processor_idle.c
@@ -105,6 +105,8 @@ static unsigned int latency_factor __rea
module_param(latency_factor, uint, 0644);
#endif
+static int forced_c3;
+
/*
* IBM ThinkPad R40e crashes mysteriously when going into C2 or C3.
* For now disable this. Probably a bug somewhere else.
@@ -125,6 +127,19 @@ static int set_max_cstate(const struct d
return 0;
}
+/*
+ * Some (Dell) machines set the C3 latency to a value which effectively says:
+ * "Don't use C3." Still, C3 works if we force it.
+ * This enables C3 on Dell Inspiron 8200 machines.
+ */
+static int dmi_force_c3(const struct dmi_system_id *id)
+{
+ forced_c3 = 1;
+ printk(KERN_NOTICE PREFIX "%s detected - Force enabling C3.",
+ id->ident);
+ return 0;
+}
+
/* Actually this shouldn't be __cpuinitdata, would be better to fix the
callers to only run once -AK */
static struct dmi_system_id __cpuinitdata processor_power_dmi_table[] = {
@@ -183,6 +198,9 @@ static struct dmi_system_id __cpuinitdat
DMI_MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"),
DMI_MATCH(DMI_BIOS_VERSION,"SHE845M0.86C.0013.D.0302131307")},
(void *)2},
+ { dmi_force_c3, "Dell Inspiron 8200", {
+ DMI_MATCH(DMI_SYS_VENDOR,"Dell Computer Corporation"),
+ DMI_MATCH(DMI_PRODUCT_NAME,"Inspiron 8200") }, NULL},
{},
};
@@ -1067,11 +1085,12 @@ static void acpi_processor_power_verify_
* C3 latency must be less than or equal to 1000
* microseconds.
*/
- else if (cx->latency > ACPI_PROCESSOR_MAX_C3_LATENCY) {
+ if (cx->latency > ACPI_PROCESSOR_MAX_C3_LATENCY && !forced_c3) {
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"latency too large [%d]\n", cx->latency));
return;
- }
+ } else if (forced_c3)
+ cx->latency = ACPI_PROCESSOR_MAX_C3_LATENCY;
/*
* PIIX4 Erratum #18: We don't support C3 when Type-F (fast)
_
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch 1/4] acpi: enable C3 Power State on Dell Inspiron 8200
2008-07-04 7:05 [patch 1/4] acpi: enable C3 Power State on Dell Inspiron 8200 akpm
@ 2008-07-06 18:43 ` Andi Kleen
0 siblings, 0 replies; 3+ messages in thread
From: Andi Kleen @ 2008-07-06 18:43 UTC (permalink / raw)
To: akpm; +Cc: linux-acpi, dag, arjan, lenb
akpm@linux-foundation.org wrote:
> From: Dag Bakke <dag@bakke.com>
>
> Taken from http://bugzilla.kernel.org/show_bug.cgi?id=8703
NAK.
Len's latest reply in bugzilla was
>>>
Dell replied off-line that they disabled C3 on this system on purpose
because of its chipset.
If you are able to measure a power savings by 2nd guessing Dell,
without any stability problems, then please document that here
and re-open this sighting.
<<<
I agree with him. The BIOS likely knows better on this
Andrew, please drop the patch.
-Andi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-07-06 18:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-04 7:05 [patch 1/4] acpi: enable C3 Power State on Dell Inspiron 8200 akpm
2008-07-06 18:43 ` Andi Kleen
-- strict thread matches above, loose matches on Subject: below --
2007-11-21 22:50 akpm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).