From nobody Tue Nov 26 19:44:00 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1705992019; cv=none; d=zohomail.com; s=zohoarc; b=EL3ITerJFr4InoLP28dBpP6n5+p8kCpzxdRTlrotAT24UHLYVC+5WFR60mpxpC/TyW7WMDLCR51FqLdEGOkK8F5MlPNdjw/Lgtuman9ZU+3XwE3H301PTQTsM/JQe4vxA7S7L6PVCUFmp3AlwEAozhq62dAdYvlwxSfUzM0mtXk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1705992019; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=i77zJu4XGXBVApw9vLRB2i1/pQOfnONi4E/tNbGXicU=; b=gFsvGJfLxNYqqzGVVM6aB6fZBPTclRC823jR812cXVwOsuRAMc1OJ3T7LiN1hefxD5jpHulxKaNjK2LZ5mrd3r3LjyeqRPS0EFdlXT+W3/HRb6rLY1XuHEbCjNiCKAA9H6mmB1FvNrj8gRQOq1oCFyZbQI6WDJI7OCAXmbNz1F8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1705992019947373.0697316197213; Mon, 22 Jan 2024 22:40:19 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rSARK-0003hg-Mr; Tue, 23 Jan 2024 01:39:18 -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 1rSAR5-0003Wy-8U for qemu-devel@nongnu.org; Tue, 23 Jan 2024 01:39:06 -0500 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rSAR2-00084U-Ot for qemu-devel@nongnu.org; Tue, 23 Jan 2024 01:39:02 -0500 Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-55783b7b47aso4442998a12.0 for ; Mon, 22 Jan 2024 22:38:59 -0800 (PST) Received: from m1x-phil.lan ([176.187.194.78]) by smtp.gmail.com with ESMTPSA id dm24-20020a05640222d800b0055c1433be60sm2864216edb.50.2024.01.22.22.38.56 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 22 Jan 2024 22:38:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705991937; x=1706596737; 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=i77zJu4XGXBVApw9vLRB2i1/pQOfnONi4E/tNbGXicU=; b=S1b2+tOH6PTVbzHapEHhdghVd18Nqe7Z9tSKB4B2Hrher6PoizNnuhKjVeWEHizX6F xlVgLYU6n+Re7HDT+4vN5cE025ATlC1ttBhiutawL5MYl3R5T731hriytpDEbOADkpZ9 hajsUBEkvdR9CQiYAtwLd9kCwGf5hzpDRjOQMLW/4Dis3Y7S6z70GlA+/+DoRjJMHpFM 5lGYTul5oiPjsmKwE/EvwhpkcNENyLqMlgCZaFcP+tvPQTsqnOuIuzqtTxVy6uLdWXqG O4AL1viAVEgEYNPIhjrLj3jloB/3utqY9iAY+uZ7QDkx3Mz9ne0tO6rnZR5yKx/5WGUs IORw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705991937; x=1706596737; 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=i77zJu4XGXBVApw9vLRB2i1/pQOfnONi4E/tNbGXicU=; b=EAGuWT5F0BeXMTW3rXNZMK6jppSNEX7r+fdg6ce2BiUFVS7mlpcl6JTGLCkyTULgsZ N3FKRcun+8mfOGZe5Qhww8A4tYCuLU0Cg/dZ8FWQBjn6wUWeRCra0/fK4oQtiZPgsJDV YJrphZxApPkrbU5iX7gxmrcfC+usqFdUECUnhSopQ5EyDmrA+7vCVUVJV63NRJfYXVTy +fN+YCVKulRTgtljI4AqDBJ059YNOC6yxXlIHAgcUjecBxeq5pRO6Uch3lvOLDsTJhDk Sll0KUadUnrvILLk+/81gfziXQjjuc0/GnDW+qPeCeOHr10qEHEltjKxla2vO+1hHWNK ZjJA== X-Gm-Message-State: AOJu0YwXiqpPf0ab76NuyIaRe/zVmUeZTHkhTkVWu8mMIZVpN3znYpAQ hUn/zHSK9SdSB2l7BHrHT1C8DF8ZgxHcMbaLqfdESj85w8k8/boYrcVHNCdQ0aizLfEq2GyhoND A6QQ= X-Google-Smtp-Source: AGHT+IFi07VBZVjQDkREKXZik2eUBCTs7lSYTU8lbQU47Yaa3HA2AK2ktEuhwJvZbbuQVNDj31o1FQ== X-Received: by 2002:aa7:c3c7:0:b0:559:f1b6:bf6b with SMTP id l7-20020aa7c3c7000000b00559f1b6bf6bmr572472edr.68.1705991937548; Mon, 22 Jan 2024 22:38:57 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , Igor Mammedov , Alistair Francis , Gavin Shan , Andrew Jeffery , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , qemu-arm@nongnu.org, Igor Mitsyanko , Joel Stanley , "Edgar E. Iglesias" , Rob Herring , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 2/8] hw/arm/highbank: Check for CPU types in machine_run_board_init() Date: Tue, 23 Jan 2024 07:38:36 +0100 Message-ID: <20240123063842.35255-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240123063842.35255-1-philmd@linaro.org> References: <20240123063842.35255-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::52d; envelope-from=philmd@linaro.org; helo=mail-ed1-x52d.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1705992021569100003 Restrict MachineClass::valid_cpu_types[] to the single valid CPU types. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/arm/highbank.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/hw/arm/highbank.c b/hw/arm/highbank.c index e6e27d69af..67677eb651 100644 --- a/hw/arm/highbank.c +++ b/hw/arm/highbank.c @@ -344,10 +344,15 @@ static void midway_init(MachineState *machine) =20 static void highbank_class_init(ObjectClass *oc, void *data) { + static const char * const valid_cpu_types[] =3D { + ARM_CPU_TYPE_NAME("cortex-a9"), + NULL + }; MachineClass *mc =3D MACHINE_CLASS(oc); =20 mc->desc =3D "Calxeda Highbank (ECX-1000)"; mc->init =3D highbank_init; + mc->valid_cpu_types =3D valid_cpu_types; mc->block_default_type =3D IF_IDE; mc->units_per_default_bus =3D 1; mc->max_cpus =3D 4; @@ -363,10 +368,15 @@ static const TypeInfo highbank_type =3D { =20 static void midway_class_init(ObjectClass *oc, void *data) { + static const char * const valid_cpu_types[] =3D { + ARM_CPU_TYPE_NAME("cortex-a15"), + NULL + }; MachineClass *mc =3D MACHINE_CLASS(oc); =20 mc->desc =3D "Calxeda Midway (ECX-2000)"; mc->init =3D midway_init; + mc->valid_cpu_types =3D valid_cpu_types; mc->block_default_type =3D IF_IDE; mc->units_per_default_bus =3D 1; mc->max_cpus =3D 4; --=20 2.41.0