diff options
author | David Gibson | 2019-09-26 15:58:36 +0200 |
---|---|---|
committer | David Gibson | 2019-10-24 00:36:55 +0200 |
commit | 567192d486cc3073eb097246acc98b200fa3d198 (patch) | |
tree | 0dbb537c6450218c0aff95b152d46721db65dc9d /include/hw/ppc/spapr_irq.h | |
parent | spapr: Remove SpaprIrq::init_kvm hook (diff) | |
download | qemu-567192d486cc3073eb097246acc98b200fa3d198.tar.gz qemu-567192d486cc3073eb097246acc98b200fa3d198.tar.xz qemu-567192d486cc3073eb097246acc98b200fa3d198.zip |
spapr, xics, xive: Move SpaprIrq::reset hook logic into activate/deactivate
It turns out that all the logic in the SpaprIrq::reset hooks (and some in
the SpaprIrq::post_load hooks) isn't really related to resetting the irq
backend (that's handled by the backends' own reset routines). Rather its
about getting the backend ready to be the active interrupt controller or
stopping being the active interrupt controller - reset (and post_load) is
just the only time that changes at present.
To make this flow clearer, move the logic into the explicit backend
activate and deactivate hooks.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'include/hw/ppc/spapr_irq.h')
-rw-r--r-- | include/hw/ppc/spapr_irq.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/hw/ppc/spapr_irq.h b/include/hw/ppc/spapr_irq.h index 06179b271f..e02e44624b 100644 --- a/include/hw/ppc/spapr_irq.h +++ b/include/hw/ppc/spapr_irq.h @@ -84,7 +84,6 @@ typedef struct SpaprIrq { bool xive; int (*post_load)(SpaprMachineState *spapr, int version_id); - void (*reset)(SpaprMachineState *spapr, Error **errp); } SpaprIrq; extern SpaprIrq spapr_irq_xics; @@ -99,6 +98,9 @@ qemu_irq spapr_qirq(SpaprMachineState *spapr, int irq); int spapr_irq_post_load(SpaprMachineState *spapr, int version_id); void spapr_irq_reset(SpaprMachineState *spapr, Error **errp); int spapr_irq_get_phandle(SpaprMachineState *spapr, void *fdt, Error **errp); +int spapr_irq_init_kvm(int (*fn)(SpaprInterruptController *, Error **), + SpaprInterruptController *intc, + Error **errp); /* * XICS legacy routines |