mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 00:48:50 +00:00
pci-v5.19-fixes-2
-----BEGIN PGP SIGNATURE----- iQJIBAABCgAyFiEEgMe7l+5h9hnxdsnuWYigwDrT+vwFAmKs17UUHGJoZWxnYWFz QGdvb2dsZS5jb20ACgkQWYigwDrT+vzlVQ//Qygje8u1x0qQqGFykMf3+cev2ECV /sfOHtRoG9qZ4gKQOGShr9gyeV+9VFl0+CEJE4z9/YiAnoOr5JMAMixYRjHQU9MB k3TFkDqD0KBgmXdAubVP5HQGZgA+mryvtEhr5rm45PooJJSjuh1ds87YYO+Z/t7s c2AzvpHFLjECB6LRHqHieyp4CeWn5tw8im7uMUmfKkkXF5ckqw3e+7gwJzRrAukg GgbLb2JZLzXSl1HOx/2GvPW8RzyXRbbJmpvu9LsNKeoqP006F3chDVIncqG3Q9QQ LvrjudC/eY/2Fee3tpP6gjl9A5ALvXT/k4gTw4Lwm8OlaxrYZ3gwcBHZepp3F08s qVCncjFooeHAMiJDkGvtf6N8k8VnOy4zvg2qDpKOl2NO3jH95nGi0LGMf0/GXvfh P4bwqjGcWKSo9C2amagZ49rzaJBIQRms8ItM6WPvCYirjyYi3PeUMl/dylstbnuq DQuprZtgOEGlPGUg/CO4fCpCIkKzpvOV6157z39mZS5HOT5ugvF4k+hwSxZd0hsM rJI7Te48Z46Y/qoFesgOglJwwEZs4RqHAvMTGC+V5Ftj9gHe7wo2oOxlhCyFW1Qd jec3UhXEzTVxnjsu7peHyfwwmGWFUkG16P17hWpncpG6azW1dybQOCsRy21/F+q2 i1nd61lXpuhKQKQ= =5y1d -----END PGP SIGNATURE----- Merge tag 'pci-v5.19-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull pci fix from Bjorn Helgaas: "Revert clipping of PCI host bridge windows to avoid E820 regions, which broke several machines by forcing unnecessary BAR reassignments (Hans de Goede)" * tag 'pci-v5.19-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: x86/PCI: Revert "x86/PCI: Clip only host bridge windows for E820 regions"
This commit is contained in:
commit
32efdbffff
4 changed files with 18 additions and 17 deletions
|
@ -4,9 +4,6 @@
|
|||
|
||||
#include <asm/e820/types.h>
|
||||
|
||||
struct device;
|
||||
struct resource;
|
||||
|
||||
extern struct e820_table *e820_table;
|
||||
extern struct e820_table *e820_table_kexec;
|
||||
extern struct e820_table *e820_table_firmware;
|
||||
|
@ -46,8 +43,6 @@ extern void e820__register_nosave_regions(unsigned long limit_pfn);
|
|||
|
||||
extern int e820__get_entry_type(u64 start, u64 end);
|
||||
|
||||
extern void remove_e820_regions(struct device *dev, struct resource *avail);
|
||||
|
||||
/*
|
||||
* Returns true iff the specified range [start,end) is completely contained inside
|
||||
* the ISA region.
|
||||
|
|
|
@ -69,6 +69,8 @@ void pcibios_scan_specific_bus(int busn);
|
|||
|
||||
/* pci-irq.c */
|
||||
|
||||
struct pci_dev;
|
||||
|
||||
struct irq_info {
|
||||
u8 bus, devfn; /* Bus, device and function */
|
||||
struct {
|
||||
|
@ -246,3 +248,9 @@ static inline void mmio_config_writel(void __iomem *pos, u32 val)
|
|||
# define x86_default_pci_init_irq NULL
|
||||
# define x86_default_pci_fixup_irqs NULL
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_PCI) && defined(CONFIG_ACPI)
|
||||
extern bool pci_use_e820;
|
||||
#else
|
||||
#define pci_use_e820 false
|
||||
#endif
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
// SPDX-License-Identifier: GPL-2.0
|
||||
#include <linux/dev_printk.h>
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/printk.h>
|
||||
#include <asm/e820/api.h>
|
||||
#include <asm/pci_x86.h>
|
||||
|
||||
static void resource_clip(struct resource *res, resource_size_t start,
|
||||
resource_size_t end)
|
||||
|
@ -24,14 +25,14 @@ static void resource_clip(struct resource *res, resource_size_t start,
|
|||
res->start = end + 1;
|
||||
}
|
||||
|
||||
void remove_e820_regions(struct device *dev, struct resource *avail)
|
||||
static void remove_e820_regions(struct resource *avail)
|
||||
{
|
||||
int i;
|
||||
struct e820_entry *entry;
|
||||
u64 e820_start, e820_end;
|
||||
struct resource orig = *avail;
|
||||
|
||||
if (!(avail->flags & IORESOURCE_MEM))
|
||||
if (!pci_use_e820)
|
||||
return;
|
||||
|
||||
for (i = 0; i < e820_table->nr_entries; i++) {
|
||||
|
@ -41,7 +42,7 @@ void remove_e820_regions(struct device *dev, struct resource *avail)
|
|||
|
||||
resource_clip(avail, e820_start, e820_end);
|
||||
if (orig.start != avail->start || orig.end != avail->end) {
|
||||
dev_info(dev, "clipped %pR to %pR for e820 entry [mem %#010Lx-%#010Lx]\n",
|
||||
pr_info("clipped %pR to %pR for e820 entry [mem %#010Lx-%#010Lx]\n",
|
||||
&orig, avail, e820_start, e820_end);
|
||||
orig = *avail;
|
||||
}
|
||||
|
@ -55,6 +56,9 @@ void arch_remove_reservations(struct resource *avail)
|
|||
* the low 1MB unconditionally, as this area is needed for some ISA
|
||||
* cards requiring a memory range, e.g. the i82365 PCMCIA controller.
|
||||
*/
|
||||
if (avail->flags & IORESOURCE_MEM)
|
||||
if (avail->flags & IORESOURCE_MEM) {
|
||||
resource_clip(avail, BIOS_ROM_BASE, BIOS_ROM_END);
|
||||
|
||||
remove_e820_regions(avail);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include <linux/pci-acpi.h>
|
||||
#include <asm/numa.h>
|
||||
#include <asm/pci_x86.h>
|
||||
#include <asm/e820/api.h>
|
||||
|
||||
struct pci_root_info {
|
||||
struct acpi_pci_root_info common;
|
||||
|
@ -20,7 +19,7 @@ struct pci_root_info {
|
|||
#endif
|
||||
};
|
||||
|
||||
static bool pci_use_e820 = true;
|
||||
bool pci_use_e820 = true;
|
||||
static bool pci_use_crs = true;
|
||||
static bool pci_ignore_seg;
|
||||
|
||||
|
@ -387,11 +386,6 @@ static int pci_acpi_root_prepare_resources(struct acpi_pci_root_info *ci)
|
|||
|
||||
status = acpi_pci_probe_root_resources(ci);
|
||||
|
||||
if (pci_use_e820) {
|
||||
resource_list_for_each_entry(entry, &ci->resources)
|
||||
remove_e820_regions(&device->dev, entry->res);
|
||||
}
|
||||
|
||||
if (pci_use_crs) {
|
||||
resource_list_for_each_entry_safe(entry, tmp, &ci->resources)
|
||||
if (resource_is_pcicfg_ioport(entry->res))
|
||||
|
|
Loading…
Reference in a new issue