diff mbox series

[2/4] psi/p9: mask all sources at init

Message ID 20201104222057.590816-3-clg@kaod.org
State Accepted
Headers show
Series xive/p9: small cleanups | expand

Checks

Context Check Description
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot-dco success Signed-off-by present
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot success Test snowpatch/job/snowpatch-skiboot on branch master
snowpatch_ozlabs/apply_patch success Successfully applied on branch master (89a32b4930be829f37e6967354a759e38048d01f)

Commit Message

Cédric Le Goater Nov. 4, 2020, 10:20 p.m. UTC
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
 hw/psi.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
diff mbox series

Patch

diff --git a/hw/psi.c b/hw/psi.c
index 8a0704729015..545a81643e11 100644
--- a/hw/psi.c
+++ b/hw/psi.c
@@ -530,6 +530,17 @@  static const char *psi_p9_irq_names[P9_PSI_NUM_IRQS] = {
 	"psu"
 };
 
+static void psi_p9_mask_all(struct psi *psi)
+{
+	struct irq_source *is;
+	int isn;
+
+	/* Mask all sources */
+	is = irq_find_source(psi->interrupt);
+	for (isn = is->start; isn < is->end; isn++)
+		xive_source_mask(is, isn);
+}
+
 static void psi_p9_mask_unhandled_irq(struct irq_source *is, uint32_t isn)
 {
 	struct psi *psi = is->data;
@@ -709,6 +720,8 @@  static void psi_init_p9_interrupts(struct psi *psi)
 				12, psi->esb_mmio, XIVE_SRC_LSI,
 				psi, &psi_p9_irq_ops);
 
+	psi_p9_mask_all(psi);
+
 	/* Setup interrupt offset */
 	val = xive_get_notify_base(psi->interrupt);
 	val <<= 32;