spapr, xics, xive: Move SpaprIrq::reset hook logic into activate/deactivate
commit567192d486cc3073eb097246acc98b200fa3d198
authorDavid Gibson <david@gibson.dropbear.id.au>
Thu, 26 Sep 2019 13:58:36 +0000 (26 23:58 +1000)
committerDavid Gibson <david@gibson.dropbear.id.au>
Wed, 23 Oct 2019 22:36:55 +0000 (24 09:36 +1100)
tree0dbb537c6450218c0aff95b152d46721db65dc9d
parent0a17e0c39f73080e6d5c4d9a2033a5bd475c416c
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>
hw/intc/spapr_xive.c
hw/intc/xics_spapr.c
hw/ppc/spapr_irq.c
include/hw/ppc/spapr_irq.h