mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
spapr, xics, xive: Move set_irq from SpaprIrq to SpaprInterruptController
This method depends only on the active irq controller. Now that we've formalized the notion of active controller we can dispatch directly through that, rather than dispatching via SpaprIrq with the dual version having to do a second conditional dispatch. 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
81106ddd1a
commit
7bcdbcca2f
4 changed files with 34 additions and 32 deletions
|
@ -56,6 +56,9 @@ typedef struct SpaprInterruptControllerClass {
|
|||
int (*claim_irq)(SpaprInterruptController *intc, int irq, bool lsi,
|
||||
Error **errp);
|
||||
void (*free_irq)(SpaprInterruptController *intc, int irq);
|
||||
|
||||
/* These methods should only be called on the active intc */
|
||||
void (*set_irq)(SpaprInterruptController *intc, int irq, int val);
|
||||
} SpaprInterruptControllerClass;
|
||||
|
||||
void spapr_irq_update_active_intc(SpaprMachineState *spapr);
|
||||
|
@ -80,7 +83,6 @@ typedef struct SpaprIrq {
|
|||
void *fdt, uint32_t phandle);
|
||||
int (*post_load)(SpaprMachineState *spapr, int version_id);
|
||||
void (*reset)(SpaprMachineState *spapr, Error **errp);
|
||||
void (*set_irq)(void *opaque, int srcno, int val);
|
||||
void (*init_kvm)(SpaprMachineState *spapr, Error **errp);
|
||||
} SpaprIrq;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue