diff mbox series

hw/phb4: Fix references to PHB3

Message ID 20190429071740.18491-1-oohall@gmail.com
State Accepted
Headers show
Series hw/phb4: Fix references to PHB3 | expand

Commit Message

Oliver O'Halloran April 29, 2019, 7:17 a.m. UTC
Currently most of the functionality of phb4_lsi_attributes() is disabled
when we have #defined DISABLE_ERR_INTS. This is the default behaviour
and #undefing the constant results in skiboot not compiling because the
code was not updated when it was copied across from PHB3. This patch
fixes the problem by changing the names to the phb4 versions.

Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
---
 hw/phb4.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Stewart Smith May 2, 2019, 8:16 a.m. UTC | #1
"Oliver O'Halloran" <oohall@gmail.com> writes:
> Currently most of the functionality of phb4_lsi_attributes() is disabled
> when we have #defined DISABLE_ERR_INTS. This is the default behaviour
> and #undefing the constant results in skiboot not compiling because the
> code was not updated when it was copied across from PHB3. This patch
> fixes the problem by changing the names to the phb4 versions.

Just think, if we ever have something that's again derived from phb4,
we'll get to do this again!

Merged to master as of 98a1ae10739674d83f0b159714f9d79b3ce7ad9d
diff mbox series

Patch

diff --git a/hw/phb4.c b/hw/phb4.c
index 711d55b0dc26..7d06c3acfca4 100644
--- a/hw/phb4.c
+++ b/hw/phb4.c
@@ -5530,10 +5530,10 @@  static uint64_t phb4_lsi_attributes(struct irq_source *is __unused,
 				uint32_t isn __unused)
 {
 #ifndef DISABLE_ERR_INTS
-	struct phb3 *p = is->data;
+	struct phb4 *p = is->data;
 	uint32_t idx = isn - p->base_lsi;
 
-	if (idx == PHB3_LSI_PCIE_INF || idx == PHB3_LSI_PCIE_ER)
+	if (idx == PHB4_LSI_PCIE_INF || idx == PHB4_LSI_PCIE_ER)
 		return IRQ_ATTR_TARGET_OPAL | IRQ_ATTR_TARGET_RARE | IRQ_ATTR_TYPE_LSI;
 #endif
 	return IRQ_ATTR_TARGET_LINUX;