aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/psi.c11
-rw-r--r--hw/xive2.c7
-rw-r--r--include/xive.h2
3 files changed, 19 insertions, 1 deletions
diff --git a/hw/psi.c b/hw/psi.c
index 2914225..e9b8e2e 100644
--- a/hw/psi.c
+++ b/hw/psi.c
@@ -564,7 +564,16 @@ static void psi_p9_mask_unhandled_irq(struct irq_source *is, uint32_t isn)
* have a handler for the interrupt then it needs to be masked to
* prevent the IRQ from locking up the thread which handles it.
*/
- xive_source_mask(is, isn);
+ switch (proc_gen) {
+ case proc_gen_p9:
+ xive_source_mask(is, isn);
+ break;
+ case proc_gen_p10:
+ xive2_source_mask(is, isn);
+ return;
+ default:
+ assert(false);
+ }
}
diff --git a/hw/xive2.c b/hw/xive2.c
index 125e3fb..a8d25f7 100644
--- a/hw/xive2.c
+++ b/hw/xive2.c
@@ -2531,6 +2531,13 @@ static char *xive_source_name(struct irq_source *is, uint32_t isn)
return s->orig_ops->name(is, isn);
}
+void xive2_source_mask(struct irq_source *is, uint32_t isn)
+{
+ struct xive_src *s = container_of(is, struct xive_src, is);
+
+ xive_update_irq_mask(s, isn - s->esb_base, true);
+}
+
static const struct irq_source_ops xive_irq_source_ops = {
.interrupt = xive_source_interrupt,
.attributes = xive_source_attributes,
diff --git a/include/xive.h b/include/xive.h
index faaef2a..8d5fbed 100644
--- a/include/xive.h
+++ b/include/xive.h
@@ -91,6 +91,8 @@ uint64_t xive2_get_esb_base(uint32_t girq);
void xive2_cpu_callin(struct cpu_thread *cpu);
void *xive2_get_trigger_port(uint32_t girq);
+void xive2_source_mask(struct irq_source *is, uint32_t isn);
+
void xive2_cpu_reset(void);
void xive2_late_init(void);