From patchwork Thu Nov 23 14:38:06 2023 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: 746478 Delivered-To: patch@linaro.org Received: by 2002:a5d:6706:0:b0:32d:baff:b0ca with SMTP id o6csp914154wru; Thu, 23 Nov 2023 06:40:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IHS1G4rdVcoB87a0Ou9zsYyQO2dvWTzTHmWe2cnsFjYWflrOVkHypYzVDNfIqBk/muxZg+I X-Received: by 2002:ac8:1418:0:b0:423:8345:369f with SMTP id k24-20020ac81418000000b004238345369fmr3539213qtj.7.1700750446361; Thu, 23 Nov 2023 06:40:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700750446; cv=none; d=google.com; s=arc-20160816; b=kFN8EhCuIOCAY6QoAw5PLcOoHA1HHtFQMlKlC7LUhDnBgbKZJ3VqCavKXa/4oAB5J4 i2A5XmpgoELNHfo9aNwNGUBpagtoBdby8DcmbBqSaHxZcT0ULyt482XuofXTVwY9xswj LJ27WUYPC9JQiD7BWQC0s7EuTkYdj02r0DhL85OBqO8P7YbaMg6xXpZpgNaQJG4FyvL5 W32o8bTsz3EesfV8eFUL0P2Xd6DSwPkfKFtM7kdZw7JbzMS4BZH3V4NDmz48U1O5B2PP PDCPZ0jnCA+g2sjv9oEmvouhI2HnR26bjvfY2Iy7oytus7+YPgJTrfFFFEnXKwuDqiqs gNsw== 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=77fFdvJTmm2pNTXteaORtoV0izbQYF6N9SGikVs/zTs=; fh=xd8Hqo+FyqINTpmMuSlnP3D7Rh8IYP9KQ4AY72o61pU=; b=jOwfR1CBfVDinGZalDatQFWWmPxHHBXRRcZ8FaTMA5+5DK/8/jKJ7XkvAHxIUP+fZm LOuHP4oOFhJdGCdpSb/tWJuuLwp2pgyZqEqF5DxhmHXHq9XBYA4Kgppr/mjZD5kSxdS5 VWAjN3vc/Ge3gDmKvItzjjMrgedY8oVBsSGg4A7pToieKMIxvKw3YV2MpaPTvc87h6WR DKCl3hWjV+79CZ1NViKERi4URtRs+cyhxyksDRh+QdhSGmWlL48sJnztb2wSA9aJ/SZ8 OdQYe2zRgBw8F5rsA7VHaxex9dImhy7230gxD6V+k1FZqCVvFGhu27H8bxTrQ3SmHmVF 2V4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hsUBkAF1; 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 20-20020ac84e94000000b004237231d97esi1250266qtp.309.2023.11.23.06.40.46 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 23 Nov 2023 06:40:46 -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=hsUBkAF1; 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 1r6Aqy-00020T-LY; Thu, 23 Nov 2023 09:38:52 -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 1r6Aqm-0001od-Fq for qemu-devel@nongnu.org; Thu, 23 Nov 2023 09:38:41 -0500 Received: from mail-lf1-x129.google.com ([2a00:1450:4864:20::129]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r6Aqi-0002RU-Sw for qemu-devel@nongnu.org; Thu, 23 Nov 2023 09:38:40 -0500 Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-50aaaf6e58fso1326275e87.2 for ; Thu, 23 Nov 2023 06:38:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700750314; x=1701355114; 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=77fFdvJTmm2pNTXteaORtoV0izbQYF6N9SGikVs/zTs=; b=hsUBkAF15u2tF6OaS0hC6R0TUs+duo0yNyVuE+uBDj02b3LY9nm2WDm7BjuNN7uxZ0 xGg8Ja7cPXljTX6Axmxqwmb1BIFHVnvTI7BugnD/5SIiO72UZvXpuAR6flM7Za8X8YE0 G0au7mLeFJKbiKhMgAQgOk/yZdaq8NJOrFIFXEi+5IunjSffwPY7Un7hyyNy6FPtdzMb xnxTGzmJXaFyHXjsbyF7DwF/uTwWFU4Dt+2bDaryx84TlJxWfCBXOR/KT7drc9ty8xPS VURozB1UzQ1RoS5lsvZE72UjaMlMldoQCDDvhrvzz27a9poDcFseJqsr4UPbCTmSLk7J 0ZVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700750314; x=1701355114; 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=77fFdvJTmm2pNTXteaORtoV0izbQYF6N9SGikVs/zTs=; b=hF2e4o47EISeqak5YqwfMWIZlaBz+8faPJQGnx5w7q04431VRfXuzqII2g+gmWW4xy RRitD6pIZvq9WS2EIkuvwNU4o3yYdtqzaZp/rpyUgM3+h5cvV4vgNiVkbzwyJV8B1Xek G9ZlwBqwx6raQkib86dZy3vACL2ZvwLX+LyRTSwUn7lyABH8IKP8QxXSsHkVgC22Zny4 QntAZUVASxo1wyL6YgqXMmVisH6DjCSYeL/DSQsRr3hhKekLSx2Ffq82XNfJDDYg+tHV MEX7Ist9sluDAKvb2lTJmQ358/WGmtR4FPp3mC1N1zpM0pBdV/oKR5309gHNEZeUzuK/ KhEA== X-Gm-Message-State: AOJu0YwIe85zu8Kco23HGKbuaqZv2xRwVupr8u+uk5gW41ZDlhmw1KtR 7h5w56htDj0C0S3Ym1/JZCgkOw== X-Received: by 2002:a05:6512:4894:b0:50a:a9ec:1897 with SMTP id eq20-20020a056512489400b0050aa9ec1897mr2523896lfb.35.1700750314699; Thu, 23 Nov 2023 06:38:34 -0800 (PST) Received: from m1x-phil.lan ([176.176.165.237]) by smtp.gmail.com with ESMTPSA id k24-20020a5d5258000000b00332c0aace23sm1817937wrc.105.2023.11.23.06.38.30 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 23 Nov 2023 06:38:34 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Markus Armbruster , qemu-devel@nongnu.org, qemu-arm@nongnu.org Cc: Alistair Francis , Joel Stanley , Artyom Tarasenko , Mark Cave-Ayland , Ani Sinha , Eduardo Habkost , David Gibson , "Michael S. Tsirkin" , Peter Maydell , Andrew Jeffery , Daniel Henrique Barboza , Yoshinori Sato , "Edgar E. Iglesias" , Niek Linnenbank , Andrey Smirnov , Tyrone Ting , Jean-Christophe Dubois , Strahinja Jankovic , Harsh Prateek Bora , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Aurelien Jarno , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Igor Mammedov , qemu-ppc@nongnu.org, Hao Wu , Marcel Apfelbaum , Beniamino Galvani , Richard Henderson , Nicholas Piggin Subject: [PATCH-for-9.0 v2 2/8] hw/arm/bcm2836: Simplify use of 'reset-cbar' property Date: Thu, 23 Nov 2023 15:38:06 +0100 Message-ID: <20231123143813.42632-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231123143813.42632-1-philmd@linaro.org> References: <20231123143813.42632-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::129; envelope-from=philmd@linaro.org; helo=mail-lf1-x129.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: 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: Peter Maydell --- 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),