Commit ecf677c8 authored by Palmer Dabbelt's avatar Palmer Dabbelt Committed by Bjorn Helgaas
Browse files

PCI: Add a generic weak pcibios_align_resource()



Multiple architectures define this as a trivial function, and I'm adding
another one as part of the RISC-V port.  Add a __weak version of
pcibios_align_resource() and delete the now-obselete ones in a handful of
ports.

The only functional change should be that a handful of ports used to export
pcibios_fixup_bus().  Only some architectures export this, so I just
dropped it.

Signed-off-by: default avatarPalmer Dabbelt <palmer@dabbelt.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent bccf90d6
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -7,12 +7,3 @@
 */

#include <linux/pci.h>

/*
 * We don't have to worry about legacy ISA devices, so nothing to do here
 */
resource_size_t pcibios_align_resource(void *data, const struct resource *res,
				resource_size_t size, resource_size_t align)
{
	return res->start;
}
+0 −9
Original line number Diff line number Diff line
@@ -22,15 +22,6 @@
#include <linux/pci-ecam.h>
#include <linux/slab.h>

/*
 * We don't have to worry about legacy ISA devices, so nothing to do here
 */
resource_size_t pcibios_align_resource(void *data, const struct resource *res,
				resource_size_t size, resource_size_t align)
{
	return res->start;
}

#ifdef CONFIG_ACPI
/*
 * Try to assign the IRQ number when probing a new device
+0 −7
Original line number Diff line number Diff line
@@ -411,13 +411,6 @@ pcibios_disable_device (struct pci_dev *dev)
		acpi_pci_irq_disable(dev);
}

resource_size_t
pcibios_align_resource (void *data, const struct resource *res,
		        resource_size_t size, resource_size_t align)
{
	return res->start;
}

/**
 * ia64_pci_get_legacy_mem - generic legacy mem routine
 * @bus: bus to get legacy memory base address for
+0 −7
Original line number Diff line number Diff line
@@ -823,13 +823,6 @@ void pcibios_setup_bus_devices(struct pci_bus *bus)
 * but we want to try to avoid allocating at 0x2900-0x2bff
 * which might have be mirrored at 0x0100-0x03ff..
 */
resource_size_t pcibios_align_resource(void *data, const struct resource *res,
				resource_size_t size, resource_size_t align)
{
	return res->start;
}
EXPORT_SYMBOL(pcibios_align_resource);

int pcibios_add_device(struct pci_dev *dev)
{
	dev->irq = of_irq_parse_and_map_pci(dev, 0, 0);
+0 −6
Original line number Diff line number Diff line
@@ -94,9 +94,3 @@ void pcibios_fixup_bus(struct pci_bus *pbus)
		}
	}
}

resource_size_t pcibios_align_resource(void *data, const struct resource *res,
				resource_size_t size, resource_size_t align)
{
	return res->start;
}
Loading