From patchwork Wed Jan 10 19:53:18 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: 761455 Delivered-To: patch@linaro.org Received: by 2002:a5d:6e02:0:b0:337:62d3:c6d5 with SMTP id h2csp2053324wrz; Wed, 10 Jan 2024 11:55:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IExGKMqwf/TlkD0MmLyRKsAz6WvNVa7ye0zrE3YAi68RGnB46eE8Iy0UzhMTcIDyST51WRg X-Received: by 2002:a05:622a:20d:b0:429:bcb8:eb89 with SMTP id b13-20020a05622a020d00b00429bcb8eb89mr75454qtx.103.1704916552382; Wed, 10 Jan 2024 11:55:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704916552; cv=none; d=google.com; s=arc-20160816; b=ThXYPZJl6SU5bNCfwXWcmAEEu8Gz+UpiOhpvZdXFRERtrw+GwdKEmRAz2NKTuqTk+4 JClfOt0KXgqP4OXXs1g6zMHZOUWhPuYtUZ0ZPvFEIyFmqQv37mQTEyfwTPprmjswFdQF zEGhJY3PnwzM5/uik3QDBjcq0A5eTF7am6bat3KT/QU7LB5NveFsFaj9BjcC68RPid/c UYRSEkpUtVvypFiDVS5Jy9qin42vrMbTkej8C1qSTSjPQgOwXk6fJkjur/+f13T7Izj5 r02cE0vmuTGdIOKh3tBYYuZCmkFwrr4fC8f2pY9IdZRmtMamAuftZQHGf3n/Ym1SOma5 fcLg== 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=0Bn9ysFO5uhdOoEvdDNDnkwY7yFMuDt2XLw3k0zcWt8=; b=TlmONqKlmfkV6VggH2HD3kTlO+RmbN9F2Uw0icNtdVdgq4OrqtgZQTMzNOW65a7t3O H+vvoNgmOH0sA3nyohS7WbirjQ6bGHjhqIdLdQG+NwuDt8vfX0dMu0JCAxoDwjUiQi+s knOPtQwiA64NXBGvyX5yEyUfRThavww4LiTeHQcIAuOiqa8FCOwbsn3smY9SLZoox8fD 0I/0MFXkRNlY+3b9wz1S1xWkvT4j8ljc4ZWZNdYRUERq6vLoh1IujKzSlZN025m9+OSg eTQT/WVlk20tmc6UZXyLtXeeV1494sl2GMd1Z8mBgt/g5iKMk9VAoff4SSg2GsMHJEtJ x+SA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CcLGUL5M; 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 r12-20020a05622a034c00b00429978cfecfsi4745494qtw.606.2024.01.10.11.55.52 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Jan 2024 11:55:52 -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=CcLGUL5M; 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 1rNeeR-0007H5-GL; Wed, 10 Jan 2024 14:54:11 -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 1rNeeM-0007CT-LZ for qemu-devel@nongnu.org; Wed, 10 Jan 2024 14:54:07 -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 1rNeeL-00025F-3W for qemu-devel@nongnu.org; Wed, 10 Jan 2024 14:54:06 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-40e5508ecb9so17784425e9.3 for ; Wed, 10 Jan 2024 11:54:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704916441; x=1705521241; 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=CcLGUL5MS3BHCu1Djy1NDU0zJPL7d8j5QgqdMrg4lfD9c5hIce11HkAjNYvJI8rzI0 jwO8UeIIha7ykzWm9pq4msetSebuzyx5+ury4mSmDi0/eM89TqTFjK1iqHK0ECYV0Tks kiXzrJFIdKrtCkSCPo+95X8r+3ULNowlJYjD/HF1PUMIir1x1r+qPYKoaRt5hDlnJZbp gExq6NhudWjRjC3+Lik3P33/HuO8XsHsD0BfuLMd89l8FRu+iWc46wpq3z0yPfaYFmoi BKYlz28xPatxq5xMgobstLa8braqDjwXkVLVINHal0c5GfMESgy9nAWetfOQdDt/JrTq n+2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704916441; x=1705521241; 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=lN2jq1qqzMJG89MJ1xQgVfFp49IUPAs4CicYonH98cIOsPWW1hiksJkz4EzBH+QcPD Ve2XmViSDpImZ5D33Muye+r4ZD3pb6k9gwethY3Zf9uitj5Ckz1OcTTwYuJ0Ux9FKDbj XfnOll4VCDYLW6v3npkuw8dACvBuhWEDOvKCubKMGX3rr0ritrPl0D+qPsHc2acYwisY GqqZ4Gqu4vtynIBGN72uWrwiNTfa7t6sYTzvvMyIG0JH4/uaoMlRE3szZPVl13r6TyRN /2R5gKz/dgY/bIW1vZm8sMK5Je6Jffg+VFkNklkCFtSnQwdw13g4zJkWoh6CKRzO2DFO o+PA== X-Gm-Message-State: AOJu0Yw+wOXKSrScii4C2vA74147KwwheV1axkU5SbM7yf52mKrq7lzb lWGuLSyCgIKNJaBmqGnzu6ql9+P5goaIne5VAo6Ap8Cp9vY= X-Received: by 2002:a05:600c:a019:b0:40e:3fa2:213 with SMTP id jg25-20020a05600ca01900b0040e3fa20213mr939693wmb.147.1704916441650; Wed, 10 Jan 2024 11:54:01 -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 n16-20020a05600c4f9000b0040e53f24ceasm3216630wmq.16.2024.01.10.11.53.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 10 Jan 2024 11:54:01 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Marcin Juszkiewicz , qemu-arm@nongnu.org, Kevin Wolf , Igor Mitsyanko , =?utf-8?q?Alex_Benn=C3=A9e?= , Radoslaw Biernacki , "Edgar E. Iglesias" , Leif Lindholm , Rob Herring , Markus Armbruster , Alistair Francis , Peter Maydell , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PATCH v3 04/14] hw/arm/armv7m: Always set 'init-nsvtor' property for Cortex-M CPUs Date: Wed, 10 Jan 2024 20:53:18 +0100 Message-ID: <20240110195329.3995-5-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 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é Reviewed-by: Peter Maydell --- 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;