OSDN Git Service

ppc/xics: add a XICSState backlink in ICPState
authorCédric Le Goater <clg@kaod.org>
Tue, 18 Oct 2016 08:06:33 +0000 (10:06 +0200)
committerDavid Gibson <david@gibson.dropbear.id.au>
Thu, 27 Oct 2016 22:36:58 +0000 (09:36 +1100)
The link will be used to change the API of the icp_* routines which
are still using an XICSState as an argument.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/intc/xics.c
include/hw/ppc/xics.h

index c051eeb..9f2c81a 100644 (file)
@@ -198,6 +198,7 @@ void xics_set_nr_servers(XICSState *xics, uint32_t nr_servers,
         object_initialize(icp, sizeof(*icp), typename);
         snprintf(name, sizeof(name), "icp[%d]", i);
         object_property_add_child(OBJECT(xics), name, OBJECT(icp), errp);
+        icp->xics = xics;
     }
 }
 
index 573b192..1468d6a 100644 (file)
@@ -117,6 +117,8 @@ struct ICPState {
     uint8_t mfrr;
     qemu_irq output;
     bool cap_irq_xics_enabled;
+
+    XICSState *xics;
 };
 
 #define TYPE_ICS_BASE "ics-base"