diff options
author | Cédric Le Goater | 2017-02-27 15:29:12 +0100 |
---|---|---|
committer | David Gibson | 2017-03-01 01:23:39 +0100 |
commit | 681bfaded64537a408c5f6107dfe9969d6800861 (patch) | |
tree | 60d476cbb70fda398f74c3041e00755273a366e5 /include/hw | |
parent | ppc/xics: remove set_nr_servers() handler from XICSStateClass (diff) | |
download | qemu-681bfaded64537a408c5f6107dfe9969d6800861.tar.gz qemu-681bfaded64537a408c5f6107dfe9969d6800861.tar.xz qemu-681bfaded64537a408c5f6107dfe9969d6800861.zip |
ppc/xics: store the ICS object under the sPAPR machine
A list of ICS objects was introduced under the XICS object for the
PowerNV machine but, for the sPAPR machine, it brings extra complexity
as there is only a single ICS. To simplify the code, let's add the ICS
pointer under the sPAPR machine and try to reduce the use of this list
where possible.
Also, change the xics_spapr_*() routines to use an ICS object instead
of an XICSState and change their name to reflect that these are
specific to the sPAPR ICS object.
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'include/hw')
-rw-r--r-- | include/hw/ppc/spapr.h | 1 | ||||
-rw-r--r-- | include/hw/ppc/xics.h | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h index f9b17d860a..21e506b13c 100644 --- a/include/hw/ppc/spapr.h +++ b/include/hw/ppc/spapr.h @@ -59,6 +59,7 @@ struct sPAPRMachineState { QLIST_HEAD(, sPAPRPHBState) phbs; struct sPAPRNVRAM *nvram; XICSState *xics; + ICSState *ics; DeviceState *rtc; void *htab; diff --git a/include/hw/ppc/xics.h b/include/hw/ppc/xics.h index e79a70748e..37d4d9ce3f 100644 --- a/include/hw/ppc/xics.h +++ b/include/hw/ppc/xics.h @@ -181,10 +181,10 @@ struct ICSIRQState { #define XICS_IRQS_SPAPR 1024 qemu_irq xics_get_qirq(XICSState *icp, int irq); -int xics_spapr_alloc(XICSState *icp, int irq_hint, bool lsi, Error **errp); -int xics_spapr_alloc_block(XICSState *icp, int num, bool lsi, bool align, +int spapr_ics_alloc(ICSState *ics, int irq_hint, bool lsi, Error **errp); +int spapr_ics_alloc_block(ICSState *ics, int num, bool lsi, bool align, Error **errp); -void xics_spapr_free(XICSState *icp, int irq, int num); +void spapr_ics_free(ICSState *ics, int irq, int num); void spapr_dt_xics(XICSState *xics, void *fdt, uint32_t phandle); void xics_cpu_setup(XICSState *icp, PowerPCCPU *cpu); |