rpms/kernel/F-7 linux-2.6-acpi-fix-gpe-list-corruption.patch, NONE, 1.1 linux-2.6-acpi-fix-older-fadts.patch, NONE, 1.1 kernel-2.6.spec, 1.3317, 1.3318

Chuck Ebbert (cebbert) fedora-extras-commits at redhat.com
Wed Aug 15 19:05:01 UTC 2007


Author: cebbert

Update of /cvs/pkgs/rpms/kernel/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9420

Modified Files:
	kernel-2.6.spec 
Added Files:
	linux-2.6-acpi-fix-gpe-list-corruption.patch 
	linux-2.6-acpi-fix-older-fadts.patch 
Log Message:
* Wed Aug 15 2007 Chuck Ebbert <cebbert at redhat.com>
- ACPI: fix broken conversion of older FADTs
- ACPI: fix possible corruption of GPE list


linux-2.6-acpi-fix-gpe-list-corruption.patch:

--- NEW FILE linux-2.6-acpi-fix-gpe-list-corruption.patch ---
Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e0b91050f208ab370fac9269f8e42bc746889422
Commit:     e0b91050f208ab370fac9269f8e42bc746889422
Parent:     a0a3f6c69b45dcafefdce5dbac2221c02aaae871
Author:     Bob Moore <robert.moore at intel.com>
AuthorDate: Tue Apr 3 20:00:29 2007 -0400
Committer:  Len Brown <len.brown at intel.com>
CommitDate: Tue Jul 3 01:56:30 2007 -0400

    ACPICA: Fixed possible corruption of global GPE list
    
    Fixed a problem in acpi_ev_delete_gpe_xrupt where the global interrupt
    list could be corrupted if the interrupt being removed was at
    the head of the list. Reported by Linn Crosetto.
    
    Signed-off-by: Bob Moore <robert.moore at intel.com>
    Signed-off-by: Len Brown <len.brown at intel.com>
---
 drivers/acpi/events/evgpeblk.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/acpi/events/evgpeblk.c b/drivers/acpi/events/evgpeblk.c
index 902c287..361ebe6 100644
--- a/drivers/acpi/events/evgpeblk.c
+++ b/drivers/acpi/events/evgpeblk.c
@@ -586,6 +586,10 @@ acpi_ev_delete_gpe_xrupt(struct acpi_gpe_xrupt_info *gpe_xrupt)
 	flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock);
 	if (gpe_xrupt->previous) {
 		gpe_xrupt->previous->next = gpe_xrupt->next;
+	} else {
+		/* No previous, update list head */
+
+		acpi_gbl_gpe_xrupt_list_head = gpe_xrupt->next;
 	}
 
 	if (gpe_xrupt->next) {

linux-2.6-acpi-fix-older-fadts.patch:

--- NEW FILE linux-2.6-acpi-fix-older-fadts.patch ---
Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=55f8f3cc4f7c47c7896e2ad08e29eccc292c0c68
Commit:     55f8f3cc4f7c47c7896e2ad08e29eccc292c0c68
Parent:     e0b91050f208ab370fac9269f8e42bc746889422
Author:     Bob Moore <robert.moore at intel.com>
AuthorDate: Wed May 2 15:51:37 2007 -0400
Committer:  Len Brown <len.brown at intel.com>
CommitDate: Tue Jul 3 01:56:40 2007 -0400

    ACPICA: Clear reserved fields for incoming ACPI 1.0 FADTs
    
    Fixed a problem with the internal FADT conversion where ACPI 1.0
    FADTs that contained invalid non-zero values in reserved fields
    could cause later failures because these fields have meaning in
    later revisions of the FADT. For incoming ACPI 1.0 FADTs, these
    fields are now always zeroed. (Preferred_PM_Profile, PSTATE_CNT,
    CST_CNT, IAPC_BOOT_FLAGS.)
    
    Signed-off-by: Bob Moore <robert.moore at intel.com>
    Signed-off-by: Len Brown <len.brown at intel.com>
---
 drivers/acpi/tables/tbfadt.c |   44 ++++++++++++++++++++++++-----------------
 1 files changed, 26 insertions(+), 18 deletions(-)

diff --git a/drivers/acpi/tables/tbfadt.c b/drivers/acpi/tables/tbfadt.c
index 1285e91..002bb33 100644
--- a/drivers/acpi/tables/tbfadt.c
+++ b/drivers/acpi/tables/tbfadt.c
@@ -211,14 +211,17 @@ void acpi_tb_parse_fadt(acpi_native_uint table_index, u8 flags)
  * DESCRIPTION: Get a local copy of the FADT and convert it to a common format.
  *              Performs validation on some important FADT fields.
  *
+ * NOTE:        We create a local copy of the FADT regardless of the version.
+ *
  ******************************************************************************/
 
 void acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length)
 {
 
 	/*
-	 * Check if the FADT is larger than what we know about (ACPI 2.0 version).
-	 * Truncate the table, but make some noise.
+	 * Check if the FADT is larger than the largest table that we expect
+	 * (the ACPI 2.0/3.0 version). If so, truncate the table, and issue
+	 * a warning.
 	 */
 	if (length > sizeof(struct acpi_table_fadt)) {
 		ACPI_WARNING((AE_INFO,
@@ -227,10 +230,12 @@ void acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length)
 			      sizeof(struct acpi_table_fadt)));
 	}
 
