diff options
author | Cédric Le Goater <clg@kaod.org> | 2019-09-11 15:39:36 +0200 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2019-10-04 10:25:23 +1000 |
commit | 4a99d40551d265e56584bfa6657d9a549e729127 (patch) | |
tree | e48297b870e1e6aac7a2776556f0b030a4a46cce /include | |
parent | 3887d241238c7b5960c7f153d2025891c5f5fc66 (diff) |
spapr/irq: Introduce an ics_irq_free() helper
It will help us to discard interrupt numbers which have not been
claimed in the next patch.
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20190911133937.2716-2-clg@kaod.org>
Reviewed-by: Greg Kurz <groug@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'include')
-rw-r--r-- | include/hw/ppc/xics.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/hw/ppc/xics.h b/include/hw/ppc/xics.h index f2a8d6a4b4..64a2c8862a 100644 --- a/include/hw/ppc/xics.h +++ b/include/hw/ppc/xics.h @@ -179,6 +179,11 @@ void ics_simple_write_xive(ICSState *ics, int nr, int server, uint8_t priority, uint8_t saved_priority); void ics_simple_set_irq(void *opaque, int srcno, int val); +static inline bool ics_irq_free(ICSState *ics, uint32_t srcno) +{ + return !(ics->irqs[srcno].flags & XICS_FLAGS_IRQ_MASK); +} + void ics_set_irq_type(ICSState *ics, int srcno, bool lsi); void icp_pic_print_info(ICPState *icp, Monitor *mon); void ics_pic_print_info(ICSState *ics, Monitor *mon); |