diff mbox

ACPI: resume: re-enable SCI-enable workaround

Message ID alpine.LFD.2.00.0905152233180.4571@localhost.localdomain (mailing list archive)
State Accepted
Headers show

Commit Message

Len Brown May 16, 2009, 2:34 a.m. UTC
From: Lin Ming <ming.m.lin@intel.com>

The BIOS bug workaround mistakenly got disabled
when we followed the ACPI specification more closely
by ignoring OS updates to that bit.

(The BIOS is supposed to update SCI_EN, not the OS)

http://bugzilla.kernel.org/show_bug.cgi?id=13289

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
---

as-applied.
thanks,
-Len

 drivers/acpi/acpica/aclocal.h |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

Comments

Moore, Robert May 16, 2009, 3:30 a.m. UTC | #1
>The BIOS bug workaround mistakenly got disabled
>when we followed the ACPI specification more closely
>by ignoring OS updates to that bit.

Not exactly. ACPICA has always preserved the SCI_EN bit. Linux apparently has a "linux-only" patch to ACPICA that disables this.

The recent version of ACPICA change the #define enough such that the patch no longer works.


>-----Original Message-----
>From: Len Brown [mailto:lenb@kernel.org]
>Sent: Friday, May 15, 2009 7:34 PM
>To: Bob Copeland
>Cc: Rafael J. Wysocki; Lin, Ming M; Bjorn Helgaas; Zhao, Yakui; linux-
>kernel@vger.kernel.org; linux-acpi@vger.kernel.org; Moore, Robert
>Subject: [PATCH] ACPI: resume: re-enable SCI-enable workaround
>
>From: Lin Ming <ming.m.lin@intel.com>
>
>The BIOS bug workaround mistakenly got disabled
>when we followed the ACPI specification more closely
>by ignoring OS updates to that bit.
>
>(The BIOS is supposed to update SCI_EN, not the OS)
>
>http://bugzilla.kernel.org/show_bug.cgi?id=13289
>
>Signed-off-by: Lin Ming <ming.m.lin@intel.com>
>Signed-off-by: Len Brown <len.brown@intel.com>
>---
>
>as-applied.
>thanks,
>-Len
>
> drivers/acpi/acpica/aclocal.h |    7 ++++++-
> 1 files changed, 6 insertions(+), 1 deletions(-)
>
>diff --git a/drivers/acpi/acpica/aclocal.h b/drivers/acpi/acpica/aclocal.h
>index 772ee5c..2ec394a 100644
>--- a/drivers/acpi/acpica/aclocal.h
>+++ b/drivers/acpi/acpica/aclocal.h
>@@ -787,7 +787,12 @@ struct acpi_bit_register_info {
>
> /* For control registers, both ignored and reserved bits must be preserved
>*/
>
>-#define ACPI_PM1_CONTROL_IGNORED_BITS           0x0201	/* Bits 9,
>0(SCI_EN) */
>+/*
>+ * The ACPI spec says to ignore PM1_CTL.SCI_EN (bit 0)
>+ * but we need to be able to write ACPI_BITREG_SCI_ENABLE directly
>+ * as a BIOS workaround on some machines.
>+ */
>+#define ACPI_PM1_CONTROL_IGNORED_BITS           0x0200	/* Bits 9 */
> #define ACPI_PM1_CONTROL_RESERVED_BITS          0xC1F8	/* Bits 14-15,
>3-8 */
> #define ACPI_PM1_CONTROL_PRESERVED_BITS \
> 	       (ACPI_PM1_CONTROL_IGNORED_BITS |
>ACPI_PM1_CONTROL_RESERVED_BITS)
>--
>1.6.3.1.9.g95405b
>

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Len Brown May 16, 2009, 5:49 a.m. UTC | #2
> >The BIOS bug workaround mistakenly got disabled
> >when we followed the ACPI specification more closely
> >by ignoring OS updates to that bit.
> 
> Not exactly. ACPICA has always preserved the SCI_EN bit. Linux apparently has a "linux-only" patch to ACPICA that disables this.
> 
> The recent version of ACPICA change the #define enough such that the patch no longer works.

"We" here means Linux, and thus the description is accurate.

The fact is that in 2.6.29 Linux had
ACPI_PM1_CONTROL_PRESERVED_BITS 0x0200
and when "we" updated it to 0x201 via the ACPICA update,
the workaround in the Linux resume code became a NOP.

-Len
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Moore, Robert May 16, 2009, 6:50 a.m. UTC | #3
ACPICA did not change the SCI_EN value. The #define associated with the control register has always been 0x0201 in ACPICA.

A linux patch changes the value from 0x0201 to 0x0200, and represents a divergence of linux from ACPICA.

What ACPICA did was to rename the #define, that is what broke the linux patch.


- #define ACPI_PM1_CONTROL_PRESERVED_BITS         0x0201  /* Bit 9, Bit 0 (SCI_EN) */


+ #define ACPI_PM1_CONTROL_IGNORED_BITS           0x0201  /* Bits 9, 0(SCI_EN) */
+ #define ACPI_PM1_CONTROL_RESERVED_BITS          0xC1F8  /* Bits 14-15, 3-8 */
+#define ACPI_PM1_CONTROL_PRESERVED_BITS \
+         (ACPI_PM1_CONTROL_IGNORED_BITS | ACPI_PM1_CONTROL_RESERVED_BITS)




>-----Original Message-----
>From: Len Brown [mailto:lenb@kernel.org]
>Sent: Friday, May 15, 2009 10:50 PM
>To: Moore, Robert
>Cc: Bob Copeland; Rafael J. Wysocki; Lin, Ming M; Bjorn Helgaas; Zhao,
>Yakui; linux-kernel@vger.kernel.org; linux-acpi@vger.kernel.org
>Subject: RE: [PATCH] ACPI: resume: re-enable SCI-enable workaround
>
>
>> >The BIOS bug workaround mistakenly got disabled
>> >when we followed the ACPI specification more closely
>> >by ignoring OS updates to that bit.
>>
>> Not exactly. ACPICA has always preserved the SCI_EN bit. Linux apparently
>has a "linux-only" patch to ACPICA that disables this.
>>
>> The recent version of ACPICA change the #define enough such that the
>patch no longer works.
>
>"We" here means Linux, and thus the description is accurate.
>
>The fact is that in 2.6.29 Linux had
>ACPI_PM1_CONTROL_PRESERVED_BITS 0x0200
>and when "we" updated it to 0x201 via the ACPICA update,
>the workaround in the Linux resume code became a NOP.
>
>-Len
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/acpi/acpica/aclocal.h b/drivers/acpi/acpica/aclocal.h
index 772ee5c..2ec394a 100644
--- a/drivers/acpi/acpica/aclocal.h
+++ b/drivers/acpi/acpica/aclocal.h
@@ -787,7 +787,12 @@  struct acpi_bit_register_info {
 
 /* For control registers, both ignored and reserved bits must be preserved */
 
-#define ACPI_PM1_CONTROL_IGNORED_BITS           0x0201	/* Bits 9, 0(SCI_EN) */
+/*
+ * The ACPI spec says to ignore PM1_CTL.SCI_EN (bit 0)
+ * but we need to be able to write ACPI_BITREG_SCI_ENABLE directly
+ * as a BIOS workaround on some machines.
+ */
+#define ACPI_PM1_CONTROL_IGNORED_BITS           0x0200	/* Bits 9 */
 #define ACPI_PM1_CONTROL_RESERVED_BITS          0xC1F8	/* Bits 14-15, 3-8 */
 #define ACPI_PM1_CONTROL_PRESERVED_BITS \
 	       (ACPI_PM1_CONTROL_IGNORED_BITS | ACPI_PM1_CONTROL_RESERVED_BITS)