[Skiboot] [PATCH 03/28] pci: get_reserved_pe_number() needs to take the PHB as argument
Benjamin Herrenschmidt
benh at kernel.crashing.org
Thu Jul 7 11:49:54 AEST 2016
The value might be different for different PHB instances
Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
Acked-by: Michael Neuling <mikey at neuling.org>
---
core/pci.c | 2 +-
hw/p7ioc-phb.c | 2 +-
hw/phb3.c | 2 +-
include/pci.h | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/core/pci.c b/core/pci.c
index 054aaef..9b65a49 100644
--- a/core/pci.c
+++ b/core/pci.c
@@ -289,7 +289,7 @@ static void pci_check_clear_freeze(struct phb *phb)
/* Retrieve the reserved PE number */
pe_number = OPAL_PARAMETER;
if (phb->ops->get_reserved_pe_number)
- pe_number = phb->ops->get_reserved_pe_number();
+ pe_number = phb->ops->get_reserved_pe_number(phb);
if (pe_number < 0)
return;
diff --git a/hw/p7ioc-phb.c b/hw/p7ioc-phb.c
index 98ecb56..96554c8 100644
--- a/hw/p7ioc-phb.c
+++ b/hw/p7ioc-phb.c
@@ -1635,7 +1635,7 @@ static uint8_t p7ioc_choose_bus(struct phb *phb __unused,
return al;
}
-static int64_t p7ioc_get_reserved_pe_number(void)
+static int64_t p7ioc_get_reserved_pe_number(struct phb *phb __unused)
{
return 127;
}
diff --git a/hw/phb3.c b/hw/phb3.c
index 905fdf4..df23c43 100644
--- a/hw/phb3.c
+++ b/hw/phb3.c
@@ -269,7 +269,7 @@ static uint8_t phb3_choose_bus(struct phb *phb __unused,
return candidate;
}
-static int64_t phb3_get_reserved_pe_number(void)
+static int64_t phb3_get_reserved_pe_number(struct phb *phb __unused)
{
return PHB3_RESERVED_PE_NUM;
}
diff --git a/include/pci.h b/include/pci.h
index 83c9683..c459554 100644
--- a/include/pci.h
+++ b/include/pci.h
@@ -185,7 +185,7 @@ struct phb_ops {
uint8_t (*choose_bus)(struct phb *phb, struct pci_device *bridge,
uint8_t candidate, uint8_t *max_bus,
bool *use_max);
- int64_t (*get_reserved_pe_number)(void);
+ int64_t (*get_reserved_pe_number)(struct phb *phb);
/*
* Device init method is called after a device has been detected
--
2.7.4
More information about the Skiboot
mailing list