From nobody Thu Apr 3 11:26:39 2025 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=1741189293; cv=none; d=zohomail.com; s=zohoarc; b=cVReGf+DOz1DqljAZj9915W7MroRsGf8UkT6VKSJgJZwPCavsOoHjCzPGyVkw5TEd2WH59C8+03w0woa5dm5OY9htElIP8IUMYLy6P2lituo/z2XniHTl7voun9a4mYsXsALsHI62G7I3PzV6R6JSA9wwqzra8Dg6lJucrYu+pY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1741189293; 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=p6dIwE7gVAC3kvr4prQgvoWqphwYC2S/k+p1kJTqC1M=; b=ej9BVyn5NE4xq9C1AuDNq6EuRktXJdAHxnvL1MaGXX8a+8Onnli52dj7qn7FITlZ2nXs3Zf9skLBqE6TiqcOH5iY3ZWiE5Vgct3A26uZKQxDwqOvQFP43kUA+fDOComyCr1A9U4x1dOZGhkq6ENfX7Fqa0Fmb/31xvqKk4X78U8= 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 1741189293649203.25110532080384; Wed, 5 Mar 2025 07:41:33 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tpqqw-0008QY-MK; Wed, 05 Mar 2025 10:40:11 -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 1tpqqu-0008Oc-T9 for qemu-devel@nongnu.org; Wed, 05 Mar 2025 10:40:08 -0500 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tpqqt-0002LA-0i for qemu-devel@nongnu.org; Wed, 05 Mar 2025 10:40:08 -0500 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-4398ec2abc2so62238015e9.1 for ; Wed, 05 Mar 2025 07:40:06 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43bd435c6f4sm20308835e9.34.2025.03.05.07.40.03 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 05 Mar 2025 07:40:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741189205; x=1741794005; 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=p6dIwE7gVAC3kvr4prQgvoWqphwYC2S/k+p1kJTqC1M=; b=c48DXGjxEH3K+6+lw+hB76dsjSZdOgCcSN5h7nwg82XugAfvjPON6BzNRCt96HtPtl ozBgF8lMemjy401D3REG238dJPC46+4zuGr0+TIaNeuiyT0OXM+Vq/gbljNdSROsy7aU Bf3SlFETTuWROUrRGXQHiJ+2K+AHeBd2/roowjwTSlYOKSgaRGqHf3Je723CYi6ygTRJ uruEAO0eD6c7lWzK4J0YWe5UI9jYiW18XT8wzep2rNsCDvZqoe7Z4YdrEtsD+K5b4KOx aXDgwNvFZacWKpUefF334Cn9MYakm3MxyIuha43oYFLnQm2KDi94JFjggJ3epmZ1MWQd GLGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741189205; x=1741794005; 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=p6dIwE7gVAC3kvr4prQgvoWqphwYC2S/k+p1kJTqC1M=; b=lQ2ZeqbkdyPY4rUh7XjR9n7XtlDc38fzdXIRg8z6kLa6AZYMa+skSpANaVkZKTu8u5 Io437DQhdt10gP0OGyMJu/X5408g3ikB3C45gl3hw/ugLJnVy+ZbR8VcZFCpZDKDaetr /9fjFSRegVgXGLxZ0sw/zl7xTeyw5vCiSIljsZzDtAmxrgAX2nqBMBpQlrkyMISitQ11 VSge9LH8k1Q7PAkBJv78Tj8vE/3PA31ILhiQBEgi0/skt7D254dDORd2PpkbnImWtfMR OxUvdFDfkMihOgjf2P+LI0oT58VRh6KKlb0Kdbb0l01z6ftUSHGz+8xlBmwd39phETwm yjqQ== X-Gm-Message-State: AOJu0YyxIzC3ZoN2J7rPkyfmbgAB33O18TnuRn01+N1zqwTmLXsq/ZUo Em6NtAsvd1ybqFSJrmPsSAYQuObc0vYKVGDjBKzYAQLBK3XDGcx37nxrhfc2gqkRNk+IG/5c5OP F+uI= X-Gm-Gg: ASbGncvh3PSX0tEpYYifWh3YOTL87pTnUP6qk1B5V3eit6JfbZ3B+AVfZsLgIEXLfw9 IrqNktW6lQHbYv1aRJcD2RJplezO4KRe2XnqwgLnC/aqSslrdVSiOQl/t4/4PKfMC38+O7utGmv D/p18tLpi6sv0VmRjnfxTFxkM0eT+HE/ZEr2lvyOr/3UZ2Jq8TqwQbLhZuRI41mUCT85NLWxlp6 Cui8SmATJsMW8o6zJ3QEphDiIJZz6yd6YHdWqQkR5LMsSHlMTSs/vVGq98t6n1h3XVXMUhUtSYs UBYfJ0w2Rs4tChyoGUS6yr1QSxfmQ8d72/rkRCj4FcIzUlS7axtP0VCLsOc82cG7sLBE87CNsgy IGH8bSr9MdOM5iWtOb9E= X-Google-Smtp-Source: AGHT+IEEw1M4NTgNFD4c1Pk88DDohyB7w17rsrnSVgJ/UueZW5oDEyan6zat3wzUzU3k9bDq32o2Fw== X-Received: by 2002:a05:600c:4f15:b0:439:8bc3:a697 with SMTP id 5b1f17b1804b1-43bd294bc2dmr28503345e9.4.1741189205082; Wed, 05 Mar 2025 07:40:05 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Paolo Bonzini , Richard Henderson , Pierrick Bouvier , Thomas Huth , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [RFC PATCH 07/18] hw/mips/malta: Replace TARGET_MIPS64 by legacy_binary_is_64bit() Date: Wed, 5 Mar 2025 16:39:17 +0100 Message-ID: <20250305153929.43687-8-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250305153929.43687-1-philmd@linaro.org> References: <20250305153929.43687-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::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1741189295681019100 For legacy MIPS binaries, legacy_binary_is_64bit() is equivalent of the compile time TARGET_MIPS64 definition. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/mips/malta.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hw/mips/malta.c b/hw/mips/malta.c index 8e9cea70b13..3517e437f26 100644 --- a/hw/mips/malta.c +++ b/hw/mips/malta.c @@ -26,6 +26,7 @@ #include "qemu/units.h" #include "qemu/bitops.h" #include "qemu/datadir.h" +#include "qemu/legacy_binary_info.h" #include "qemu/cutils.h" #include "qemu/guest-random.h" #include "exec/tswap.h" @@ -1300,11 +1301,8 @@ static void mips_malta_machine_init(MachineClass *mc) mc->block_default_type =3D IF_IDE; mc->max_cpus =3D 16; mc->is_default =3D true; -#ifdef TARGET_MIPS64 - mc->default_cpu_type =3D MIPS_CPU_TYPE_NAME("20Kc"); -#else - mc->default_cpu_type =3D MIPS_CPU_TYPE_NAME("24Kf"); -#endif + mc->default_cpu_type =3D legacy_binary_is_64bit() ? MIPS_CPU_TYPE_NAME= ("20Kc") + : MIPS_CPU_TYPE_NAME("= 24Kf"); mc->default_ram_id =3D "mips_malta.ram"; compat_props_add(mc->compat_props, malta_compat, malta_compat_len); } --=20 2.47.1