From patchwork Wed Nov 9 16:14:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 622927 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp353574pvb; Wed, 9 Nov 2022 08:15:25 -0800 (PST) X-Google-Smtp-Source: AA0mqf4lRnaVO9hW4d3fmi0vsvSrBq4+Tw5e/lzWbIEL0oqVo6xh+4MZMDR2R11tv+qGgqTVRpbX X-Received: by 2002:ae9:f30d:0:b0:6fb:7cb:7b21 with SMTP id p13-20020ae9f30d000000b006fb07cb7b21mr6143039qkg.653.1668010525250; Wed, 09 Nov 2022 08:15:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668010525; cv=none; d=google.com; s=arc-20160816; b=nRdRJ5wu5VVuJ4ZIiREpf0gkOXLAZeRaVR8rBv14FsjXovkAAusB7gtLD4Wox9GDj6 2RFo70tbwY1R1WvUEab4WCCN8Xu0KKobxqwrrxLSUmxeBKmi8/oU4wZr7hzPcHMWWVkH q62S1orY5JxzlVBrB22R+RZkCDPi5iocSmXIHOMuFDW6lSXqbeFiMlpDMdkVjcFHhlVD +HtpH0oZxY/O4lL86r32s3e+waFMrG2RRcAlGh9LdKA5FCh4WOJbyHeKcK3N+iOqrFOX ZPeuogYeVhasDHdqhbP1Oln2d49unkd0hlZTVUahHMetl0nQK2gZLLDzgIU4aMHUCTyD hWuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=LQMjmXDjci7tzxnXSukseV+1Ik+M+TaUYDCQHT998tw=; b=G8ulKotzGo1oH9Iahps1wQ8rvzNas0VyH3tN3G5Vn06F5Yjw6wjOiKtSsXi/F8U0Xs 7+MOn4gcUHn8RBgHGjL2q943N7nYrh5VAPRbVjrHLMQBxFL4cC8Nh5nnDJ9kr/cHK9BV sKykpCiP1ngM3z0DAjNkoCWJTYupzVXH3HB6L+l0qXVEjk5A9T8S3PHYoTYJx1oQKQ29 LRJPgVAJjwciW9ivn6dhpG928da3jr37tzikxu9+WZU3wCwNamWNAA8aVVtX6ljqbyVu vhuGzKCiSOcYy+9j3qVzRZorma+gVxoyTrIlTcDBzVhUVFTNKjTU6mKmygz3jxK+1h2F Ukuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fkvovwRj; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id bi13-20020a05620a318d00b006f3cd8c5869si8787521qkb.45.2022.11.09.08.15.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 09 Nov 2022 08:15:25 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fkvovwRj; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1osnj9-00018X-Sh; Wed, 09 Nov 2022 11:14:59 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1osnj7-00017A-Q5 for qemu-devel@nongnu.org; Wed, 09 Nov 2022 11:14:57 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1osnj2-0007cR-C6 for qemu-devel@nongnu.org; Wed, 09 Nov 2022 11:14:57 -0500 Received: by mail-wr1-x42e.google.com with SMTP id bk15so26441116wrb.13 for ; Wed, 09 Nov 2022 08:14:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=LQMjmXDjci7tzxnXSukseV+1Ik+M+TaUYDCQHT998tw=; b=fkvovwRjmF/k+CvVDD3HUCUo3CWQtjuQw8c+/DEkDQxt/YPbmzi9GvCsSYJxeKQ+BF jFZ98YTeZcuQu/seeca+Y26qQJ54bMu1lwrNhPRgYoIW6Sw1TEdcqX7MhK00A8ARqyZk Q5ko2qzbB3G3SkgGZXQTEDMTAR3Z+Ca3xQW3KEmLAh1Y6atibd3NwY/fwNu9q8l4PJK1 vUQGkdrJ1Q4U9XWEz76TGJl5p0XHudhCcu2PQGq4gW0IIvz69l2GUvq6JSl4tNYggv/D e6ieW4lIuo8MA68UB4vpBtCyQ+75godiKnASFQw43oTYiWweaBlKU2P7I3wAj5YxHdZs 5aoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LQMjmXDjci7tzxnXSukseV+1Ik+M+TaUYDCQHT998tw=; b=JOs8ClfIPmKKj0k/UwAINgoyrF7+dhPBBsbFdEYBwpRcQHfp/c14266GzvgF2Y7Jph 05NRb6zagKRnCQ+Gp2DZacaQkKfgB4GsZnuF+1OOitvlqUNBWH2/BAcwwbQ4Ho0L1TeV vqk0rpM98Py2a9f2HYuepMxASpdr2r7GgNm0QR8UAEcTDDuhP6Qv56+GLt2bRMi8onxA M7CZKtqErzAldu52n1A1vbVOQ7P2aP1ePybQy9WsNgo3v0cHDVCbZ9XAtdgGcE5/p8Pf +W42/m0RbRCkKGjKOnZ3TAvszYTW0mxB9b1xVN3qqXHkgH/NrSGYt/g29x30/Gfq6poS QfIQ== X-Gm-Message-State: ACrzQf2xIKYEws6bJhm3ygBm9G6pOQ9SxdXe/xsocvO9C6PzXVZgCRzT L8HcvQGIS5f1WPKt+R2r4btBXpE+l4ttQg== X-Received: by 2002:adf:f8c3:0:b0:236:9c97:6f6b with SMTP id f3-20020adff8c3000000b002369c976f6bmr37899421wrq.548.1668010491583; Wed, 09 Nov 2022 08:14:51 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id p15-20020adfce0f000000b0022cbf4cda62sm16209186wrn.27.2022.11.09.08.14.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Nov 2022 08:14:51 -0800 (PST) From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Subject: [PATCH for-8.0 5/9] hw/intc: Convert TYPE_ARM_GICV3_COMMON to 3-phase reset Date: Wed, 9 Nov 2022 16:14:40 +0000 Message-Id: <20221109161444.3397405-6-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221109161444.3397405-1-peter.maydell@linaro.org> References: <20221109161444.3397405-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Convert the TYPE_ARM_GICV3_COMMON parent class to 3-phase reset. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- hw/intc/arm_gicv3_common.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/intc/arm_gicv3_common.c b/hw/intc/arm_gicv3_common.c index 351843db4aa..642a8243ed4 100644 --- a/hw/intc/arm_gicv3_common.c +++ b/hw/intc/arm_gicv3_common.c @@ -450,9 +450,9 @@ static void arm_gicv3_finalize(Object *obj) g_free(s->redist_region_count); } -static void arm_gicv3_common_reset(DeviceState *dev) +static void arm_gicv3_common_reset_hold(Object *obj) { - GICv3State *s = ARM_GICV3_COMMON(dev); + GICv3State *s = ARM_GICV3_COMMON(obj); int i; for (i = 0; i < s->num_cpu; i++) { @@ -578,9 +578,10 @@ static Property arm_gicv3_common_properties[] = { static void arm_gicv3_common_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); + ResettableClass *rc = RESETTABLE_CLASS(klass); ARMLinuxBootIfClass *albifc = ARM_LINUX_BOOT_IF_CLASS(klass); - dc->reset = arm_gicv3_common_reset; + rc->phases.hold = arm_gicv3_common_reset_hold; dc->realize = arm_gicv3_common_realize; device_class_set_props(dc, arm_gicv3_common_properties); dc->vmsd = &vmstate_gicv3;