[Skiboot] [PATCH 1/2] core/ipmi-opal: Add interrupt-parent property for ipmi node on P9 and above.

Pridhiviraj Paidipeddi ppaidipe at linux.vnet.ibm.com
Thu Mar 1 18:30:11 AEDT 2018


dtc complains below warning with newer 4.2+ kernels.
dts: Warning
(interrupts_property): Missing interrupt-parent for /ibm,opal/ipmi

This fix adds interrupt-parent property under /ibm,opal/ipmi DT node on P9
and above, which allows ipmi-opal to properly use the OPAL irqchip.

Signed-off-by: Pridhiviraj Paidipeddi <ppaidipe at linux.vnet.ibm.com>
---
 core/ipmi-opal.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/core/ipmi-opal.c b/core/ipmi-opal.c
index d8df8f7..13a4e2f 100644
--- a/core/ipmi-opal.c
+++ b/core/ipmi-opal.c
@@ -127,7 +127,7 @@ out_unlock:
 
 void ipmi_opal_init(void)
 {
-	struct dt_node *opal_ipmi;
+	struct dt_node *opal_ipmi, *opal_event = NULL;
 
 	opal_ipmi = dt_new(opal_node, "ipmi");
 	dt_add_property_strings(opal_ipmi, "compatible", "ibm,opal-ipmi");
@@ -136,6 +136,12 @@ void ipmi_opal_init(void)
 	dt_add_property_cells(opal_ipmi, "interrupts",
 			      ilog2(ipmi_backend->opal_event_ipmi_recv));
 
+        if (proc_gen >= proc_gen_p9)
+		opal_event = dt_find_by_name(opal_node, "event");
+		if (opal_event)
+			dt_add_property_cells(opal_ipmi, "interrupt-parent",
+					      opal_event->phandle);
+
 	opal_register(OPAL_IPMI_SEND, opal_ipmi_send, 3);
 	opal_register(OPAL_IPMI_RECV, opal_ipmi_recv, 3);
 }
-- 
2.7.4



More information about the Skiboot mailing list