From patchwork Fri Jan 5 15:42:31 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: 760188 Delivered-To: patch@linaro.org Received: by 2002:a5d:678d:0:b0:336:6142:bf13 with SMTP id v13csp107048wru; Fri, 5 Jan 2024 07:52:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IGICCWBl5TH5aOEmFloIPvHIYNGQJU9tqfZI6nCiBRaHD38yE7cS4lUtQcT8uY6spqFC8uC X-Received: by 2002:a05:6902:dca:b0:dbd:afa2:e9c8 with SMTP id de10-20020a0569020dca00b00dbdafa2e9c8mr2284736ybb.48.1704469940160; Fri, 05 Jan 2024 07:52:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704469940; cv=none; d=google.com; s=arc-20160816; b=Y/yIwbdF+rFqJR/axUKasWKObASmljA2JEjO96ayqeeKwmfC3y5l0dHhIKOre23IQU UWTvIEawLUifAplGH7hksbMhrTcPbLeBLstiSj8AMTOsCfQmj/06b/dbzqg7zQstkKa9 MktNTrfmOXEBOTIqEJ5nRPuLoF9iqYEROMaXOvS+GoEdJto/r7pYqo+BR/udO8HFuHIb 3CAjTQiif+o278oWYDcbMM7DON9/QlyV2OWC7wD4iTdlbGDX/Ttvfs4Hi/BY92VB8wRc po+IaTypN2ExmWHGPkwjBBPE62ibhzshUvVteDRdRK11u1lQbgKCcJBiYIdfwKn3Baoh T2ag== 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=iQqVZQAplGXwt087ddAaGknca/07pmUL/gFu1d2+27U=; fh=cQ2FfVt2/IZC0ZMISg8I4sbY1PJjpClPDf1skqRY4EQ=; b=munxwtsmJx/i4TUBDy70GN1w5SBoq2l3NsijfkVRwbh1vVuacPtxazqNaN3e72Pw7v v/7EOshredjKxSoGMr9q08CQGJjqQsHNJOLwQT1VI44MYBkpkxzwTyL84wYa09zs6o5X o9IYLxLpn8C5kvxkzPyH+tCt9sLrWffbh+/b6WjdhM/YP8QD78to4JJKxAJh8+SD/3B6 nhbY5c29YdUEZe5l8GAa5Y0MdDUjGuvaapnxwD2dypORMlwiLTWQBIQwX437zOwEasDi YsgLMxJVQeewUWY+OcHNCZ/bPlu7kRbI8IMSQUD0/ulaojpCmynl1vVfiX67OJD36JND iz7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rBQ6eBIX; 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 d5-20020a0ce445000000b0067f29a19dd9si2051705qvm.120.2024.01.05.07.52.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jan 2024 07:52:20 -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=rBQ6eBIX; 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 1rLmR8-0002yi-9b; Fri, 05 Jan 2024 10:48:42 -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 1rLmPs-0005aC-EP for qemu-devel@nongnu.org; Fri, 05 Jan 2024 10:47:26 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rLmPp-00047Y-M3 for qemu-devel@nongnu.org; Fri, 05 Jan 2024 10:47:23 -0500 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-336c9acec03so1301787f8f.2 for ; Fri, 05 Jan 2024 07:47:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704469640; x=1705074440; 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=iQqVZQAplGXwt087ddAaGknca/07pmUL/gFu1d2+27U=; b=rBQ6eBIXuAdfLu0GR0eKsWS8Azq3u6wuQt/JBZFPQA+UTw1BKa/4aqxs2MlLyDkxHa Dmybi4K6P90/kCOiGPp2usL4/dwMPfcqH+zZrUDqv3EyikR2zLsQtZHQE3qbcDGAOmEa wPZKoWXBjmPDfeF6OMULLPtdOE8ukQJD5SuD+86lD1MMo17Fgj7aIHczzKJvC9Jr14WL jnYu6MaFy2xKM7Ur1xTqjl1flVigApzvxBjIEOCWe1GaOlid4kY9wYAi6XpqqOhpODW0 qyE9bL84xhawbACVPZSv2pzucEcTBZyYN8JEHUn1LA/5cPTOtZmhjD/1VlzqX1o2xpgN wgWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704469640; x=1705074440; 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=iQqVZQAplGXwt087ddAaGknca/07pmUL/gFu1d2+27U=; b=cv0M0dn3MvBN4A3+Hwny/QXkneNYOcbGf/Aqrm4EJnrGXEZlzriF3XHHharf0O5J17 gX4gFoo5Q3xvvVogg9XC8+55P6AJpjwZsIclJ3Tfxy6v4XyCr6BKXPTq2R45ejk+Wt98 E8oTAEiz3rtvFt1auGhexlZ9804Hm1bMwavlcHhPCFLw2sAXQZr3hH8AZ/3YxqmVsP6h Klr0pwAP82JX1y11bDou+rg2rKQZ814UyIDd0BF3+vO4OCf5LMGrLoKJppZ4a5KPzoMf 2/xlW3xKUqnafnQZBAmsVq0bc6qYfTh/44HYRsJw9fk8isKyZeGsm+QnwcZvNGZCiViX ABmw== X-Gm-Message-State: AOJu0YxcAj8RpkPVR029E5ler4izx+50aD4eIsjO8Fym5W9pqUPc4gjS eb90Y+yno/YViFzi9rvf74HGVjuYEQ9ioL5YylNcG3Zrezk= X-Received: by 2002:adf:ed8c:0:b0:337:d82:5106 with SMTP id c12-20020adfed8c000000b003370d825106mr1218971wro.99.1704469639779; Fri, 05 Jan 2024 07:47:19 -0800 (PST) Received: from m1x-phil.lan (juv34-h02-176-184-26-1.dsl.sta.abo.bbox.fr. [176.184.26.1]) by smtp.gmail.com with ESMTPSA id k7-20020a5d6d47000000b0033725783839sm1605061wri.110.2024.01.05.07.47.18 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 05 Jan 2024 07:47:19 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-riscv@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Peter Maydell Subject: [PULL 38/71] hw/arm/bcm2836: Simplify use of 'reset-cbar' property Date: Fri, 5 Jan 2024 16:42:31 +0100 Message-ID: <20240105154307.21385-39-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240105154307.21385-1-philmd@linaro.org> References: <20240105154307.21385-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=philmd@linaro.org; helo=mail-wr1-x431.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 bcm2836_realize() is called by - bcm2836_class_init() which sets: bc->cpu_type = ARM_CPU_TYPE_NAME("cortex-a7") - bcm2837_class_init() which sets: bc->cpu_type = ARM_CPU_TYPE_NAME("cortex-a53") Both Cortex-A7 / A53 have the ARM_FEATURE_CBAR set. If it isn't, then this is a programming error: use &error_abort. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Peter Maydell Message-Id: <20231123143813.42632-3-philmd@linaro.org> --- hw/arm/bcm2836.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c index 166dc896c0..a1bd1406e1 100644 --- a/hw/arm/bcm2836.c +++ b/hw/arm/bcm2836.c @@ -131,10 +131,8 @@ static void bcm2836_realize(DeviceState *dev, Error **errp) s->cpu[n].core.mp_affinity = (bc->clusterid << 8) | n; /* set periphbase/CBAR value for CPU-local registers */ - if (!object_property_set_int(OBJECT(&s->cpu[n].core), "reset-cbar", - bc->peri_base, errp)) { - return; - } + object_property_set_int(OBJECT(&s->cpu[n].core), "reset-cbar", + bc->peri_base, &error_abort); /* start powered off if not enabled */ if (!object_property_set_bool(OBJECT(&s->cpu[n].core),