From patchwork Thu Dec 15 12:49:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 634194 Delivered-To: patch@linaro.org Received: by 2002:a17:522:c983:b0:460:3032:e3c4 with SMTP id kr3csp130893pvb; Thu, 15 Dec 2022 04:58:58 -0800 (PST) X-Google-Smtp-Source: AA0mqf7aSUjDqEn+ieyjMSawxLw6O8Mih3mB+qqk9iXB4TWYR9plS4OGpRYLmK0u89EC5/a96bWy X-Received: by 2002:ad4:4485:0:b0:4e8:178d:7ec7 with SMTP id m5-20020ad44485000000b004e8178d7ec7mr14160003qvt.26.1671109138731; Thu, 15 Dec 2022 04:58:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671109138; cv=none; d=google.com; s=arc-20160816; b=ogFAoLmek0iiqKBiOU0ZMMFIQcekwcuzLrCgZB1xVlFTDipNZPb3XkLWNkqtSoWnIf A4spa4UNRqkAHcOoGmQamCkAzU58veMelrcOr2pV9yObb0AdWM7faDZLG806Wfbito6H WDvTS8ACQ5UmTGPNrDFPcuNqfCYdmYRSwsyhRat2uT/yIs4l7SDMVmzAu6v58FACxY4g b4dhxITIy2+zzZiSnJn1G/FG4zFCLdUC+dLGXkq3JfIJsqukgpZnYTRGpaz7WpFs0wxa yxwj95UKWEAOsuIApPpd0KObwjFLkcnX4xUx42oDOtY19TZre9YfFftyxuAoP4P789jl Os4g== 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=0TV5qsA14dk+cYd8jhe+sXqAEhXPrpR+F1VJLlzHiEs=; b=so7Hqj1AawhPySmRA870qqKlbZnLBVjN/EZJAVjmRZvfROMNMFCc9nfy6K/+xx8uDy WhimVHaiKDq5iDTw5Im2HuXfWfTA8o7bn2BykETSqnbJm0KTopmqB39n8tERfhFmXOuY tMPD43hhCLrJDvqQ8VT8gezoxjhZWb31pq59XRXm2tXCmpJGwjDsjNDFtEUNknLPTbFJ P4XlmwLDLgRWwcAoR1t++1dUfiypj0njptpd4yTngS+GL3PF6cbPlPK6KHH+rBv7IrLH YXWGyZT4nCYsbgxinwzUHJB2nPpLNbuzqcow3Fc49SJLLN1DeZ2IwD0/EFt7rZYfq9Lx Zmdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="QBLi2Zt/"; 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 g10-20020a0cdf0a000000b004c709d22b95si1627264qvl.174.2022.12.15.04.58.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Dec 2022 04:58:58 -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="QBLi2Zt/"; 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 1p5nhR-00071D-Vt; Thu, 15 Dec 2022 07:50:58 -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 1p5nh2-0006pV-VW for qemu-devel@nongnu.org; Thu, 15 Dec 2022 07:50:33 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p5ngz-00045o-TA for qemu-devel@nongnu.org; Thu, 15 Dec 2022 07:50:31 -0500 Received: by mail-wm1-x335.google.com with SMTP id v7so13711456wmn.0 for ; Thu, 15 Dec 2022 04:50:29 -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=0TV5qsA14dk+cYd8jhe+sXqAEhXPrpR+F1VJLlzHiEs=; b=QBLi2Zt/XXAjwo9Fe4WabnUrbHRkiyuc/G5PLyKA4Oj3KSdoZhLhVrF/qwyiq+Ee/s 19ZVGX8NOChD5ZRbJllaHlOUzIbBmKjUqv6yUMo/ai7mdhMnxJzB1aILMPemFLcS9gCs P6baFR+DanfMYgxOriH/cRbCY9HAJtozlMDe+SGbaaQdbPGtRoZJyunJOkUhnqzIoRBg OJw2vfJXIVXgY00svAARYxxaQcaMvnkpPhpFNstoXBUqiBeR8gBKF0t/CJwEagTP/8gl Mz7KI5oGXgeyDRg7shW34qxHc+DcMnJeKWyNjYcalRYbU1Gwe1SGKDF9JyI2j3kfPYnk eVsw== 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=0TV5qsA14dk+cYd8jhe+sXqAEhXPrpR+F1VJLlzHiEs=; b=FmDxFQS6MVr8GlvHiaz0xposFek/Y2sNr4qbsppX3qMj5vxr3xa/4q+koGf7fztxpt X+YlZvz5aP7eNrEkqd0vnuQOlr3jI2G1DW1EhooHLzE+lp7MbHKwWpC/WTG0BsXiQ3+i o0sx2oeUJdm2WhPYpYdHT8g2zDqgLcD2DM4Rb7cjZkQerkCCL8Vf2suduhLUzREjUf9D wo3N104GgTsmqYZz+zoJBBq+EzWT+P+A602ZBbN+YFtOmH0Tronbkatm/19F/t3ftXA0 wcGeemF8a7TbiFVkZwxgucLmIrAobopUUae6pAm7NOW49Tr+24tlb+EHvYyhrZjHa9Uq jLlQ== X-Gm-Message-State: ANoB5pk5UAeUcCugn+bAy4zSGDhUBnUEwfrQpbf0nb0kX4UfRrCeN9U6 JgmvsfsFripz6vnIcqOe66s8V/X3duHbJuNj X-Received: by 2002:a05:600c:783:b0:3d2:2105:1761 with SMTP id z3-20020a05600c078300b003d221051761mr13593524wmo.25.1671108629210; Thu, 15 Dec 2022 04:50:29 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id i12-20020a05600c354c00b003cfd64b6be1sm8388787wmq.27.2022.12.15.04.50.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Dec 2022 04:50:28 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 19/29] hw/intc: Convert TYPE_ARM_GIC_COMMON to 3-phase reset Date: Thu, 15 Dec 2022 12:49:59 +0000 Message-Id: <20221215125009.980128-20-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221215125009.980128-1-peter.maydell@linaro.org> References: <20221215125009.980128-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x335.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_GIC_COMMON device to 3-phase reset. This is a simple no-behaviour-change conversion. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-id: 20221109161444.3397405-4-peter.maydell@linaro.org --- hw/intc/arm_gic_common.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/intc/arm_gic_common.c b/hw/intc/arm_gic_common.c index 7b44d5625b6..a379cea3959 100644 --- a/hw/intc/arm_gic_common.c +++ b/hw/intc/arm_gic_common.c @@ -261,9 +261,9 @@ static inline void arm_gic_common_reset_irq_state(GICState *s, int first_cpu, } } -static void arm_gic_common_reset(DeviceState *dev) +static void arm_gic_common_reset_hold(Object *obj) { - GICState *s = ARM_GIC_COMMON(dev); + GICState *s = ARM_GIC_COMMON(obj); int i, j; int resetprio; @@ -364,9 +364,10 @@ static Property arm_gic_common_properties[] = { static void arm_gic_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_gic_common_reset; + rc->phases.hold = arm_gic_common_reset_hold; dc->realize = arm_gic_common_realize; device_class_set_props(dc, arm_gic_common_properties); dc->vmsd = &vmstate_gic;