[RFC/PATCH 10/12] powerpc: Remove empty iSeries version of pcibios_fixup_bus()

Michael Ellerman michael at ellerman.id.au
Tue Jan 17 14:22:43 EST 2006


We currently build two version of pcibios_fixup_bus(), although the iSeries
version is empty. So replace with a FW_FEATURE_ISERIES test. Move some stuff
around to avoid needing prototype declarations.

 arch/powerpc/kernel/pci_64.c         |   78 ++++++++++++++++++-----------------
 arch/powerpc/platforms/iseries/pci.c |    4 -
 2 files changed, 41 insertions(+), 41 deletions(-)

Index: linux/arch/powerpc/kernel/pci_64.c
===================================================================
--- linux.orig/arch/powerpc/kernel/pci_64.c
+++ linux/arch/powerpc/kernel/pci_64.c
@@ -52,7 +52,6 @@ EXPORT_SYMBOL(io_page_mask);
 
 #ifdef CONFIG_PPC_MULTIPLATFORM
 static void fixup_resource(struct resource *res, struct pci_dev *dev);
-static void do_bus_setup(struct pci_bus *bus);
 static void phbs_remap_io(void);
 #endif
 
@@ -290,6 +289,19 @@ static void __init pcibios_claim_of_setu
 		pcibios_claim_one_bus(b);
 }
 
+static void __devinit do_bus_setup(struct pci_bus *bus)
+{
+	struct pci_dev *dev;
+
+	ppc_md.iommu_bus_setup(bus);
+
+	list_for_each_entry(dev, &bus->devices, bus_list)
+		ppc_md.iommu_dev_setup(dev);
+
+	if (ppc_md.irq_bus_setup)
+		ppc_md.irq_bus_setup(bus);
+}
+
 #ifdef CONFIG_PPC_MULTIPLATFORM
 static u32 get_int_prop(struct device_node *np, const char *name, u32 def)
 {
@@ -1274,42 +1286,6 @@ void __devinit pcibios_fixup_device_reso
 EXPORT_SYMBOL(pcibios_fixup_device_resources);
 
 
-static void __devinit do_bus_setup(struct pci_bus *bus)
-{
-	struct pci_dev *dev;
-
-	ppc_md.iommu_bus_setup(bus);
-
-	list_for_each_entry(dev, &bus->devices, bus_list)
-		ppc_md.iommu_dev_setup(dev);
-
-	if (ppc_md.irq_bus_setup)
-		ppc_md.irq_bus_setup(bus);
-}
-
-void __devinit pcibios_fixup_bus(struct pci_bus *bus)
-{
-	struct pci_dev *dev = bus->self;
-
-	if (dev && pci_probe_only &&
-	    (dev->class >> 8) == PCI_CLASS_BRIDGE_PCI) {
-		/* This is a subordinate bridge */
-
-		pci_read_bridge_bases(bus);
-		pcibios_fixup_device_resources(dev, bus);
-	}
-
-	do_bus_setup(bus);
-
-	if (!pci_probe_only)
-		return;
-
-	list_for_each_entry(dev, &bus->devices, bus_list)
-		if ((dev->class >> 8) != PCI_CLASS_BRIDGE_PCI)
-			pcibios_fixup_device_resources(dev, bus);
-}
-EXPORT_SYMBOL(pcibios_fixup_bus);
-
 /*
  * Reads the interrupt pin to determine if interrupt is use by card.
  * If the interrupt is used, then gets the interrupt line from the 
@@ -1373,6 +1349,34 @@ struct pci_controller* pci_find_hose_for
 
 #endif /* CONFIG_PPC_MULTIPLATFORM */
 
+void __devinit pcibios_fixup_bus(struct pci_bus *bus)
+{
+	struct pci_dev *dev;
+
+	if (firmware_has_feature(FW_FEATURE_ISERIES))
+		return;
+
+	dev = bus->self;
+
+	if (dev && pci_probe_only &&
+	    (dev->class >> 8) == PCI_CLASS_BRIDGE_PCI) {
+		/* This is a subordinate bridge */
+
+		pci_read_bridge_bases(bus);
+		pcibios_fixup_device_resources(dev, bus);
+	}
+
+	do_bus_setup(bus);
+
+	if (!pci_probe_only)
+		return;
+
+	list_for_each_entry(dev, &bus->devices, bus_list)
+		if ((dev->class >> 8) != PCI_CLASS_BRIDGE_PCI)
+			pcibios_fixup_device_resources(dev, bus);
+}
+EXPORT_SYMBOL(pcibios_fixup_bus);
+
 unsigned long pci_address_to_pio(phys_addr_t address)
 {
 	struct pci_controller *hose, *tmp;
Index: linux/arch/powerpc/platforms/iseries/pci.c
===================================================================
--- linux.orig/arch/powerpc/platforms/iseries/pci.c
+++ linux/arch/powerpc/platforms/iseries/pci.c
@@ -311,10 +311,6 @@ void __init iSeries_pci_final_fixup(void
 	mf_display_src(0xC9000200);
 }
 
-void pcibios_fixup_bus(struct pci_bus *PciBus)
-{
-}
-
 void pcibios_fixup_resources(struct pci_dev *pdev)
 {
 }



More information about the Linuxppc64-dev mailing list