From patchwork Tue Jan 9 18:09:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 761059 Delivered-To: patch@linaro.org Received: by 2002:a5d:6e02:0:b0:337:62d3:c6d5 with SMTP id h2csp1495426wrz; Tue, 9 Jan 2024 10:11:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IFRfS5xGVSgL9GOike8GpwkJIXWrA7f5oWzON6jNweERKYmnu7J4GJhQ8npQPgaRdWSrwy4 X-Received: by 2002:ac8:5fd1:0:b0:429:8e28:8f1c with SMTP id k17-20020ac85fd1000000b004298e288f1cmr5104483qta.47.1704823887290; Tue, 09 Jan 2024 10:11:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704823887; cv=none; d=google.com; s=arc-20160816; b=ti/H8+yAkRRe+U7YGRjbWZ2AKcqDUygpgfmfw/G04fjfmO0GKGfUY68q3vHLUFgnHQ ezO87oDqzIed/uwFF79BdxvwgjvYLLBZnH4mB56yFibcmE5PrieZCKvGhwxGS02J1+Ji LzsZcvpcEoPMecxQVff3lSAbp1HQlV3S9oh+8YYEFTl4wMb6nr4XApW0WO5ctEGgX9UL UhMDkk2h/tW2ql2wRGdxeii1iyiOnY+a/5p8Ms7uWqA7fBMNsWH/jIgc1qzJ/8ju2+rj K3IijmomcpYxs93d8dBJEnH3Cr3dpxd/CVSrKyFMKUXXcI/eeRalNdSPaBJkBY/U78IT SgBw== 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=fOLjDR/IKNF0Xh0mudwkf1U6/g8RGHkdFKaUB2oy+80=; fh=v69mdd+nxs/0WeTIWzLZOPCx0ynE2o0vtvId2fSwkBY=; b=bpr+DVfRIK+eEdw7KXCW8ZZpLBBGqrzDpsSZspiM1/p30VU70MPgA389D+CV8oGgL1 kRnvOFdrssWiX1dWdipHNS4Ps9fLYOPeu5lyXiN8hg/se4RXVukcgXImPlnsibR2qhS8 5KuHMm133bSDRRiWq87/oDMBB2JYjcvaS2x1oc9jNmPIXHoLbbUCe5Zl4Jd38r4R2x0h WiMPAWaVevTvpXfOg2mDocyWb6l38EfWdyjdjdGQWYjxlo2xjSjCL4LXN7LyvEXYkGuE pjM3NCKErzEfDWVvYPDu3xSDUyXZ/zmvgxLrC9zazYa7qxFvctw/0tPA7SlkDYBfnD+o jdrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BaTqlScV; 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 y15-20020a05622a120f00b00428b4061518si2668164qtx.541.2024.01.09.10.11.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 09 Jan 2024 10:11:27 -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=BaTqlScV; 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 1rNGZ2-00035g-Ir; Tue, 09 Jan 2024 13:11:00 -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 1rNGYN-0002bz-Gz for qemu-devel@nongnu.org; Tue, 09 Jan 2024 13:10:22 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rNGYJ-0004FV-Cz for qemu-devel@nongnu.org; Tue, 09 Jan 2024 13:10:18 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-40e4d515c9aso15933385e9.0 for ; Tue, 09 Jan 2024 10:10:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704823805; x=1705428605; 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=fOLjDR/IKNF0Xh0mudwkf1U6/g8RGHkdFKaUB2oy+80=; b=BaTqlScVm/d2Misn5oZ7mUmZkFRg8xLneK/0lxvy+xQQ2xozN9v5lKoaw7Tp2LdPaz 7ZetiS9W3StqIwPugogvtWhYZBvVNmGlDopicTDdiegOSVeVCB6CW67ym41HOYt/RsuQ H1uyra9dScprGFMJCKWb58OWtVj5HV19qxegyYbrep21+mvV0xhDSBXgemfe0/C3qtDJ +aP5tyyxk2JbYbdVaFNPpln8bLYso9De5YPhR4HBQyKpjpcF/bzqr0Xn1EUX2wNdSAdv fd0q6g0SsVRmGC+UKW6KKHQQc4AnoTaQvIrAk9pbz3AkPNyqAFzhMsARPrZ9yarDrOgF whtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704823805; x=1705428605; 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=fOLjDR/IKNF0Xh0mudwkf1U6/g8RGHkdFKaUB2oy+80=; b=Cy28JIEdkq0IeCmGV8sUZi71f5knc/mVMAhFd/wXEj+zfCfW2gTlKL2uU4AyAx/vor bkBvEyNfYNnCwCw0tXqXnoBrZWbEyntZPDVrv8UJ7ZEcu2PRV3pMcHtxDoFDox6DzoOg RJCpeQahYs4ygYsY8iBY7FdEWwVNssN7X7TR7gGci72CvE2OzrnKJXR6nhbw0ZUJblGN 59uBZjSry4pWur5rYq2pq7dkmzi1ZsiuFvW9jz/NHg//UVdYktxaSGEe0oZT/zUbKaIY QMHjDkHYoSU6Ce2gvU+lR7mQRuG2SLDchSwfowdWWEPM8euyOoSDHHTXUiKiVqMOVnXL sVvA== X-Gm-Message-State: AOJu0YzkZIWCyBKlFJXJgVTRtdqMZtEhdkS20UM6bmemQhWUpABk+Oh8 eKNF9H7l4QhIXwNq1Bqa+D5fGgU58d42agiJ4fZ9y4zw9dLhTQ== X-Received: by 2002:a05:600c:500d:b0:40e:4a7b:f53d with SMTP id n13-20020a05600c500d00b0040e4a7bf53dmr1293492wmr.168.1704823805372; Tue, 09 Jan 2024 10:10:05 -0800 (PST) Received: from m1x-phil.lan (rsa59-h02-176-184-32-47.dsl.sta.abo.bbox.fr. [176.184.32.47]) by smtp.gmail.com with ESMTPSA id n25-20020a05600c3b9900b0040e527602c8sm2101803wms.9.2024.01.09.10.10.03 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 09 Jan 2024 10:10:05 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= , Leif Lindholm , Radoslaw Biernacki , Kevin Wolf , Markus Armbruster , "Edgar E. Iglesias" , Igor Mitsyanko , Rob Herring , Alistair Francis , Peter Maydell , Marcin Juszkiewicz , =?utf-8?q?Philippe_Math?= =?utf-8?q?ieu-Daud=C3=A9?= Subject: [PATCH v2 05/14] hw/arm/armv7m: Always set 'init-nsvtor' property for Cortex-M CPUs Date: Tue, 9 Jan 2024 19:09:20 +0100 Message-ID: <20240109180930.90793-6-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240109180930.90793-1-philmd@linaro.org> References: <20240109180930.90793-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.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=unavailable 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 All CPUs implementing ARM_FEATURE_M have the 'init-nsvtor' property. Since setting the property can not fail, replace object_property_set_uint(..., "init-nsvtor", ..., &error_abort); by: qdev_prop_set_uint32(..., "init-nsvtor", ...). which is a one-to-one replacement. Suggested-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/armv7m.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/hw/arm/armv7m.c b/hw/arm/armv7m.c index b752049add..530729f42e 100644 --- a/hw/arm/armv7m.c +++ b/hw/arm/armv7m.c @@ -309,6 +309,8 @@ static void armv7m_realize(DeviceState *dev, Error **errp) object_property_set_link(OBJECT(s->cpu), "memory", OBJECT(&s->container), &error_abort); qdev_prop_set_bit(cpudev, "start-powered-off", s->start_powered_off); + qdev_prop_set_uint32(cpudev, "init-nsvtor", s->init_nsvtor); + if (object_property_find(OBJECT(s->cpu), "idau")) { object_property_set_link(OBJECT(s->cpu), "idau", s->idau, &error_abort); @@ -319,12 +321,6 @@ static void armv7m_realize(DeviceState *dev, Error **errp) return; } } - if (object_property_find(OBJECT(s->cpu), "init-nsvtor")) { - if (!object_property_set_uint(OBJECT(s->cpu), "init-nsvtor", - s->init_nsvtor, errp)) { - return; - } - } if (object_property_find(OBJECT(s->cpu), "vfp")) { if (!object_property_set_bool(OBJECT(s->cpu), "vfp", s->vfp, errp)) { return;