From patchwork Fri Jan 26 13:32:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?C=C3=A9dric_Le_Goater?= X-Patchwork-Id: 766339 Delivered-To: patch@linaro.org Received: by 2002:adf:a314:0:b0:337:62d3:c6d5 with SMTP id c20csp233935wrb; Fri, 26 Jan 2024 05:33:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IEIlvAHjCtKhKk+ew0icyPFmxd8juELdLQzGLH0yD3/NWuMG5gHfvU0NkcWmmEVTz2vadCQ X-Received: by 2002:ac8:7c41:0:b0:42a:7e10:fd15 with SMTP id o1-20020ac87c41000000b0042a7e10fd15mr1333094qtv.34.1706275993329; Fri, 26 Jan 2024 05:33:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1706275993; cv=none; d=google.com; s=arc-20160816; b=oGMk1qXZqWdKhT/SvJuB9z7qY8CnCfeZzhjhhQZ12HbPgs8V5eKVmFvnshWYi9Y0br aVzNoK9T0yAwXNayTY4tDcvV37Fsv5DJfYUrcaiOfg3Ch9H7FfwYCW6LvxBkmpkRhO8q whqgECNHZ+nTupTyvjQjf5kDoRALXT0JGQCixOsHRAV/20iQbKX2tdLT5B2eAX5zhbuq ICMOi0tM94ZIQTYiUz96uWX4j9Vz6kNZ2yCnm9vrSLI+WaZF/a8uHOT03WfsBm+C5lnJ K+5Yzfg8fPtkcY0a5eG/0ciqaLrrp0CLDbKpfy306vR3+0NrcBQZJX65jZbS03RE0BrC Jp/w== 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; bh=9D25eCE6OjsqpFMSAcIqOWGsmbhZ7nRgxuYpmTvUa7o=; fh=P8iU9h9QL5MVD5FNMLApbGIr2HIUMfQ4K17hbdoLV+0=; b=LD0n+7iOx/I7IuNc+ohp0Dv61bF8OKDbPDR7UZGZJxoQbuyr2Ba6V5K7hN12z7x2lD EDE+FxPcDC3zzntpUP3xWuqh6ZozWBe2zL/EFiaZYLi/d2Bw7jydVYjNAoVC+4KZy0sD L7UcFvg9aM3tWuni87F1P4a8/uTKg4rD0OCB9gWRTZEhJFDY+1OCwGdcpzUy5vmmrQUI WxlSVx7BMRrI+gfFTQYPLxVH/mL1F5RI23SNN2vw0SFkD85O1a+vtBf/llSEvOjWiRJh 14VCxNpJhJoI1DZs++pDfbASVC/KuOhjxDZscH6ZYVU28hzCo0PAompXkBhket2Oc51I nWTw== ARC-Authentication-Results: i=1; mx.google.com; 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" Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id n8-20020ac85a08000000b0042a09a98ae1si1293761qta.67.2024.01.26.05.33.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jan 2024 05: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; 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" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rTMK0-0002uD-Fu; Fri, 26 Jan 2024 08:32:40 -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 1rTMJw-0002iQ-D3; Fri, 26 Jan 2024 08:32:36 -0500 Received: from mail.ozlabs.org ([2404:9400:2221:ea00::3] helo=gandalf.ozlabs.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rTMJu-0007zT-DO; Fri, 26 Jan 2024 08:32:35 -0500 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by gandalf.ozlabs.org (Postfix) with ESMTP id 4TLzC36c0Bz4wbp; Sat, 27 Jan 2024 00:32:31 +1100 (AEDT) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4TLzC2144Wz4wx5; Sat, 27 Jan 2024 00:32:29 +1100 (AEDT) From: =?utf-8?q?C=C3=A9dric_Le_Goater?= To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?C?= =?utf-8?q?=C3=A9dric_Le_Goater?= , Gavin Shan Subject: [PULL 03/17] hw/arm/aspeed: Set default CPU count using aspeed_soc_num_cpus() Date: Fri, 26 Jan 2024 14:32:02 +0100 Message-ID: <20240126133217.996306-4-clg@kaod.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240126133217.996306-1-clg@kaod.org> References: <20240126133217.996306-1-clg@kaod.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2404:9400:2221:ea00::3; envelope-from=SRS0=5gEp=JE=kaod.org=clg@ozlabs.org; helo=gandalf.ozlabs.org X-Spam_score_int: -39 X-Spam_score: -4.0 X-Spam_bar: ---- X-Spam_report: (-4.0 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-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 From: Philippe Mathieu-Daudé Since commit b7f1a0cb76 ("arm/aspeed: Compute the number of CPUs from the SoC definition") Aspeed machines use the aspeed_soc_num_cpus() helper to set the number of CPUs. Use it for the ast1030-evb (commit 356b230ed1 "aspeed/soc: Add AST1030 support") and supermicrox11-bmc (commit 40a38df55e "hw/arm/aspeed: Add board model for Supermicro X11 BMC") machines. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Cédric Le Goater Reviewed-by: Gavin Shan Signed-off-by: Cédric Le Goater --- hw/arm/aspeed.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index 4bc292ff84fc..5b01a4dd28f8 100644 --- a/hw/arm/aspeed.c +++ b/hw/arm/aspeed.c @@ -1212,6 +1212,8 @@ static void aspeed_machine_supermicrox11_bmc_class_init(ObjectClass *oc, amc->macs_mask = ASPEED_MAC0_ON | ASPEED_MAC1_ON; amc->i2c_init = palmetto_bmc_i2c_init; mc->default_ram_size = 256 * MiB; + mc->default_cpus = mc->min_cpus = mc->max_cpus = + aspeed_soc_num_cpus(amc->soc_name); } static void aspeed_machine_supermicro_x11spi_bmc_class_init(ObjectClass *oc, @@ -1586,11 +1588,12 @@ static void aspeed_minibmc_machine_ast1030_evb_class_init(ObjectClass *oc, mc->init = aspeed_minibmc_machine_init; amc->i2c_init = ast1030_evb_i2c_init; mc->default_ram_size = 0; - mc->default_cpus = mc->min_cpus = mc->max_cpus = 1; amc->fmc_model = "sst25vf032b"; amc->spi_model = "sst25vf032b"; amc->num_cs = 2; amc->macs_mask = 0; + mc->default_cpus = mc->min_cpus = mc->max_cpus = + aspeed_soc_num_cpus(amc->soc_name); } static void aspeed_machine_qcom_dc_scm_v1_class_init(ObjectClass *oc,