diff options
author | Jean Delvare <jdelvare@suse.de> | 2012-06-12 04:43:28 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2012-07-14 11:01:42 -0400 |
commit | f712c71f7b2b43b894d1e92e1b77385fcad8815f (patch) | |
tree | fe663880f6ce0748b49bb8b929ea4b20a022f820 /drivers/acpi/apei | |
parent | 34ddeb035d704eafdcdb3cbc781894300136c3c4 (diff) |
ACPI, APEI: Fixup common access width firmware bug
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>
Acked-by: Huang Ying <ying.huang@intel.com>
Acked-by: Gary Hade <garyhade@us.ibm.com>
Cc: stable@vger.kernel.org [3.4+]
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/apei')
-rw-r--r-- | drivers/acpi/apei/apei-base.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/acpi/apei/apei-base.c b/drivers/acpi/apei/apei-base.c index 6686b1eaf13e..00a783661d0b 100644 --- a/drivers/acpi/apei/apei-base.c +++ b/drivers/acpi/apei/apei-base.c | |||
@@ -586,6 +586,11 @@ static int apei_check_gar(struct acpi_generic_address *reg, u64 *paddr, | |||
586 | } | 586 | } |
587 | *access_bit_width = 1UL << (access_size_code + 2); | 587 | *access_bit_width = 1UL << (access_size_code + 2); |
588 | 588 | ||
589 | /* Fixup common BIOS bug */ | ||
590 | if (bit_width == 32 && bit_offset == 0 && (*paddr & 0x03) == 0 && | ||
591 | *access_bit_width < 32) | ||
592 | *access_bit_width = 32; | ||
593 | |||
589 | if ((bit_width + bit_offset) > *access_bit_width) { | 594 | if ((bit_width + bit_offset) > *access_bit_width) { |
590 | pr_warning(FW_BUG APEI_PFX | 595 | pr_warning(FW_BUG APEI_PFX |
591 | "Invalid bit width + offset in GAR [0x%llx/%u/%u/%u/%u]\n", | 596 | "Invalid bit width + offset in GAR [0x%llx/%u/%u/%u/%u]\n", |