diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2022-03-22 17:16:20 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2022-03-22 17:16:20 -0500 |
commit | a9af571b35aadd1faa8a3e75172d18afbbc018cb (patch) | |
tree | 0cf3007dc732b6dc499fb15a05b07eef08369d8d /drivers/pci | |
parent | fde14ee6293efc5bbde6caf7b8c6ebb2f1fb203a (diff) | |
parent | 92c45b63ce22c8898aa41806e8d6692bcd577510 (diff) |
Merge branch 'pci/enumeration'
- Support BAR sizes up to 8TB (Dongdong Liu)
- Reduce warnings on hardware that doesn't support 8- or 16-bit PCI writes
and hence may corrupt RW1C bits (Mark Tomlinson)
* pci/enumeration:
PCI: Reduce warnings on possible RW1C corruption
PCI: Support BAR sizes up to 8TB
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/access.c | 9 | ||||
-rw-r--r-- | drivers/pci/setup-bus.c | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/drivers/pci/access.c b/drivers/pci/access.c index 0d9f6b21babb..708c7529647f 100644 --- a/drivers/pci/access.c +++ b/drivers/pci/access.c @@ -159,9 +159,12 @@ int pci_generic_config_write32(struct pci_bus *bus, unsigned int devfn, * write happen to have any RW1C (write-one-to-clear) bits set, we * just inadvertently cleared something we shouldn't have. */ - dev_warn_ratelimited(&bus->dev, "%d-byte config write to %04x:%02x:%02x.%d offset %#x may corrupt adjacent RW1C bits\n", - size, pci_domain_nr(bus), bus->number, - PCI_SLOT(devfn), PCI_FUNC(devfn), where); + if (!bus->unsafe_warn) { + dev_warn(&bus->dev, "%d-byte config write to %04x:%02x:%02x.%d offset %#x may corrupt adjacent RW1C bits\n", + size, pci_domain_nr(bus), bus->number, + PCI_SLOT(devfn), PCI_FUNC(devfn), where); + bus->unsafe_warn = 1; + } mask = ~(((1 << (size * 8)) - 1) << ((where & 0x3) * 8)); tmp = readl(addr) & mask; diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 547396ec50b5..a7893bf2f580 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c @@ -994,7 +994,7 @@ static int pbus_size_mem(struct pci_bus *bus, unsigned long mask, { struct pci_dev *dev; resource_size_t min_align, align, size, size0, size1; - resource_size_t aligns[18]; /* Alignments from 1MB to 128GB */ + resource_size_t aligns[24]; /* Alignments from 1MB to 8TB */ int order, max_order; struct resource *b_res = find_bus_resource_of_type(bus, mask | IORESOURCE_PREFETCH, type); |