linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ACPI, APEI: Fixup common access width firmware bug
@ 2012-06-12  8:43 Jean Delvare
  2012-06-12  8:46 ` Huang Ying
  2012-06-14  1:09 ` Gary Hade
  0 siblings, 2 replies; 7+ messages in thread
From: Jean Delvare @ 2012-06-12  8:43 UTC (permalink / raw)
  To: Huang Ying; +Cc: Gary Hade, Len Brown, linux-acpi

Many firmwares have a common register definition bug where 8-bit
access width is specified for a 32-bit register. Ideally this should
be fixed in the BIOS, but earlier versions of the kernel did not
complain, so fix that up silently.

This closes kernel bug #43282:
https://bugzilla.kernel.org/show_bug.cgi?id=43282

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Gary Hade <garyhade@us.ibm.com>
Cc: Len Brown <len.brown@intel.com>
Cc: stable@vger.kernel.org [3.4+]
---
 drivers/acpi/apei/apei-base.c |    5 +++++
 1 file changed, 5 insertions(+)

--- linux-3.4.orig/drivers/acpi/apei/apei-base.c	2012-06-08 10:02:06.000000000 +0200
+++ linux-3.4/drivers/acpi/apei/apei-base.c	2012-06-08 10:04:16.503779775 +0200
@@ -586,6 +586,11 @@ static int apei_check_gar(struct acpi_ge
 	}
 	*access_bit_width = 1UL << (access_size_code + 2);
 
+	/* Fixup common BIOS bug */
+	if (bit_width == 32 && bit_offset == 0 && (*paddr & 0x03) == 0 &&
+	    *access_bit_width < 32)
+		*access_bit_width = 32;
+
 	if ((bit_width + bit_offset) > *access_bit_width) {
 		pr_warning(FW_BUG APEI_PFX
 			   "Invalid bit width + offset in GAR [0x%llx/%u/%u/%u/%u]\n",

-- 
Jean Delvare
Suse L3


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-07-14 15:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-12  8:43 [PATCH] ACPI, APEI: Fixup common access width firmware bug Jean Delvare
2012-06-12  8:46 ` Huang Ying
2012-06-14  1:09 ` Gary Hade
2012-06-14  8:35   ` Jean Delvare
2012-06-14 17:07     ` Gary Hade
2012-06-15 11:40       ` Jean Delvare
2012-07-14 15:02         ` Len Brown

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).