From patchwork Fri Jan 5 15:42:06 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: 760161 Delivered-To: patch@linaro.org Received: by 2002:a5d:678d:0:b0:336:6142:bf13 with SMTP id v13csp103903wru; Fri, 5 Jan 2024 07:45:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IHptNB/KMoP+rwX4+1yvpfka+dDDzDunCh4IFuTUFO6xfAPbiYRbwbK254bwXo6fr9Supwj X-Received: by 2002:a05:620a:4ad0:b0:781:706c:4e8b with SMTP id sq16-20020a05620a4ad000b00781706c4e8bmr2898007qkn.78.1704469519800; Fri, 05 Jan 2024 07:45:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704469519; cv=none; d=google.com; s=arc-20160816; b=hvTM20OHCF+2rjgW6USCGdER9tS48zQ7j/C0Q36t0QPbJpS+evOKFBJcM4ZtZ77cx8 kW2hE8WbEtWZmRKn0CBYqgUYhCHfH25Jbqjt47HANA0ihPBpNN2E776QAg7fkp5AspH0 VpxruifNfpNKK/Zd4fWV9OdTWXix4gsTrciRvG+jNgEH6YVU1imctHhurHjASxmUe7OK Icln+blRx1DsLfR82808edClG7aRkOTxTCjBsW8Tmalcb3vA5wCDw4FEFKK9de7FSDU8 8fYp+GUWVt+H0vROYAtqqKuweecRRxs37dRtyQ22CRYgEJ11c0mQ0kTpYgGnOiIH6bJs hlfA== 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=3F01YLhzgjTdtmytUy5rbru1eD+VsYVlRXqJFlFh/Hg=; fh=6oFdbfvy2CilAP0eadDcmbW+cZmCcVYrHTIFJj2TpHw=; b=AU5/Q9IJ0tXV6XOwMD452qb++hymYSKBwt45u3pb4mnBTYid+lJsMZAOzbfi2bnxAq SJXoUgBmPbeHF7++4wPBs/NCMkzttySx4TKqSgmgaa7/BPPjGgeMuIiUgQ9Ofp4Qf+dC QMV06K9LwAqubA+3aUAA0hnOlsMvFtUDfSAyYBf3740jrZgC6yc4pqb5vvLrt72lFPBm MdTNiukAYSQ985ja9JEWXhXWINtHIuRuCXPjsfdin+EIqnRQxOVNw0XYCojMZBbj1JTQ GdbyR3gRcqfD1J4Ps5RoEgI/CKdP6t5i4eCUa6yt+kxLWWORlRzB/0ATcb+CLL7TcD11 Pmhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DTGr9hZh; 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 v14-20020a0ce1ce000000b0067a9b3d05b8si2042375qvl.110.2024.01.05.07.45.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jan 2024 07:45:19 -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=DTGr9hZh; 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 1rLmN8-0006Ls-QX; Fri, 05 Jan 2024 10:44:34 -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 1rLmN7-0006Ca-8r for qemu-devel@nongnu.org; Fri, 05 Jan 2024 10:44:33 -0500 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rLmN3-0003JZ-Ds for qemu-devel@nongnu.org; Fri, 05 Jan 2024 10:44:33 -0500 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-33686649b72so1469411f8f.3 for ; Fri, 05 Jan 2024 07:44:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704469468; x=1705074268; 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=3F01YLhzgjTdtmytUy5rbru1eD+VsYVlRXqJFlFh/Hg=; b=DTGr9hZhGcXyItA9vjUOyMeef6a4deRm4PvKLmdkqvVLo5dIUmdsBNIeLo5GiLEvlA yhhnyjCuWApfTCU0EOFfPQegTY0Bp80Wd2xdRDjDCR/gmiWMMw9S4ujpGbmJG+aK7HYH hQ8xRgCXSRP+7yYh+ni8aNJm28sVXPXIHg2HJilj9y1LZbzQUJ06vXuMge1IPwX/4x61 xDHddJih7EkNZ7xb8Kd79m4dEfcZLGzbLIWvlsDjDYuRF72T9yDjwptWP7gl+wKlsFTC QMxEpwke8fUiNJ8q6uatKNyD8bashtpV58ZCf4IwBPiJX+uSrdAfriE3KWVs4nGBh7Vv wt/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704469468; x=1705074268; 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=3F01YLhzgjTdtmytUy5rbru1eD+VsYVlRXqJFlFh/Hg=; b=sJeFHKHlcVP493XwEMGpCU6EZrHV3Mv0JXTWcnaQbXiVa7pfzLBNmTNI73Y5ux9sYQ ww9CfMcDklQKXhRvQ9zFt6mUE59A9hW++yvhQt3dG4ejjSnnusAz8ztVEePXgVkJoUUJ vunxsgthe8B5kIFhtawFC7ue+rpEKuN9+wua/kDJyUmmya+b6AaG9IX6sd/y5wmD0M0c PN7YD4z7VmDp96i4wcAIGNrQEJw+JW3L0m/g6B/QSti5BJ7Aigp2oXiuvhvBWQyWe/RK dPTTAawr0MCosRGOPLo45pfdDr+0bftFG8jTV1varcu3bOvPwlLvkq9FFwm1GNkg4Jvy s+2Q== X-Gm-Message-State: AOJu0Yx5vMx3OPY+WdlwiqPLzxaNZKURxDixCS2Vayv5nM+F0muVjIeL c2VIEBRiLO+j33rMwEunb4m0WvJ7qcYcsuEA/y2fnVA7XoE= X-Received: by 2002:a5d:638d:0:b0:336:95d2:c649 with SMTP id p13-20020a5d638d000000b0033695d2c649mr1282677wru.125.1704469467904; Fri, 05 Jan 2024 07:44:27 -0800 (PST) Received: from m1x-phil.lan (juv34-h02-176-184-26-1.dsl.sta.abo.bbox.fr. [176.184.26.1]) by smtp.gmail.com with ESMTPSA id p17-20020a5d4e11000000b003365951cef9sm1605022wrt.55.2024.01.05.07.44.26 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 05 Jan 2024 07:44:27 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-riscv@nongnu.org, Gavin Shan , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Song Gao Subject: [PULL 13/71] target/loongarch: Use generic cpu_list() Date: Fri, 5 Jan 2024 16:42:06 +0100 Message-ID: <20240105154307.21385-14-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240105154307.21385-1-philmd@linaro.org> References: <20240105154307.21385-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=philmd@linaro.org; helo=mail-wr1-x436.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 From: Gavin Shan Before it's applied: [gshan@gshan q]$ ./build/qemu-system-loongarch64 -cpu ? la132-loongarch-cpu la464-loongarch-cpu max-loongarch-cpu After it's applied: [gshan@gshan q]$ ./build/qemu-system-loongarch64 -cpu ? Available CPUs: la132 la464 max Signed-off-by: Gavin Shan Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-ID: <20231114235628.534334-14-gshan@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- target/loongarch/cpu.h | 4 ---- target/loongarch/cpu.c | 15 --------------- 2 files changed, 19 deletions(-) diff --git a/target/loongarch/cpu.h b/target/loongarch/cpu.h index 00d1fba597..0c15a174e4 100644 --- a/target/loongarch/cpu.h +++ b/target/loongarch/cpu.h @@ -466,10 +466,6 @@ static inline void cpu_get_tb_cpu_state(CPULoongArchState *env, vaddr *pc, *flags |= is_va32(env) * HW_FLAGS_VA32; } -void loongarch_cpu_list(void); - -#define cpu_list loongarch_cpu_list - #include "exec/cpu-all.h" #define CPU_RESOLVING_TYPE TYPE_LOONGARCH_CPU diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c index 81f2d8d8ed..87dfcdb0a5 100644 --- a/target/loongarch/cpu.c +++ b/target/loongarch/cpu.c @@ -483,21 +483,6 @@ static void loongarch_max_initfn(Object *obj) loongarch_la464_initfn(obj); } -static void loongarch_cpu_list_entry(gpointer data, gpointer user_data) -{ - const char *typename = object_class_get_name(OBJECT_CLASS(data)); - - qemu_printf("%s\n", typename); -} - -void loongarch_cpu_list(void) -{ - GSList *list; - list = object_class_get_list_sorted(TYPE_LOONGARCH_CPU, false); - g_slist_foreach(list, loongarch_cpu_list_entry, NULL); - g_slist_free(list); -} - static void loongarch_cpu_reset_hold(Object *obj) { CPUState *cs = CPU(obj);