From patchwork Mon Nov 6 11:03:09 2023 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: 741354 Delivered-To: patch@linaro.org Received: by 2002:adf:fd90:0:b0:32d:baff:b0ca with SMTP id d16csp1029508wrr; Mon, 6 Nov 2023 03:24:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IHWLFArJj26gaGeztx6WdHurJAeEQT0EMNnaNCibzSCFuyIZTV0WMwnuXn6gfVAd9R0p2Rr X-Received: by 2002:a05:620a:6009:b0:76f:1f8c:cc1b with SMTP id dw9-20020a05620a600900b0076f1f8ccc1bmr27423497qkb.78.1699269857744; Mon, 06 Nov 2023 03:24:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699269857; cv=none; d=google.com; s=arc-20160816; b=qFt/cT+P9xEOwu4SozWbRZBertSOzEtO2m47Z2nhJuM96Yrwp+fmgwPzekkpAAOpoR zjk7keYeroCHQqIqsdxqJTReaeBAiqtWzm7lg6EtA9TRivHh69QzgYIp5tVajK7B43x3 lvEXsbCV1gvg6r4yACTGI09UZzaiwoXUQ2UTw8EdVAXmZ9mAy1QZydhy4/u2lknnpUDR 0C8meE5Q1RTg3S6jsAs8CCWHR8+314QVlP4aDQp0bBP9JGK+KTDiMZEsha5PAIc65Pbs y8ezbtVCeBPWno0zINE6w+ziGdnmGZiepCZkgBHQ7n6Sm/Ik5WfGLGYS7UmkbJRfVuqY T9pw== 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=pDLz44pMnS6BY17PlhPlXPTDOUKf2M5E2FKcksHeUks=; fh=KOGce46xVxY80adwH+7HYjmhGoI2WcTe1iPe5JKSVig=; b=u6n42anUO0KU+LGputEZCvl8NC9yGI8QmLfOzb/vZ5tsdAMkXCMXNjIunfshaVxk39 KbPqEyjZJRn6sIp9oH2JNLBpwOvGS4kQOgMLLAKYvv6nKdg2cBIZAWl2ySa5f8OxcGzE GGUO3+05FUDjWad4bzni1tXKKYodZwG+W1t8IzayhHJjXI65wWcETsXy+zRl6fYZ6aaR 2Qm74HpRIzyuUApxHG45I87DL8NM5t/kOD6hpOevGKqFyIiRGap22uzyXnE1nIgLkNT+ WxvlIFTn34vwQuAmTZ9dU72MUOztHpTAzH8qq9U53wpOlq57RcLmyL8VydXdy04Dmuux MDYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kslP9F7o; 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 az44-20020a05620a172c00b007788f266816si5591648qkb.278.2023.11.06.03.24.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 06 Nov 2023 03:24:17 -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=kslP9F7o; 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 1qzxSX-0005FO-Fv; Mon, 06 Nov 2023 06:07:57 -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 1qzxSW-0005C0-7u for qemu-devel@nongnu.org; Mon, 06 Nov 2023 06:07:56 -0500 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qzxSU-0004t8-Kw for qemu-devel@nongnu.org; Mon, 06 Nov 2023 06:07:55 -0500 Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-507d1cc0538so5745068e87.2 for ; Mon, 06 Nov 2023 03:07:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699268871; x=1699873671; 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=pDLz44pMnS6BY17PlhPlXPTDOUKf2M5E2FKcksHeUks=; b=kslP9F7ork8t6NxZHid0VrmFSQ9tHMOuZ4zNqElHvUWScGsiOrvcWPtP8uYyvXc8Eb NxeoShDmG94h6fFVHjwt1bdLBU1FEFYQ9ZiGq6K9Af7Za9BnYVnycNvTfjgFHp4kITaU OjyM3Sl72yA2KJFe7Mxegvqhq5Kb2mZlbG+ekmve05pE/PkJzv317OB03ug+Dg8KHk6f 7oTlg2SJCqRBVWQRJtNHdnyzEgn981IkVJjsaceE2mDy9yyKyp1h7b0uuzpwn/Lglf8p hMCDoQzkNHR9xkBGCAuxQW26zhfdUae+IYvkLGK5gn2LunFFo47GFonC0ad5rHIIjKkY tFHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699268871; x=1699873671; 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=pDLz44pMnS6BY17PlhPlXPTDOUKf2M5E2FKcksHeUks=; b=nkgdDkvxLgiReVFUrRMg0gTptCxu9D8wFgUHguHNJxBHyDyQlfdVrujqCM4uJKsY83 tiMyY/nnrMKiwoNyezgBC2CDH2QLpsB8SbaXG0runKt1SRHfR6faBgyrGF8I/SPxrlDC HLfvH22qN0iq4a9hVwNx3cXNJplTEwk+8vZ3dA3ATGSw7IJvMAL9BjAoNW0NWKo+z1xM GRunmDBCTjLFqe9EzdgDlon21Zl4b7+sPic7ltoxniXa0Lz89+o5nZAm96XLuCJRwNA1 d2stqnq1g/aSPx+G9gW8XurR7e4ZMP6mCqaCMUuZQ/U33uDTMovnMcv1PW0sqXrPGZ6B FzzQ== X-Gm-Message-State: AOJu0YzvqUCKu93/MaxITzjdNV6WVmeTh1HA8CYszR6nHjEQ3g3x55eh /kGwrVVMPZQDMBdOleRDFNWEyG6Yfy6WNq1hM9o= X-Received: by 2002:ac2:44ae:0:b0:503:38f2:6e1 with SMTP id c14-20020ac244ae000000b0050338f206e1mr18200122lfm.5.1699268871711; Mon, 06 Nov 2023 03:07:51 -0800 (PST) Received: from m1x-phil.lan (176-131-220-199.abo.bbox.fr. [176.131.220.199]) by smtp.gmail.com with ESMTPSA id k18-20020a5d6d52000000b0032da4f70756sm9122296wri.5.2023.11.06.03.07.49 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 06 Nov 2023 03:07:51 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: kvm@vger.kernel.org, qemu-s390x@nongnu.org, qemu-block@nongnu.org, qemu-riscv@nongnu.org, qemu-ppc@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Gavin Shan Subject: [PULL 37/60] target/alpha: Tidy up alpha_cpu_class_by_name() Date: Mon, 6 Nov 2023 12:03:09 +0100 Message-ID: <20231106110336.358-38-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231106110336.358-1-philmd@linaro.org> References: <20231106110336.358-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::131; envelope-from=philmd@linaro.org; helo=mail-lf1-x131.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 Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Gavin Shan Message-Id: <20230908112235.75914-2-philmd@linaro.org> --- target/alpha/cpu.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/target/alpha/cpu.c b/target/alpha/cpu.c index 51b7d8d1bf..fae2cb6ec7 100644 --- a/target/alpha/cpu.c +++ b/target/alpha/cpu.c @@ -142,13 +142,10 @@ static ObjectClass *alpha_cpu_class_by_name(const char *cpu_model) typename = g_strdup_printf(ALPHA_CPU_TYPE_NAME("%s"), cpu_model); oc = object_class_by_name(typename); g_free(typename); - if (oc != NULL && object_class_is_abstract(oc)) { - oc = NULL; - } /* TODO: remove match everything nonsense */ - /* Default to ev67; no reason not to emulate insns by default. */ - if (!oc) { + if (!oc || object_class_is_abstract(oc)) { + /* Default to ev67; no reason not to emulate insns by default. */ oc = object_class_by_name(ALPHA_CPU_TYPE_NAME("ev67")); }