From patchwork Tue Oct 18 08:06:33 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: 683570 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 3synqJ4NGTz9s9x for ; Tue, 18 Oct 2016 19:12:12 +1100 (AEDT) Received: from localhost ([::1]:39497 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bwPVJ-0005nN-9F for incoming@patchwork.ozlabs.org; Tue, 18 Oct 2016 04:12:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32812) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bwPQN-0001GJ-Uu for qemu-devel@nongnu.org; Tue, 18 Oct 2016 04:07:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bwPQN-0000lI-4G for qemu-devel@nongnu.org; Tue, 18 Oct 2016 04:07:03 -0400 Received: from 15.mo1.mail-out.ovh.net ([188.165.38.232]:43624) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bwPQM-0000l1-V7 for qemu-devel@nongnu.org; Tue, 18 Oct 2016 04:07:03 -0400 Received: from player726.ha.ovh.net (b7.ovh.net [213.186.33.57]) by mo1.mail-out.ovh.net (Postfix) with ESMTP id D856815650 for ; Tue, 18 Oct 2016 10:07:01 +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 player726.ha.ovh.net (Postfix) with ESMTPSA id 9161B2A0079; Tue, 18 Oct 2016 10:06:56 +0200 (CEST) From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= To: qemu-ppc@nongnu.org Date: Tue, 18 Oct 2016 10:06:33 +0200 Message-Id: <1476777994-28711-3-git-send-email-clg@kaod.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1476777994-28711-1-git-send-email-clg@kaod.org> References: <1476777994-28711-1-git-send-email-clg@kaod.org> MIME-Version: 1.0 X-Ovh-Tracer-Id: 15574854886713297747 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeelvddrheefgdduvdekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 188.165.38.232 Subject: [Qemu-devel] [PATCH 2/3] ppc/xics: add a XICSState backlink in ICPState 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 , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , qemu-devel@nongnu.org, David Gibson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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 --- 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 c051eebb446b..9f2c81a7f140 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 573b1920536b..1468d6a89088 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"