Received: from eggs.gnu.org ([2001:4830:134:3::10]:36679) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxsve-0006fj-U5 for qemu-devel@nongnu.org; Sat, 22 Oct 2016 05:49:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bxsvb-0002mJ-SG for qemu-devel@nongnu.org; Sat, 22 Oct 2016 05:49:26 -0400 Received: from mo69.mail-out.ovh.net ([178.32.228.69]:40819) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bxsvb-0002m7-Mc for qemu-devel@nongnu.org; Sat, 22 Oct 2016 05:49:23 -0400 Received: from player798.ha.ovh.net (b7.ovh.net [213.186.33.57]) by mo69.mail-out.ovh.net (Postfix) with ESMTP id B8BC76AD4 for ; Sat, 22 Oct 2016 11:49:22 +0200 (CEST) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Date: Sat, 22 Oct 2016 11:46:47 +0200 Message-Id: <1477129610-31353-15-git-send-email-clg@kaod.org> In-Reply-To: <1477129610-31353-1-git-send-email-clg@kaod.org> References: <1477129610-31353-1-git-send-email-clg@kaod.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v5 14/17] ppc/xics: introduce a helper to insert a new ics List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-ppc@nongnu.org Cc: David Gibson , Benjamin Herrenschmidt , qemu-devel@nongnu.org, Alexander Graf , Cedric Le Goater Interrupt Control Sources (ICS) are now maintained under a list. Signed-off-by: C=C3=A9dric Le Goater --- hw/intc/xics.c | 6 ++++++ include/hw/ppc/xics.h | 1 + 2 files changed, 7 insertions(+) diff --git a/hw/intc/xics.c b/hw/intc/xics.c index 095c16a30082..f24787e95013 100644 --- a/hw/intc/xics.c +++ b/hw/intc/xics.c @@ -151,6 +151,12 @@ static void xics_common_reset(DeviceState *d) } } =20 +void xics_insert_ics(XICSState *xics, ICSState *ics) +{ + ics->xics =3D xics; + QLIST_INSERT_HEAD(&xics->ics, ics, list); +} + static void xics_prop_get_nr_irqs(Object *obj, Visitor *v, const char *n= ame, void *opaque, Error **errp) { diff --git a/include/hw/ppc/xics.h b/include/hw/ppc/xics.h index beb232e616c5..f31eef8c9f6c 100644 --- a/include/hw/ppc/xics.h +++ b/include/hw/ppc/xics.h @@ -228,6 +228,7 @@ void ics_simple_write_xive(ICSState *ics, int nr, int= server, void ics_set_irq_type(ICSState *ics, int srcno, bool lsi); =20 ICSState *xics_find_source(XICSState *icp, int irq); +void xics_insert_ics(XICSState *xics, ICSState *ics); =20 typedef struct PnvChip PnvChip; =20 --=20 2.7.4