[Skiboot] [PATCH] platforms/ibm-fsp: Avoid associating PHB slot with platform slot

Gavin Shan gwshan at linux.vnet.ibm.com
Wed Jun 22 13:18:09 AEST 2016


We shouldn't have a hotpluggable slot behind PHB as the root port
cannot be plugged. This removes the association between PHB slot
and platform specific slot. Otherwise, we will run into strange
situation: there are two slots behind PHB and root port separately,
but both of them are dereferencing same platform specific slot.

Signed-off-by: Gavin Shan <gwshan at linux.vnet.ibm.com>
---
 platforms/ibm-fsp/apollo-pci.c  |  8 --------
 platforms/ibm-fsp/firenze-pci.c | 10 ----------
 2 files changed, 18 deletions(-)

diff --git a/platforms/ibm-fsp/apollo-pci.c b/platforms/ibm-fsp/apollo-pci.c
index f13b69d..f79b7b3 100644
--- a/platforms/ibm-fsp/apollo-pci.c
+++ b/platforms/ibm-fsp/apollo-pci.c
@@ -36,8 +36,6 @@
 void apollo_pci_setup_phb(struct phb *phb, unsigned int index)
 {
 	struct dt_node *ioc_node;
-	struct lxvpd_pci_slot *s = NULL;
-	struct pci_slot *slot = NULL;
 
 	/* Grab the device-tree node of the IOC */
 	ioc_node = phb->dt_node->parent;
@@ -57,12 +55,6 @@ void apollo_pci_setup_phb(struct phb *phb, unsigned int index)
 	 */
 	lxvpd_process_slot_entries(phb, ioc_node, 1,
 				   index, sizeof(struct lxvpd_pci_slot));
-
-	/* Fixup P7IOC PHB slot */
-	slot = phb->slot;
-	s = slot ? lxvpd_get_slot(slot) : NULL;
-	if (s)
-		lxvpd_extract_info(slot, s);
 }
 
 void apollo_pci_get_slot_info(struct phb *phb, struct pci_device *pd)
diff --git a/platforms/ibm-fsp/firenze-pci.c b/platforms/ibm-fsp/firenze-pci.c
index aa9a231..b4a0e5a 100644
--- a/platforms/ibm-fsp/firenze-pci.c
+++ b/platforms/ibm-fsp/firenze-pci.c
@@ -937,8 +937,6 @@ static void firenze_pci_slot_init(struct pci_slot *slot)
 void firenze_pci_setup_phb(struct phb *phb, unsigned int index)
 {
 	uint32_t hub_id;
-	struct pci_slot *slot;
-	struct lxvpd_pci_slot *s;
 
 	/* Grab Hub ID used to parse VPDs */
 	hub_id = dt_prop_get_u32_def(phb->dt_node, "ibm,hub-id", 0);
@@ -946,14 +944,6 @@ void firenze_pci_setup_phb(struct phb *phb, unsigned int index)
 	/* Process the pcie slot entries from the lx vpd lid */
 	lxvpd_process_slot_entries(phb, dt_root, hub_id,
 				   index, sizeof(struct firenze_pci_slot));
-
-	/* Fixup PHB3 slot */
-	slot = phb->slot;
-	s = slot ? lxvpd_get_slot(slot) : NULL;
-	if (s) {
-                lxvpd_extract_info(slot, s);
-		firenze_pci_slot_init(slot);
-	}
 }
 
 void firenze_pci_get_slot_info(struct phb *phb, struct pci_device *pd)
-- 
2.1.0



More information about the Skiboot mailing list