qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 17/49] ppc/xics: add a XICSState backlink in ICPState


From: David Gibson
Subject: [Qemu-devel] [PULL 17/49] ppc/xics: add a XICSState backlink in ICPState
Date: Wed, 26 Oct 2016 22:42:21 +1100

From: Cédric Le Goater <address@hidden>

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 <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
 hw/intc/xics.c        | 1 +
 include/hw/ppc/xics.h | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/hw/intc/xics.c b/hw/intc/xics.c
index c051eeb..9f2c81a 100644
--- a/hw/intc/xics.c
+++ b/hw/intc/xics.c
@@ -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;
     }
 }
 
diff --git a/include/hw/ppc/xics.h b/include/hw/ppc/xics.h
index 573b192..1468d6a 100644
--- a/include/hw/ppc/xics.h
+++ b/include/hw/ppc/xics.h
@@ -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"
-- 
2.7.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]