-	/* Copy the entire FADT locally. Zero first for tb_convert_fadt */
+	/* Clear the entire local FADT */
 
 	ACPI_MEMSET(&acpi_gbl_FADT, 0, sizeof(struct acpi_table_fadt));
 
+	/* Copy the original FADT, up to sizeof (struct acpi_table_fadt) */
+
 	ACPI_MEMCPY(&acpi_gbl_FADT, table,
 		    ACPI_MIN(length, sizeof(struct acpi_table_fadt)));
 
@@ -251,7 +256,7 @@ void acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length)
  * RETURN:      None
  *
  * DESCRIPTION: Converts all versions of the FADT to a common internal format.
- *              -> Expand all 32-bit addresses to 64-bit.
+ *              Expand all 32-bit addresses to 64-bit.
  *
  * NOTE:        acpi_gbl_FADT must be of size (struct acpi_table_fadt),
  *              and must contain a copy of the actual FADT.
@@ -292,8 +297,23 @@ static void acpi_tb_convert_fadt(void)
 	}
 
 	/*
-	 * Expand the 32-bit V1.0 addresses to the 64-bit "X" generic address
-	 * structures as necessary.
+	 * For ACPI 1.0 FADTs (revision 1 or 2), ensure that reserved fields which
+	 * should be zero are indeed zero. This will workaround BIOSs that
+	 * inadvertently place values in these fields.
+	 *
+	 * The ACPI 1.0 reserved fields that will be zeroed are the bytes located at
+	 * offset 45, 55, 95, and the word located at offset 109, 110.
+	 */
+	if (acpi_gbl_FADT.header.revision < 3) {
+		acpi_gbl_FADT.preferred_profile = 0;
+		acpi_gbl_FADT.pstate_control = 0;
+		acpi_gbl_FADT.cst_control = 0;
+		acpi_gbl_FADT.boot_flags = 0;
+	}
+
+	/*
+	 * Expand the ACPI 1.0 32-bit V1.0 addresses to the ACPI 2.0 64-bit "X"
+	 * generic address structures as necessary.
 	 */
 	for (i = 0; i < ACPI_FADT_INFO_ENTRIES; i++) {
 		target =
@@ -349,18 +369,6 @@ static void acpi_tb_convert_fadt(void)
 		    acpi_gbl_FADT.xpm1a_event_block.space_id;
 
 	}
-
-	/*
-	 * For ACPI 1.0 FADTs, ensure that reserved fields (which should be zero)
-	 * are indeed zero. This will workaround BIOSs that inadvertently placed
-	 * values in these fields.
-	 */
-	if (acpi_gbl_FADT.header.revision < 3) {
-		acpi_gbl_FADT.preferred_profile = 0;
-		acpi_gbl_FADT.pstate_control = 0;
-		acpi_gbl_FADT.cst_control = 0;
-		acpi_gbl_FADT.boot_flags = 0;
-	}
 }
 
 /******************************************************************************


Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-7/kernel-2.6.spec,v
retrieving revision 1.3317
retrieving revision 1.3318
diff -u -r1.3317 -r1.3318
--- kernel-2.6.spec	14 Aug 2007 21:06:03 -0000	1.3317
+++ kernel-2.6.spec	15 Aug 2007 19:04:28 -0000	1.3318
@@ -605,6 +605,8 @@
 Patch740: linux-2.6-sdhci-ene-controller-quirk.patch
 Patch741: linux-2.6-sdhci-fix-interrupt-mask.patch
 Patch742: linux-2.6-sdhci-clear-error-interrupt.patch
+Patch770: linux-2.6-acpi-fix-gpe-list-corruption.patch
+Patch771: linux-2.6-acpi-fix-older-fadts.patch
 #Patch780: linux-2.6-clockevents-fix-resume-logic.patch
 Patch800: linux-2.6-wakeups-hdaps.patch
 Patch801: linux-2.6-wakeups.patch
@@ -1326,6 +1328,8 @@
 #
 
 # ACPI patches
+ApplyPatch linux-2.6-acpi-fix-gpe-list-corruption.patch
+ApplyPatch linux-2.6-acpi-fix-older-fadts.patch
 
 # Fix excessive wakeups
 # Make hdaps timer only tick when in use.
@@ -2277,6 +2281,10 @@
 %endif
 
 %changelog
+* Wed Aug 15 2007 Chuck Ebbert <cebbert at redhat.com>
+- ACPI: fix broken conversion of older FADTs
+- ACPI: fix possible corruption of GPE list
+
 * Tue Aug 14 2007 Chuck Ebbert <cebbert at redhat.com>
 - revert "don't BUG on too-large memory allocation"
 - limit memory allocated by input force feedback drivers




More information about the fedora-extras-commits mailing list