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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user