[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1352343356-4006-5-git-send-email-peter@hurleysoftware.com>
Date: Wed, 7 Nov 2012 21:55:55 -0500
From: Peter Hurley <peter@...leysoftware.com>
To: linux-kernel@...r.kernel.org
Cc: Peter Hurley <peter@...leysoftware.com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org
Subject: [PATCH 4/5] x86: acpi: Print warning for malformed host bridge resources
An incorrectly specified host bridge window may prevent
other devices from claiming assigned resources. For example,
this flawed _CRS resource descriptor from a Dell T5400:
DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite,
0x00000000, // Granularity
0xF0000000, // Range Minimum
0xFE000000, // Range Maximum
0x00000000, // Translation Offset
0x0E000000, // Length
,, , AddressRangeMemory, TypeStatic)
prevents the adjacent device from claiming [mem 0xfe0000000-0xfe01ffff]
Sanity check that the resource at least conforms to a valid
PCI BAR; if not, emit a diagnostic warning.
Cc: Bjorn Helgaas <bhelgaas@...gle.com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Ingo Molnar <mingo@...hat.com>
Cc: H. Peter Anvin <hpa@...or.com>
Cc: x86@...nel.org
Signed-off-by: Peter Hurley <peter@...leysoftware.com>
---
arch/x86/pci/acpi.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c
index 192397c..3468d16 100644
--- a/arch/x86/pci/acpi.c
+++ b/arch/x86/pci/acpi.c
@@ -298,6 +298,10 @@ setup_resource(struct acpi_resource *acpi_res, void *data)
"host bridge window [%#llx-%#llx] "
"([%#llx-%#llx] ignored, not CPU addressable)\n",
start, orig_end, end + 1, orig_end);
+ } else if (flags & IORESOURCE_MEM && (start & 0x0f || ~end & 0x0f)) {
+ dev_warn(&info->bridge->dev,
+ "invalid host bridge window [%#llx-%#llx]\n",
+ start, end);
}
res = &info->res[info->res_num];
--
1.7.12.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists