]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
PCI: Remove unused PCI_SUBTRACTIVE_DECODE
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Thu, 17 Oct 2024 14:11:08 +0000 (17:11 +0300)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 18 Oct 2024 18:34:59 +0000 (13:34 -0500)
2fe2abf896c1 ("PCI: augment bus resource table with a list") added
PCI_SUBTRACTIVE_DECODE which is put into the struct pci_bus_resource flags
field but is never read. There seems to never have been users for it.

Remove both PCI_SUBTRACTIVE_DECODE and the flags field from the struct
pci_bus_resource.

Link: https://lore.kernel.org/r/20241017141111.44612-1-ilpo.jarvinen@linux.intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
arch/s390/pci/pci_bus.c
arch/x86/pci/fixup.c
drivers/pci/bus.c
drivers/pci/probe.c
include/linux/pci.h

index daa5d7450c7d383b254d225d022e23a14c105e41..5630af5deb8b9256d8cc49f3b1be0fd194a3c38c 100644 (file)
@@ -53,7 +53,7 @@ static int zpci_bus_prepare_device(struct zpci_dev *zdev)
                zpci_setup_bus_resources(zdev);
                for (i = 0; i < PCI_STD_NUM_BARS; i++) {
                        if (zdev->bars[i].res)
-                               pci_bus_add_resource(zdev->zbus->bus, zdev->bars[i].res, 0);
+                               pci_bus_add_resource(zdev->zbus->bus, zdev->bars[i].res);
                }
        }
 
index 98a9bb92d75c88ac059f518b2c46fcf5c4ed703a..0681ecfe34300e54fceb17965340bcdbbb2e5d7f 100644 (file)
@@ -757,7 +757,7 @@ static void pci_amd_enable_64bit_bar(struct pci_dev *dev)
                dev_info(&dev->dev, "adding root bus resource %pR (tainting kernel)\n",
                         res);
                add_taint(TAINT_FIRMWARE_WORKAROUND, LOCKDEP_STILL_OK);
-               pci_bus_add_resource(dev->bus, res, 0);
+               pci_bus_add_resource(dev->bus, res);
        }
 
        base = ((res->start >> 8) & AMD_141b_MMIO_BASE_MMIOBASE_MASK) |
index 55c85368605187586d5d10908bf12005025a656e..9cf6d0f3ab2be4513be80ba5b36aba0a3922f025 100644 (file)
@@ -46,8 +46,7 @@ void pci_free_resource_list(struct list_head *resources)
 }
 EXPORT_SYMBOL(pci_free_resource_list);
 
-void pci_bus_add_resource(struct pci_bus *bus, struct resource *res,
-                         unsigned int flags)
+void pci_bus_add_resource(struct pci_bus *bus, struct resource *res)
 {
        struct pci_bus_resource *bus_res;
 
@@ -58,7 +57,6 @@ void pci_bus_add_resource(struct pci_bus *bus, struct resource *res,
        }
 
        bus_res->res = res;
-       bus_res->flags = flags;
        list_add_tail(&bus_res->list, &bus->resources);
 }
 
index 4f68414c308609ed99e675a943e73a8f6ae0dfe3..4243b1e6ece26cd6f1fb3de0a22e247b1119ff74 100644 (file)
@@ -546,8 +546,7 @@ void pci_read_bridge_bases(struct pci_bus *child)
        if (dev->transparent) {
                pci_bus_for_each_resource(child->parent, res) {
                        if (res && res->flags) {
-                               pci_bus_add_resource(child, res,
-                                                    PCI_SUBTRACTIVE_DECODE);
+                               pci_bus_add_resource(child, res);
                                pci_info(dev, "  bridge window %pR (subtractive decode)\n",
                                           res);
                        }
@@ -1032,7 +1031,7 @@ static int pci_register_host_bridge(struct pci_host_bridge *bridge)
                if (res->flags & IORESOURCE_BUS)
                        pci_bus_insert_busn_res(bus, bus->number, res->end);
                else
-                       pci_bus_add_resource(bus, res, 0);
+                       pci_bus_add_resource(bus, res);
 
                if (offset) {
                        if (resource_type(res) == IORESOURCE_IO)
index 573b4c4c2be61f86338e753d97bc618a4dd25ccd..6a9cf80d0d4baffc725941c68e42c87b5e938ec4 100644 (file)
@@ -633,18 +633,9 @@ int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge);
  * Use pci_bus_for_each_resource() to iterate through all the resources.
  */
 
-/*
- * PCI_SUBTRACTIVE_DECODE means the bridge forwards the window implicitly
- * and there's no way to program the bridge with the details of the window.
- * This does not apply to ACPI _CRS windows, even with the _DEC subtractive-
- * decode bit set, because they are explicit and can be programmed with _SRS.
- */
-#define PCI_SUBTRACTIVE_DECODE 0x1
-
 struct pci_bus_resource {
        struct list_head        list;
        struct resource         *res;
-       unsigned int            flags;
 };
 
 #define PCI_REGION_FLAG_MASK   0x0fU   /* These bits of resource flags tell us the PCI region flags */
@@ -1498,8 +1489,7 @@ void pci_add_resource(struct list_head *resources, struct resource *res);
 void pci_add_resource_offset(struct list_head *resources, struct resource *res,
                             resource_size_t offset);
 void pci_free_resource_list(struct list_head *resources);
-void pci_bus_add_resource(struct pci_bus *bus, struct resource *res,
-                         unsigned int flags);
+void pci_bus_add_resource(struct pci_bus *bus, struct resource *res);
 struct resource *pci_bus_resource_n(const struct pci_bus *bus, int n);
 void pci_bus_remove_resources(struct pci_bus *bus);
 void pci_bus_remove_resource(struct pci_bus *bus, struct resource *res);