- 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
Unified · Split
| @@ -159,9 +159,12 @@ int pci_generic_config_write32(struct pci_bus *bus, unsigned int devfn, · 158 unmodified lines | ||
| 159 | 159 | * write happen to have any RW1C (write-one-to-clear) bits set, we |
| 160 | 160 | * just inadvertently cleared something we shouldn't have. |
| 161 | 161 | */ |
| 162 | − dev_warn_ratelimited(&bus->dev, "%d-byte config write to %04x:%02x:%02x.%d offset %#x may corrupt adjacent RW1C bits\n", | |
| 163 | − size, pci_domain_nr(bus), bus->number, | |
| 164 | − PCI_SLOT(devfn), PCI_FUNC(devfn), where); | |
| 162 | + if (!bus->unsafe_warn) { | |
| 163 | + dev_warn(&bus->dev, "%d-byte config write to %04x:%02x:%02x.%d offset %#x may corrupt adjacent RW1C bits\n", | |
| 164 | + size, pci_domain_nr(bus), bus->number, | |
| 165 | + PCI_SLOT(devfn), PCI_FUNC(devfn), where); | |
| 166 | + bus->unsafe_warn = 1; | |
| 167 | + } | |
| 165 | 168 | |
| 166 | 169 | mask = ~(((1 << (size * 8)) - 1) << ((where & 0x3) * 8)); |
| 167 | 170 | tmp = readl(addr) & mask; |
| @@ -994,7 +994,7 @@ static int pbus_size_mem(struct pci_bus *bus, unsigned long mask, · 993 unmodified lines | ||
| 994 | 994 | { |
| 995 | 995 | struct pci_dev *dev; |
| 996 | 996 | resource_size_t min_align, align, size, size0, size1; |
| 997 | − resource_size_t aligns[18]; /* Alignments from 1MB to 128GB */ | |
| 997 | + resource_size_t aligns[24]; /* Alignments from 1MB to 8TB */ | |
| 998 | 998 | int order, max_order; |
| 999 | 999 | struct resource *b_res = find_bus_resource_of_type(bus, |
| 1000 | 1000 | mask | IORESOURCE_PREFETCH, type); |
| @@ -668,6 +668,7 @@ struct pci_bus { · 667 unmodified lines | ||
| 668 | 668 | struct bin_attribute *legacy_io; /* Legacy I/O for this bus */ |
| 669 | 669 | struct bin_attribute *legacy_mem; /* Legacy mem */ |
| 670 | 670 | unsigned int is_added:1; |
| 671 | + unsigned int unsafe_warn:1; /* warned about RW1C config write */ | |
| 671 | 672 | }; |
| 672 | 673 | |
| 673 | 674 | #define to_pci_bus(n) container_of(n, struct pci_bus, dev) |