]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.0.8/x86-pci-use-host-bridge-_crs-info-on-systems-with-32-bit-addressing.patch
5.0-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.0.8 / x86-pci-use-host-bridge-_crs-info-on-systems-with-32-bit-addressing.patch
1 From 3d9fecf6bfb8b12bc2f9a4c7109895a2a2bb9436 Mon Sep 17 00:00:00 2001
2 From: Bjorn Helgaas <bhelgaas@google.com>
3 Date: Tue, 9 Jun 2015 17:31:38 -0500
4 Subject: x86/PCI: Use host bridge _CRS info on systems with >32 bit addressing
5
6 From: Bjorn Helgaas <bhelgaas@google.com>
7
8 commit 3d9fecf6bfb8b12bc2f9a4c7109895a2a2bb9436 upstream.
9
10 We enable _CRS on all systems from 2008 and later. On older systems, we
11 ignore _CRS and assume the whole physical address space (excluding RAM and
12 other devices) is available for PCI devices, but on systems that support
13 physical address spaces larger than 4GB, it's doubtful that the area above
14 4GB is really available for PCI.
15
16 After d56dbf5bab8c ("PCI: Allocate 64-bit BARs above 4G when possible"), we
17 try to use that space above 4GB *first*, so we're more likely to put a
18 device there.
19
20 On Juan's Toshiba Satellite Pro U200, BIOS left the graphics, sound, 1394,
21 and card reader devices unassigned (but only after Windows had been
22 booted). Only the sound device had a 64-bit BAR, so it was the only device
23 placed above 4GB, and hence the only device that didn't work.
24
25 Keep _CRS enabled even on pre-2008 systems if they support physical address
26 space larger than 4GB.
27
28 Fixes: d56dbf5bab8c ("PCI: Allocate 64-bit BARs above 4G when possible")
29 Reported-and-tested-by: Juan Dayer <jdayer@outlook.com>
30 Reported-and-tested-by: Alan Horsfield <alan@hazelgarth.co.uk>
31 Link: https://bugzilla.kernel.org/show_bug.cgi?id=99221
32 Link: https://bugzilla.opensuse.org/show_bug.cgi?id=907092
33 Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
34 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
35
36 ---
37 arch/x86/pci/acpi.c | 6 ++++--
38 1 file changed, 4 insertions(+), 2 deletions(-)
39
40 --- a/arch/x86/pci/acpi.c
41 +++ b/arch/x86/pci/acpi.c
42 @@ -121,8 +121,10 @@ void __init pci_acpi_crs_quirks(void)
43 {
44 int year;
45
46 - if (dmi_get_date(DMI_BIOS_DATE, &year, NULL, NULL) && year < 2008)
47 - pci_use_crs = false;
48 + if (dmi_get_date(DMI_BIOS_DATE, &year, NULL, NULL) && year < 2008) {
49 + if (iomem_resource.end <= 0xffffffff)
50 + pci_use_crs = false;
51 + }
52
53 dmi_check_system(pci_crs_quirks);
54