Skip to content

Commit 3eb616b

Browse files
jwrdegoederafaeljw
authored andcommitted
x86/PCI: revert "Ignore E820 reservations for bridge windows on newer systems"
Commit 7f7b423 ("x86/PCI: Ignore E820 reservations for bridge windows on newer systems") fixes the touchpad not working on laptops like the Lenovo IdeaPad 3 15IIL05 and the Lenovo IdeaPad 5 14IIL05, as well as fixing thunderbolt hotplug issues on the Lenovo Yoga C940. Unfortunately it turns out that this is causing issues with suspend/resume on Lenovo ThinkPad X1 Carbon Gen 2 laptops. So, per the no regressions policy, rever this. Note I'm looking into another fix for the issues this fixed. Fixes: 7f7b423 ("x86/PCI: Ignore E820 reservations for bridge windows on newer systems") BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=2029207 Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 7f7b423 commit 3eb616b

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

arch/x86/kernel/resource.c

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// SPDX-License-Identifier: GPL-2.0
2-
#include <linux/dmi.h>
32
#include <linux/ioport.h>
43
#include <asm/e820/api.h>
54

@@ -24,31 +23,11 @@ static void resource_clip(struct resource *res, resource_size_t start,
2423
res->start = end + 1;
2524
}
2625

27-
/*
28-
* Some BIOS-es contain a bug where they add addresses which map to
29-
* system RAM in the PCI host bridge window returned by the ACPI _CRS
30-
* method, see commit 4dc2287c1805 ("x86: avoid E820 regions when
31-
* allocating address space"). To avoid this Linux by default excludes
32-
* E820 reservations when allocating addresses since 2010.
33-
* In 2019 some systems have shown-up with E820 reservations which cover
34-
* the entire _CRS returned PCI host bridge window, causing all attempts
35-
* to assign memory to PCI BARs to fail if Linux uses E820 reservations.
36-
*
37-
* Ideally Linux would fully stop using E820 reservations, but then
38-
* the old systems this was added for will regress.
39-
* Instead keep the old behavior for old systems, while ignoring the
40-
* E820 reservations for any systems from now on.
41-
*/
4226
static void remove_e820_regions(struct resource *avail)
4327
{
44-
int i, year = dmi_get_bios_year();
28+
int i;
4529
struct e820_entry *entry;
4630

47-
if (year >= 2018)
48-
return;
49-
50-
pr_info_once("PCI: Removing E820 reservations from host bridge windows\n");
51-
5231
for (i = 0; i < e820_table->nr_entries; i++) {
5332
entry = &e820_table->entries[i];
5433

0 commit comments

Comments
 (0)