From patchwork Wed Nov 22 18:30:44 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: 746034 Delivered-To: patch@linaro.org Received: by 2002:a5d:6706:0:b0:32d:baff:b0ca with SMTP id o6csp475548wru; Wed, 22 Nov 2023 10:33:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IHlgJ9VZGQ+IQu5uwlpsxKsQETPs3lvDNoox8Er+MNVfxMGjXuPktKRwL8o1Ij/KO8wsHHB X-Received: by 2002:a05:620a:8387:b0:77b:9a8c:b0ae with SMTP id pb7-20020a05620a838700b0077b9a8cb0aemr3467236qkn.40.1700677993154; Wed, 22 Nov 2023 10:33:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700677993; cv=none; d=google.com; s=arc-20160816; b=znJBdH6mz4t6xYSofgFsbm0RiMJHMrjSsGsxj0gI5cmOKmJMrQCRlXMeal1rVewuYK zPe8jFFAstJ+b3IOIwPZcC8XroMJWinIcX9VvVg8Cb649ODVmNVHzVAFblcBYeBgocYF II/35CCPxSac/2lY9KqDDXRy8lb3kiHfwSU+PQ14auUyi4r1vxlH/ocjES66TxeE/Phv CEoxESkK5pqIQ1MrH35JVAsQlo9dVNKTGmnRLLddrKOW8oKMPJCZELfH8QF6BAsfBeGo AZh6+PUHdrMK6lixLrxGCTh7OjiqjtCHM3cmlt7yvugWfvRjRTs84rUiRdd4ou1Rt3f9 No6A== 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=auZXV6u0sdeAtdGoHPpNxl3A34os5kR+ZbHub0QBvt4=; fh=aTzmneatFEDiKMS1saCdxZb39+p//OutFupiUjvLGTw=; b=ajHqDRT3ZComzau2lT3JfD/UqOWL/L0PP4RL3eC11OeSb4tg9Fn/udZLLBaCMmx9jS 9ilnxs4ABeJcMihyK/COIR89p4gxW32Hy3nu/T2Jq8wiJ6b+j5N5R2mRjPr51yHtbtAJ 5EmB1oTYFi5FztBn30CO3fqkncSLOkihJofpdc6QwlaburUWhWD/7kuWb4BtPy7RhiRm 6tQCJlyf8ZK2p3dgaGNUUfStMsF4XaylJhVOWchSPqKdd1KCQoCU4pgQiWHAOuaMaF71 n/IixkkUrdioMdPhR/QIQjdXxZ40E00cwzw2i9SaLoftqM9AwERVeLZH25DcVesDqNyu kbKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PQQL0H6R; 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 qs22-20020a05620a395600b00773d54d6a11si156905qkn.387.2023.11.22.10.33.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 22 Nov 2023 10:33:13 -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=PQQL0H6R; 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 1r5s1U-0004tG-AU; Wed, 22 Nov 2023 13:32: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 ) id 1r5s0g-0004Fb-Ix for qemu-devel@nongnu.org; Wed, 22 Nov 2023 13:31:39 -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 1r5s0e-0004dv-In for qemu-devel@nongnu.org; Wed, 22 Nov 2023 13:31:38 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-40a4848c6e1so321825e9.1 for ; Wed, 22 Nov 2023 10:31:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1700677893; x=1701282693; 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=auZXV6u0sdeAtdGoHPpNxl3A34os5kR+ZbHub0QBvt4=; b=PQQL0H6Rj0Loq3Q6FLGYVKxcQ6jr01fqCK7MSCFM9EZ3uRHoFPkOyfzxgqfI0vWMS8 4SjisWgAYjZjilYGAuFbBhC41De53GR5szhtBG0jPzJGBjkxVRv6TCHHLN5p2uEjYwi+ qCWXeUp6yHYeDMFvGZmTDUOtePoiGtu0rQHF0VMfdmZz652Q38tqGI5gOg02j0lEowOC IcUgQBFVwBZUmjkalAj8fM8glmQmDEE1/RQItSrrQZLoo7IjUY6qdTBwuZapQQGF/wEE 5bBscvVXvgCiyXYYMR5hB6/AvXGtUDF0Jl6Wdn3sf2nGxneUvodt4LDHO2QfVkgh01Hd S5mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700677893; x=1701282693; 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=auZXV6u0sdeAtdGoHPpNxl3A34os5kR+ZbHub0QBvt4=; b=SmR/5dQjSkAKsUDua/uvtP6MQlzSrz3GKapwg6DQQ+HOvdtmJiwAO5gI+quHfbdFhy xbUE9UYDOpz2Uw9ZO7ZuG3fS6Fqeahopg4hYCUvLkYaqWG0fPJkqg8WMR+GD9Ex3eKoV QdNP6vaviHkMk3UiV2IJ/9BGIdE+B02kmj2iyqM95JjLxgR5T4kuMjkER74qBh1Iw3fz RrJnwPwmb4ZnSZd5tVv7bVoG9eI60GbCE8khDo/1HNJsHhHzrfKWbIG2xpnzmOI/Uit1 0xVXqhJGAOivUvx8Subk31z7vP65O7GL0HQTSZV+FV8qOFMK65t3oCWDIBB91w58ho0I GMAg== X-Gm-Message-State: AOJu0YyaWzE+gx90IOGseL1/7alAn5tEhVnw7Tq31OBPH3MblZuOycGo uXI13fKxbdNv1zJqf3XyCOIMGYFSLS26HH/niN4= X-Received: by 2002:a05:600c:3590:b0:405:1c14:9227 with SMTP id p16-20020a05600c359000b004051c149227mr2662206wmq.33.1700677893528; Wed, 22 Nov 2023 10:31:33 -0800 (PST) Received: from m1x-phil.lan (pas38-h02-176-184-5-64.dsl.sta.abo.bbox.fr. [176.184.5.64]) by smtp.gmail.com with ESMTPSA id u14-20020a05600c138e00b004063ea92492sm187101wmf.22.2023.11.22.10.31.32 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 22 Nov 2023 10:31:33 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Paolo Bonzini , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Richard Henderson , Eduardo Habkost , Peter Maydell , Thomas Huth , Mark Cave-Ayland , =?utf-8?q?Daniel_P=2E_Ber?= =?utf-8?q?rang=C3=A9?= , qemu-arm@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH-for-9.0 08/11] hw/arm/bcm2836: Use ARM_CPU 'mp-affinity' property Date: Wed, 22 Nov 2023 19:30:44 +0100 Message-ID: <20231122183048.17150-9-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231122183048.17150-1-philmd@linaro.org> References: <20231122183048.17150-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=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 The 'mp-affinity' property is present since commit 15a21fe028 ("target-arm: Add mp-affinity property for ARM CPU class"). Use it and remove a /* TODO */ comment. Since all ARM CPUs have this property, use &error_abort, because this call can not fail. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- hw/arm/bcm2836.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c index 198f9b5730..8031a74600 100644 --- a/hw/arm/bcm2836.c +++ b/hw/arm/bcm2836.c @@ -128,8 +128,8 @@ static void bcm2836_realize(DeviceState *dev, Error **errp) qdev_get_gpio_in_named(DEVICE(&s->control), "gpu-fiq", 0)); for (n = 0; n < BCM283X_NCPUS; n++) { - /* TODO: this should be converted to a property of ARM_CPU */ - s->cpu[n].core.mp_affinity = (bc->clusterid << 8) | n; + object_property_set_int(OBJECT(&s->cpu[n].core), "mp-affinity", + (bc->clusterid << 8) | n, &error_abort); /* set periphbase/CBAR value for CPU-local registers */ object_property_set_int(OBJECT(&s->cpu[n].core), "reset-cbar",