From patchwork Sat Oct 22 09:46:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?C=C3=A9dric_Le_Goater?= X-Patchwork-Id: 685353 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3t1J3F3KJVz9sC3 for ; Sat, 22 Oct 2016 21:01:13 +1100 (AEDT) Received: from localhost ([::1]:36306 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxt71-0008Jn-6E for incoming@patchwork.ozlabs.org; Sat, 22 Oct 2016 06:01:11 -0400 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) Received: from hermes.kaod.org.com (LFbn-1-2234-107.w90-76.abo.wanadoo.fr [90.76.55.107]) (Authenticated sender: clg@kaod.org) by player798.ha.ovh.net (Postfix) with ESMTPSA id 789B5540072; Sat, 22 Oct 2016 11:49:16 +0200 (CEST) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-ppc@nongnu.org Date: Sat, 22 Oct 2016 11:46:47 +0200 Message-Id: <1477129610-31353-15-git-send-email-clg@kaod.org> X-Mailer: git-send-email 2.7.4 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 X-Ovh-Tracer-Id: 3900680227778562899 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeelvddriedvgddujecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 178.32.228.69 Subject: [Qemu-devel] [PATCH v5 14/17] ppc/xics: introduce a helper to insert a new ics X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexander Graf , qemu-devel@nongnu.org, Cedric Le Goater , David Gibson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Interrupt Control Sources (ICS) are now maintained under a list. Signed-off-by: Cédric Le Goater Reviewed-by: David Gibson --- 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) } } +void xics_insert_ics(XICSState *xics, ICSState *ics) +{ + ics->xics = xics; + QLIST_INSERT_HEAD(&xics->ics, ics, list); +} + static void xics_prop_get_nr_irqs(Object *obj, Visitor *v, const char *name, 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); ICSState *xics_find_source(XICSState *icp, int irq); +void xics_insert_ics(XICSState *xics, ICSState *ics); typedef struct PnvChip PnvChip;