From patchwork Tue Jan 3 18:16:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 638756 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp1394274pvb; Tue, 3 Jan 2023 10:27:49 -0800 (PST) X-Google-Smtp-Source: AMrXdXtp+ubYpkZD5PQm5QRphS02UmmOsQOoA3H2zcxvnERtDs9bqJ8nH4lr2dt1du/EckGbT51U X-Received: by 2002:a0c:eecc:0:b0:531:c5ae:b9a1 with SMTP id h12-20020a0ceecc000000b00531c5aeb9a1mr12607370qvs.25.1672770469343; Tue, 03 Jan 2023 10:27:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672770469; cv=none; d=google.com; s=arc-20160816; b=dUaQdYoS0rs/HWYM/4IpT0lsyedau1swmJ4ikk+GRUYPyJTc0pJJKfxK2T630UiqVn fCChDftzibtNueR5ysLw54KSRJy/Q7sVujs6P54viIf2hRdcEqrHxRMkf48Zg7C69kIA UDK173HXN5jpbw20Ngh6hHb22mzKPj7yxN60HCC7rB9L6rE6jDGigpk/slvNtKZbOi2z 9287Y97D+8zJ/MvGJOlDAmxVPZLzrqUC/dX3pWwLBVIoO8Js2fy1C+wcpG4bjR7PMdDv Q7b9Yhw17kjHx24Z4izslqU1D225dSr9+IWrQmTZRPXf620ZQ+pYRBhLrC4UGwriOQTa CWbg== 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=rb9AmI85idWoLsBzV+dL4jn39dqWdimKW4r1L8TYKqA=; b=HkH3vt0kFTiJBds/OZKWRCNqtDu2w1l6ec+3E8dB1YZQeJVTZGUBdH9nMXIAZBOrEP jENvZsAgc8SMEa6bh4gAbmPQthlXbSBKpgDjnHUSNC6l39XnphMieY556bEzcTxeUOSa oGqppzLk3EEf9JeuGXUpYaxDLjgv+NsOyTV2iX9VShjwM6N6ObnoCOBYXi/8gO/Qt3VK OSZctinP8kX2dTFX1b54cM73I0WmXob4aQY/l9599H0l/Fs2tUG2xNiEP4Pb7reGAz95 CJga18fG6WHCCvjEp5tz8wLpxG2YRz9yK+opxv6gMHixKlbWUQgWW0oOo+Yh/ft6+eEt PH8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pfzsU4hU; 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 s8-20020a0562140ca800b0053192698a17si12322183qvs.547.2023.01.03.10.27.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Jan 2023 10:27:49 -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=pfzsU4hU; 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 1pClra-00007M-Ij; Tue, 03 Jan 2023 13:18:14 -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 1pClqt-0008Iq-KF for qemu-devel@nongnu.org; Tue, 03 Jan 2023 13:17:39 -0500 Received: from mail-vs1-xe2f.google.com ([2607:f8b0:4864:20::e2f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pClqr-0005C0-K1 for qemu-devel@nongnu.org; Tue, 03 Jan 2023 13:17:30 -0500 Received: by mail-vs1-xe2f.google.com with SMTP id 3so32566037vsq.7 for ; Tue, 03 Jan 2023 10:17:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=rb9AmI85idWoLsBzV+dL4jn39dqWdimKW4r1L8TYKqA=; b=pfzsU4hUS7eJ60VWnkOCuLpaIRDZXdbEFaIqCvOsgmTbMyCr0GswzE1AQchfGtB/j5 YkjFai8/QXqMczksbZHDRj5d0UZNYsZY7gOKEs1KsGoKv25aTatLLWWM4WHHr3bo8J/2 WukTFFKYgIfI+zw+vtK4JIuxmvcjy5huRJgqZZfrxTHshROpczXxIYmex3i3xUqnuKQ7 oMS42Fedlmmj491FUYzjztVxNCeZxu+3fppd9+gZxp0Rl2QkXJpiD1oVYPH9s38jWuwG EeYL7jGP6eU+QoQIf+Ot23U3qKFKVluk7PzxGHjF0dMXXHIrO6yiHBEUCrPxMXcRMynU zR4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=rb9AmI85idWoLsBzV+dL4jn39dqWdimKW4r1L8TYKqA=; b=ad3fsIJEQJO1ANSUQ5g+YUohlLoDWa/H/26TQDXFdYS9I7brxBvwB0QxNJ9vUv9eJn TUJuBumOYdAv5r8Dblr2IFMtz9Lb3ioh1k7wAQjZ7NUtI5DdjB/v40lBOf6vDSq+7Ry4 ZALgiRAuVA3CkpQg0Qze+BNWY93orTir35FKE+LOoVMNnn0OkwfDWGo/mm93LsUVRUA4 lqL6KO0uJ7jNSgqZSwq5+/OYPM4a9CXIa0QX53gfj75hJJNwYTNO4sMPRVsSm5iOlzw1 +d75Eh89KBrpCt2wN1eUN25mzRFJMU5PmXtOEmAqT+OlYArYTEdf81QbAzGnXXIHurbI z1bQ== X-Gm-Message-State: AFqh2kqLEqteeGpPL0a50ra1PMFX7Z+sJiItKfNXH8ooooVW09XnSAXm TcVDcMdMFcqafhCkzFQUbBeJzI376WnfM8/e7OM= X-Received: by 2002:a67:e983:0:b0:3ce:8419:3cb7 with SMTP id b3-20020a67e983000000b003ce84193cb7mr4983696vso.5.1672769848845; Tue, 03 Jan 2023 10:17:28 -0800 (PST) Received: from stoup.. ([2607:fb90:8060:51a2:184b:6e49:c396:be2]) by smtp.gmail.com with ESMTPSA id v2-20020a05620a440200b006fed2788751sm23042354qkp.76.2023.01.03.10.17.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Jan 2023 10:17:28 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, berrange@redhat.com, eduardo@habkost.net, armbru@redhat.com, ajones@ventanamicro.com, alex.bennee@linaro.org Subject: [RFC PATCH 13/40] hw/arm/bcm2836: Set mp-affinity property in realize Date: Tue, 3 Jan 2023 10:16:19 -0800 Message-Id: <20230103181646.55711-14-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230103181646.55711-1-richard.henderson@linaro.org> References: <20230103181646.55711-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::e2f; envelope-from=richard.henderson@linaro.org; helo=mail-vs1-xe2f.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 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 There was even a TODO comment that we ought to be using a cpu property, but we failed to update when the property was added. Use ARM_AFF1_SHIFT instead of the bare constant 8. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé --- hw/arm/bcm2836.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c index 24354338ca..abbb3689d0 100644 --- a/hw/arm/bcm2836.c +++ b/hw/arm/bcm2836.c @@ -130,8 +130,11 @@ 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; + if (!object_property_set_int(OBJECT(&s->cpu[n].core), "mp-affinity", + (bc->clusterid << ARM_AFF1_SHIFT) | n, + errp)) { + return; + } /* set periphbase/CBAR value for CPU-local registers */ if (!object_property_set_int(OBJECT(&s->cpu[n].core), "reset-cbar",