diff options
author | Cédric Le Goater <clg@kaod.org> | 2017-12-01 17:06:04 +0100 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2017-12-15 09:49:24 +1100 |
commit | 7718375584a0214c951668a6e92896aaed88b289 (patch) | |
tree | 77e6f46a147e4fe8b6a66df00e02357c6b48444c /hw/ppc/spapr.c | |
parent | 9e7dc5fc2e9d87a5492099de72800347e944e4ea (diff) | |
download | qemu-7718375584a0214c951668a6e92896aaed88b289.zip qemu-7718375584a0214c951668a6e92896aaed88b289.tar.gz qemu-7718375584a0214c951668a6e92896aaed88b289.tar.bz2 |
spapr: introduce a spapr_qirq() helper
xics_get_qirq() is only used by the sPAPR machine. Let's move it there
and change its name to reflect its scope. It will be useful for XIVE
support which will use its own set of qirqs.
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/ppc/spapr.c')
-rw-r--r-- | hw/ppc/spapr.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 02cc7ff..8a6a59f 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -3680,6 +3680,17 @@ void spapr_irq_free(sPAPRMachineState *spapr, int irq, int num) } } +qemu_irq spapr_qirq(sPAPRMachineState *spapr, int irq) +{ + ICSState *ics = spapr->ics; + + if (ics_valid_irq(ics, irq)) { + return ics->qirqs[irq - ics->offset]; + } + + return NULL; +} + static void spapr_pic_print_info(InterruptStatsProvider *obj, Monitor *mon) { |