Message ID | 20240110195329.3995-8-philmd@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a5d:6e02:0:b0:337:62d3:c6d5 with SMTP id h2csp2053165wrz; Wed, 10 Jan 2024 11:55:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IHJgceQuADwtjRx4PSwsdpXndnHswBEqx1KeQ8edGtnT15DjW0UFCJyFeczvWrhn1ocV3d1 X-Received: by 2002:ac8:5a49:0:b0:429:a2bc:f921 with SMTP id o9-20020ac85a49000000b00429a2bcf921mr49325qta.117.1704916519059; Wed, 10 Jan 2024 11:55:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704916519; cv=none; d=google.com; s=arc-20160816; b=W9+97cEk7nEeKplMuDeIgEmVUyfqhAD2rcRx1pPNE1EODnfYlfYv/MexPpVBOfn5TN 2oBLPj757imcOjpm3iXMeJDtOZVv2IC5T0XyaUOnkn9RurivpowuBm/PDJYH6w+66VuZ YbnziScNaSyh2hvL9+Or93h9HftssLMck2ua0fiJLCeaPM6O7HeUrR8UgEZtvcHDzzN4 bxTyZuPJ0Q4kq6z/9ta+0L0/HOOfTCOwPgtm8zHCazH3uQAYV+uGQlJx59+BA5cXMYPv aUmUSDf3g0MzQ5UKMdmHa2KLd/TZ9wJkCfN+fBioDBxNlAgRi1A3bXgjmauCkwQfqhJo oWOw== 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:cc:to :from:dkim-signature; bh=4lFs+peHffZXBVVkShWxuZ7VjcO+rV+nUwkZ0/LL7Zg=; fh=0Bn9ysFO5uhdOoEvdDNDnkwY7yFMuDt2XLw3k0zcWt8=; b=hIDeYjAglTTvj74Plun1f016pDqHn94J8lyy4EasBmNf9ZGmdiOHvkqySP2qHMush1 pbe9sVhR5QdcO14l/i1Zhq1qL2ubf1qjUHBl8Y2/PbV+8mvlqE96m1HSuPAKeGvH8hyw Uc/ekGHgd7soBKBHmgYOK1JcKn4Rz51gcjLi55fY8MPOt1+tfxDlzr6hlHpRNl8qtqV2 6ctJhL+aHsLHNn3o7Yhi3Y0JxIek1t3rMPbNltfSax43I92EJhBSHyDotUmDqiXX3pWk Bjao2+cw+AMlWdJNh2Kp61A/X3/mtW1x0yzcrAELQ1WYGyhGKNsm5Nr4IvFdFtIw7YPH RHZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CI8+bOHD; 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: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id c8-20020ac85a88000000b00429be9d9f94si295128qtc.411.2024.01.10.11.55.18 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Jan 2024 11:55:19 -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=CI8+bOHD; 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 <qemu-devel-bounces@nongnu.org>) id 1rNeej-0007Oz-8J; Wed, 10 Jan 2024 14:54:29 -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 <philmd@linaro.org>) id 1rNeeh-0007Np-V8 for qemu-devel@nongnu.org; Wed, 10 Jan 2024 14:54:28 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1rNeef-0002Gc-Eb for qemu-devel@nongnu.org; Wed, 10 Jan 2024 14:54:26 -0500 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-40e461c1f5bso40919675e9.3 for <qemu-devel@nongnu.org>; Wed, 10 Jan 2024 11:54:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704916462; x=1705521262; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4lFs+peHffZXBVVkShWxuZ7VjcO+rV+nUwkZ0/LL7Zg=; b=CI8+bOHDzSnLg56bZ7TGIOZlof9YHtm1bft1rKMqJh5WVPeuJyDswxW3L15kK/1iAp aRYpp7aj8hsxX8TsNdOX6sONADrxLdIP9B7TIl8EkxL6KAUXm0diYRG1yU/E/LcgxcR1 TYFVhAW+lqpHgvgdcKoYdkn21aEAEgegVd4H2HR2sW1WywQlzauIOcnS6i3LU7AwRmYq ZCazDsBu2Kz6M0UPIZ5vmUZ16ItAnUzlx7HIkODVFTqbksMsp52/fmdy8yjwe7IKgRml HFkKx/EMRs7ptklHijRiypP6mB+FuvdbhS7PjJMHb3GeiWh9WmYifdYG9va1RzN4sqdj CErw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704916462; x=1705521262; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4lFs+peHffZXBVVkShWxuZ7VjcO+rV+nUwkZ0/LL7Zg=; b=julp2aa8wLiLeit4w1D6vW7xDB3IGT5r+NZimX2vTT4BNwm96E6XXmCFwut051oNSh lshGmACWZ5TNBVMxKLrTIDhYL/AySDl3/2JDlv/wspaJdQ56rpa2Krq/N21CVC3KnSl/ 5XT5/Ef8RhI+05ZUZCYhFNup96IaleJtaE6SyMcNefJgr2A2T5jgXghp35OLwIvrsqWi u55+myXbzByWpCZ4KqjeVt1DRR95iIUvJIsHbvVZ4GYltbDXnxBa7FASYy+N1bHaPXtr Zvzy0qLYAJxNTvNLWP7q9oh6DTB5rNdMQX8tekpcB5CWywCu+9QCXh7LPN4SLwqg86x+ Na3Q== X-Gm-Message-State: AOJu0Yww1ZstiqnLBn7zr6J/aw5kvq8Kf1QAfTuuXhR5pjtx+mb50Cxq cw/fCS8h+JjzkWo4HLnrmcIOz9fKLifPVGbpdOkzbmzLzDA= X-Received: by 2002:a05:600c:225a:b0:40e:480a:cfa3 with SMTP id a26-20020a05600c225a00b0040e480acfa3mr827220wmm.61.1704916462415; Wed, 10 Jan 2024 11:54:22 -0800 (PST) Received: from m1x-phil.lan (vau06-h02-176-184-43-236.dsl.sta.abo.bbox.fr. [176.184.43.236]) by smtp.gmail.com with ESMTPSA id bg3-20020a05600c3c8300b0040d91fa270fsm3245344wmb.36.2024.01.10.11.54.20 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 10 Jan 2024 11:54:22 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org> To: qemu-devel@nongnu.org Cc: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>, qemu-arm@nongnu.org, Kevin Wolf <kwolf@redhat.com>, Igor Mitsyanko <i.mitsyanko@gmail.com>, =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org>, Radoslaw Biernacki <rad@semihalf.com>, "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Leif Lindholm <quic_llindhol@quicinc.com>, Rob Herring <robh@kernel.org>, Markus Armbruster <armbru@redhat.com>, Alistair Francis <alistair@alistair23.me>, Peter Maydell <peter.maydell@linaro.org>, =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= <philmd@linaro.org> Subject: [PATCH v3 07/14] hw/arm: Prefer arm_feature(V7) over object_property_find(pmsav7-dregion) Date: Wed, 10 Jan 2024 20:53:21 +0100 Message-ID: <20240110195329.3995-8-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240110195329.3995-1-philmd@linaro.org> References: <20240110195329.3995-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=philmd@linaro.org; helo=mail-wm1-x331.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, T_SCC_BODY_TEXT_LINE=-0.01 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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
hw/arm: Prefer arm_feature() over object_property_find()
|
expand
|
diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c index 0a7ad2b762..7f15318ae3 100644 --- a/hw/arm/armv7m.c +++ b/hw/arm/armv7m.c @@ -338,8 +338,8 @@ static void armv7m_realize(DeviceState *dev, Error **errp) "mpu-ns-regions and mpu-s-regions properties must have the same value"); return; } - if (s->mpu_ns_regions != UINT_MAX && - object_property_find(OBJECT(s->cpu), "pmsav7-dregion")) { + if (s->mpu_ns_regions != UINT_MAX && arm_feature(&s->cpu->env, + ARM_FEATURE_V7)) { if (!object_property_set_uint(OBJECT(s->cpu), "pmsav7-dregion", s->mpu_ns_regions, errp)) { return;
The "pmsav7-dregion" property is added to ARMCPU when the ARM_FEATURE_V7 feature is available. Rather than checking whether the QOM property is present, directly check the feature. Suggested-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- hw/arm/armv7m.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)