mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
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>
This commit is contained in:
parent
0a17e0c39f
commit
567192d486
4 changed files with 61 additions and 65 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue