From patchwork Thu Apr 3 23:49:05 2025 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: 877990 Delivered-To: patch@linaro.org Received: by 2002:a5d:6dae:0:b0:38f:210b:807b with SMTP id u14csp3527713wrs; Thu, 3 Apr 2025 16:52:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVxtg9fwyy3v0VDipz17vJBBX7zzCVI1ZXfHU2/B8fa+ZwNWEeVDUVSOmQvHuPKKmAGpwE8hQ==@linaro.org X-Google-Smtp-Source: AGHT+IGq1jYouZx9GDRzQYr4FCMdKcUTHPPbdN+ljJVX/fu7Ewl46s9jKgHbIvGJ0HWC+0aAK02d X-Received: by 2002:a05:620a:2550:b0:7c5:61bc:70ee with SMTP id af79cd13be357-7c775aebce5mr91708985a.52.1743724331102; Thu, 03 Apr 2025 16:52:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1743724331; cv=none; d=google.com; s=arc-20240605; b=EK+Q17uyTclu6xgRrwwHOATEXwpGpQ5/T5iYT0zhcI/ZxkzRI9sPOAtJZ5KKCZV3Hd NkNEhnk6luFA6aNYVoaeQbqDg/u0fVjQ7qNrhag3Ad+4UAKtCluFDzAIjlNfOiix0l7f QZLQK7J1RoLfDRPHF3nHx/uTPzrki3Zqvgn7c7iVbhfyGlg5jLcgCmG0fb/3LFvqACsc agZzV8cuNwFVI4t5/uSiFbbStjmhtFXiF6BukdMHiWTON2krM0GsXhY7Oy1x/kocF4FG VTeBjMG4v94hpmmeKrwWTgw2mWBKXPESv7KLrORSgJzhvthASQDJyi0wf7T7A2/1qLtg DuDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=rr+hpT8SboGgKuB5nhv/jFygpXGU6aBbobklx4SUFWw=; fh=ISslU+6AOAPvfm3mmMuq/p0l7xeUGlnJLjUVX+iCVao=; b=S0Xqm98c49XrYOrjkpXGT6SAshbN112INL/mq9fRI1/szYBGgqvHwlMjhE4SmWFG4Q 606uOYmAxVsopLlaQiGnNACCJN6JVeGlddc1dfNlHq30CHNckQ00AET4I11g2bzoQH2M IcW677n8CuaSLdtuFEAadY85nUN9QiWiwAM/Kd52BAOKYZPinXr9EoRHy8J8lhn7zyqU ZYO0cYaRDJ+Cr91nW17gdCIsZSiSsheQwBXPh1/gvgD0LbU4irD2bttExbahtK8ylNIm bfsuc+9akeg0ru5PaSYNHolmYADI6c7YlY+XMuWnlERTrWEyY6HoA0sj2VW/sfWFUKsO S6Og==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=GBPdCz47; 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; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c76eac03ecsi204297285a.542.2025.04.03.16.52.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 03 Apr 2025 16:52:11 -0700 (PDT) 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=GBPdCz47; 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; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1u0UKf-0001u5-Uj; Thu, 03 Apr 2025 19:50:51 -0400 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 1u0UKH-0001YE-8p for qemu-devel@nongnu.org; Thu, 03 Apr 2025 19:50:26 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1u0UKE-0000i6-U4 for qemu-devel@nongnu.org; Thu, 03 Apr 2025 19:50:24 -0400 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-3912fdddf8fso1631661f8f.1 for ; Thu, 03 Apr 2025 16:50:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1743724221; x=1744329021; 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=rr+hpT8SboGgKuB5nhv/jFygpXGU6aBbobklx4SUFWw=; b=GBPdCz47tSqLLzNhPA0YlAfuFnNWVbFkN+3EOBoorb+aONSB9Y+JazDovtxqjdxO98 hFYe8LDtTLe+6xuI9bebcVFxzOlxro3+CWyRgR5yCFEyN2f5uG/yDizyMT0KtWC3b0Ak ORba1vVjXPq8Kl6gJYrwf7f5bia/uEYBY9Ba/Tuu35QcXFOjVu9IRMcJbM7y0OVdVtbr bEB8fg/B+CYZs0uN+k2euY6TPhTz3gUnPz4//OmNvIu5bggrc9M22gw0j3016wjzRR45 z799nvZLlJ+/5rFXcrl7y9/F4Oo4NYyfLHS5ZdezgH7nAf4ffTe7T5u+Neq2wj+qaE03 oI3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743724221; x=1744329021; 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=rr+hpT8SboGgKuB5nhv/jFygpXGU6aBbobklx4SUFWw=; b=K+12i8DP9ozjKaXWccuou5mb6LVeCUhuYJURriGgCXowSkdpx/1iCe0eVdGnYVxc60 xv9f5pq2dmF2IkQ5boFEZozBj0Qv7V7u5FG32ABo6K5yUOdBj0GDFqso8BdpTG5VL6kf I0OWQNLeTicwMX49XyNKQTGeLubFKHoT63qlVV0MssmqFAD8p2lp4jm/rKbs5zFUrY8X gMOIaJkR0Ee0y/vg7MCuBHiLTDQDISMXAUlhz1BdU+XPfnH3xMnVrO53P+an+R99/O5G vm9ML74rdsMCRyvglu5h2pm4S0AnehR1i4nSOg+O32SjL9bC+oRb1v24pp7ComAC6+0k Pqvg== X-Gm-Message-State: AOJu0Yz0hMUq4kuP+G9C7OMzF7SAM/KESg4I/H4nYfOUyLjzVkn/P5dE OOTmHKmPSn5QKuzR2LEy3nQpcEImbH+BozgBUnOHx6R1+Ku17drlVaQB9OzBijGAag4a66yMXUz v X-Gm-Gg: ASbGncvdekWfGgshq8mDsbZpfQVtHHLkGhtx3VBrZWHXlnm9TM/Y9ek7HEHwZNoApbw HbU8XuBhfdrI2p9UhXOGrzH23tWHrJPyyWWtiwwxMLynL0bxnYrxbG1FdKJOMpbgUwkkoDnO1KJ mV/icX2JfVr9qlAsgF002SMD9rw96zll2dPwpFPlzPSn8yCnjS21hIDGWS2mC7UJ1WMu4ypDL+9 lf7fdtzXrgBPoAkdzrcYPJuyDhlF6EK78uL1nVHnkEhPitfQoOsyOreBKkXB+JYm85RYMOC+mA1 KTGvFmTgZfRGszomjrrqg4YQ70zAFW796ugr1hTsWGB65S3cQzkn8gxJL8ARFRt5dF5Q/UsA4d2 PHCapUERYrV+pFEPHUxg= X-Received: by 2002:a05:6000:2509:b0:39c:12ce:1112 with SMTP id ffacd0b85a97d-39c2e651984mr5182101f8f.21.1743724220803; Thu, 03 Apr 2025 16:50:20 -0700 (PDT) Received: from localhost.localdomain (184.170.88.92.rev.sfr.net. [92.88.170.184]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-39c301b6778sm2882577f8f.46.2025.04.03.16.50.19 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 03 Apr 2025 16:50:20 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Markus Armbruster , Richard Henderson , Pierrick Bouvier Subject: [RFC PATCH-for-10.1 10/19] cpus: Replace CPU_RESOLVING_TYPE -> target_cpu_type() Date: Fri, 4 Apr 2025 01:49:05 +0200 Message-ID: <20250403234914.9154-11-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250403234914.9154-1-philmd@linaro.org> References: <20250403234914.9154-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=philmd@linaro.org; helo=mail-wr1-x429.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Pierrick Bouvier --- cpu-target.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cpu-target.c b/cpu-target.c index 761c2d28645..01b0064b91f 100644 --- a/cpu-target.c +++ b/cpu-target.c @@ -22,6 +22,7 @@ #include "qapi/error.h" #include "qemu/error-report.h" #include "qemu/qemu-print.h" +#include "qemu/target_info.h" #include "system/accel-ops.h" #include "system/cpus.h" #include "exec/cpu-common.h" @@ -37,7 +38,7 @@ QEMU_BUILD_BUG_ON(offsetof(ArchCPU, env) != sizeof(CPUState)); char *cpu_model_from_type(const char *typename) { - const char *suffix = "-" CPU_RESOLVING_TYPE; + g_autofree char *suffix = g_strdup_printf("-%s", target_cpu_type()); if (!object_class_by_name(typename)) { return NULL; @@ -63,7 +64,7 @@ const char *parse_cpu_option(const char *cpu_option) exit(1); } - oc = cpu_class_by_name(CPU_RESOLVING_TYPE, model_pieces[0]); + oc = cpu_class_by_name(target_cpu_type(), model_pieces[0]); if (oc == NULL) { error_report("unable to find CPU model '%s'", model_pieces[0]); g_strfreev(model_pieces); @@ -92,7 +93,7 @@ static void cpu_list_entry(gpointer data, gpointer user_data) void list_cpus(void) { - CPUClass *cc = CPU_CLASS(object_class_by_name(CPU_RESOLVING_TYPE)); + CPUClass *cc = CPU_CLASS(object_class_by_name(target_cpu_type())); if (cc->list_cpus) { cc->list_cpus();