From patchwork Mon Jan 29 15:18:26 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: 767387 Delivered-To: patch@linaro.org Received: by 2002:adf:ee41:0:b0:33a:e5bd:fedd with SMTP id w1csp937856wro; Mon, 29 Jan 2024 07:19:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IGzrHZmnBQTAz8QCT4+HNYRConj1S9lLBdvOjKiNqxLfO1gLI6cE0mlM8IIfh10zgMYACmN X-Received: by 2002:ad4:5969:0:b0:68c:5ac1:dd3b with SMTP id eq9-20020ad45969000000b0068c5ac1dd3bmr463517qvb.74.1706541572595; Mon, 29 Jan 2024 07:19:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1706541572; cv=none; d=google.com; s=arc-20160816; b=Q4Cw0toeG2mA2gwnx+1AQ4lusWRvafCEJuuH3W7BtBCN7yibSgw94yWsRlBuld2A4g OuYUZsk6pn/ELnDjv2fpBStB4FA0AjEQ3MKUbVsFU2MuGCVhEqP3aAfH8305eE7G+iTN gFs6pYrkw7olba6OaMk1Zs93sHFlBWEI1FFOJ12EtzVsbI3L5I8lJKCrxJ7VWOCQ13Lf m0/zAxYuyINiIIuE4YQPnazKEpnYzmiJVPELo8WFxo2vm0t51Q2EoZ/7ru4wqXEnMYEe hi+hLbCgPh5e7BVou5UnJt1bzQ9OaYUvnuoyd9cUzZCtVN02o+RrfJzzm0cPR5UNIp/5 9gyw== 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=MFN/VSnR85vSlwmoZKq2ZY9d+Yj3Zr7afXCJn+FdH7U=; fh=Q7sPWZVumIp+YJDEXhcbqZA2VLBOzLVoxgbszpp+aBE=; b=jENjUCpW02WD1kfbG/L+Ypxq9nPRN6aapx0RpQSjPFJJP0ikHkig6vvuPDtgEmu5ky 1Jw2vxJSBMqii+o+arnj7NlQszGituqmWTAkv8xncNh7BcJ4GvJ/UpLnU8HxfOn31zRk m+J8i9ztmvJVBQAuwTjirBRd8edELtNfzkWhLsBFfPOVNScxo/eyPhEUqUZBx6oBenMe V6hfBnbUkpsxlO74RzZoz5mEYITQkppMfI7nIZIKU6sHQ+MWIQQJhM+g6Ehb/t/rDOiv 5jqXOhqYpG4YfptR3a7IDSJ213v5zHC8TbropO5dzf7dnv7oDvXihAwNIMR6LzT8pyMx IMsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZuckoVuL; 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 ke27-20020a056214301b00b00681725e75a5si7902859qvb.399.2024.01.29.07.19.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Jan 2024 07:19:32 -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=ZuckoVuL; 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 1rUTPs-0007mp-KK; Mon, 29 Jan 2024 10:19:20 -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 1rUTPq-0007lA-H0 for qemu-devel@nongnu.org; Mon, 29 Jan 2024 10:19:18 -0500 Received: from mail-lf1-x130.google.com ([2a00:1450:4864:20::130]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rUTPo-0007Vw-V0 for qemu-devel@nongnu.org; Mon, 29 Jan 2024 10:19:18 -0500 Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-5102b43035eso3444988e87.1 for ; Mon, 29 Jan 2024 07:19:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706541555; x=1707146355; 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=MFN/VSnR85vSlwmoZKq2ZY9d+Yj3Zr7afXCJn+FdH7U=; b=ZuckoVuLyhw8hX5WxonFAIZb5MbI/q1oa5w/jpkjMyq3CRGeHEj3RBeO0RriWpWk8c C8ZuKghBmuCITAsEL2LT6geDyKHaf3u4yEP5pa8aDl7WBrJNCgxsMrjCM/pLC3wRWZcE AiA6n104kHvqySgSSVI9zdR8Tuo7HC1br7bO6oq3cfjU74YWNPvHNw8vGfpiT+Iqvkmx XBTOjaFDLz4rW8XXaoUpPd1BZAhgKrEyEAc9P37OP/WJvq8T0N+ZH0aoW359ZukWsT52 1kj1deIbD/NnEg8Bbo8Jhu2ciWbz52zDU3ouCFIXDECwFK1jeOMLbgo63nPhWjdCmBwy EFOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706541555; x=1707146355; 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=MFN/VSnR85vSlwmoZKq2ZY9d+Yj3Zr7afXCJn+FdH7U=; b=neXCv8WBAJcDTCuuWa8tL7IcQQOFkYuZG0NWpyoiu+/xyTGGffpMjtBJMBQIt9rjxR JR8bLv6rYeaKEh4XbonDSZ9rd7cj5U4fep3RHNpkAK5yKGLkugeA6DAskSwNO+UADc/8 XInjKsMUEcPahFJfpOd4vohIKfS1+mraFELchKzAJNfuWtE2TKUZOuRYH9HcXzJ83IsC CfHO0gtH2Og3gjS4FDRvI1D9nbHTBBI6Hcxjxr01ChW86+2vNQZgnPjTHXuhtF8tNpiP ieHK40iFKfYfaXr+j7pp8JIWh3JsG7kGppzZO/UKDqox9eHWqFBFssM9MQqMFZH72WHd MgbA== X-Gm-Message-State: AOJu0YzIWlDKq7YUiI/XY0TUoWgaYEcDoxbFNLhwl8m5mym/pmp62EkH 4NgmiqW/te6uYJT1QNTOCPvSthGaxDX4+d/PEa5MnpFxsxtZxRiclgoUHRw6lQuDAv2qUzS37QP 7 X-Received: by 2002:a05:6512:2209:b0:50e:4098:3798 with SMTP id h9-20020a056512220900b0050e40983798mr4357536lfu.60.1706541555036; Mon, 29 Jan 2024 07:19:15 -0800 (PST) Received: from m1x-phil.lan ([176.187.219.39]) by smtp.gmail.com with ESMTPSA id t20-20020a05600c199400b0040ef702a338sm3288794wmq.25.2024.01.29.07.19.13 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 29 Jan 2024 07:19:14 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, Tyrone Ting , Subbaraya Sundeep , Alistair Francis , Igor Mitsyanko , Hao Wu , "Edgar E. Iglesias" , Peter Maydell , Rob Herring , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PATCH v3 7/9] hw/arm/npcm7xx_boards: Simplify setting MachineClass::valid_cpu_types[] Date: Mon, 29 Jan 2024 16:18:26 +0100 Message-ID: <20240129151828.59544-8-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240129151828.59544-1-philmd@linaro.org> References: <20240129151828.59544-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::130; envelope-from=philmd@linaro.org; helo=mail-lf1-x130.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 The npcm7xx Soc is created with a Cortex-A9 core, see in hw/arm/npcm7xx.c: static void npcm7xx_init(Object *obj) { NPCM7xxState *s = NPCM7XX(obj); for (int i = 0; i < NPCM7XX_MAX_NUM_CPUS; i++) { object_initialize_child(obj, "cpu[*]", &s->cpu[i], ARM_CPU_TYPE_NAME("cortex-a9")); } The MachineClass::default_cpu_type field is ignored: delete it. Use the common code introduced in commit c9cf636d48 ("machine: Add a valid_cpu_types property") to check for valid CPU type at the board level. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/npcm7xx_boards.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/arm/npcm7xx_boards.c b/hw/arm/npcm7xx_boards.c index 2999b8b96d..e229efb447 100644 --- a/hw/arm/npcm7xx_boards.c +++ b/hw/arm/npcm7xx_boards.c @@ -465,7 +465,6 @@ static void npcm7xx_machine_class_init(ObjectClass *oc, void *data) mc->no_cdrom = 1; mc->no_parallel = 1; mc->default_ram_id = "ram"; - mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-a9"); mc->valid_cpu_types = valid_cpu_types; }