From patchwork Fri Aug 18 17:20:15 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: 1823091 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=MuRNZy5W; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RS7vj04sfz26jN for ; Sat, 19 Aug 2023 03:21:37 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qX39u-0007LR-EI; Fri, 18 Aug 2023 13:21:14 -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 1qX39o-0006dY-Nt for qemu-devel@nongnu.org; Fri, 18 Aug 2023 13:21:08 -0400 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qX39m-0001u6-DL for qemu-devel@nongnu.org; Fri, 18 Aug 2023 13:21:08 -0400 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-99d90ffed68so479432266b.0 for ; Fri, 18 Aug 2023 10:21:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1692379265; x=1692984065; 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=uEMElgMvR1O3ZuyrTpBd0rfdnbX1M9RkvLN7Ub/Z4Dw=; b=MuRNZy5Wj9JU8nMw9ACBoTqf4tCv1Sl/DlN5qy6tgakiWAxwj1ST0ZH6Rgx+oUY4r9 JlInG3SlRt53sUpL/jFfOptGIiIgdXjbZSJ/WZI485yZjfTs6jeoY4dBuq9XUt60Qyu6 P4OwEO1EmnPCxlFvBBaNoMUZMnyfmQUScb6+n9BVOzZd9T8QQmN4kD9iUqim8dOtJh9n bM6VgPfxzAGfO2ZVM3mxMEq9axPd77kyz3XOd+IBeWKISeVJPARBetDXL2Jl006MND35 y48GLYskOJNDoF+VLQjp62AJTQWN+vfTkeDng6FhEtw4hhC0u2SRtae0uD9we14UBYda 1GvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692379265; x=1692984065; 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=uEMElgMvR1O3ZuyrTpBd0rfdnbX1M9RkvLN7Ub/Z4Dw=; b=B1ByX1F3Up5FwN3V7PWD+kgWLLIr0DfZqMSw/gtdRCQnBu2M2FBSMQHdirXxy4DQDK sU0AUwWzUes5T+zfn+RH3fjEhLLv5GrSy7DEYPZIJtQROE6zW7inHoKzRfGVvFeP60Jg x+xgB2s2qHg3c3VC9DKVMRDK+zLf9N+iHPs6JPHUXB9B0sxnJg2411YpO1WshXZlbkmu bBfL6KHUVqcLJpgg0Y0Ije4VNl3MzthoTz5W2aPIqz+8xi8aR89lrLCXRa/Hc73K2Qpe XNeY3te16XRtUbK/jvO6v+mZN4EGUa+bYKI7fwo/goXmOk3y8+0Nd+Ka/jNN8PvAFeAh 5MfQ== X-Gm-Message-State: AOJu0YwsDmharJPbk4n2Dz00DIhw6P0oS3UwCDSe4QUH4No67DRg677d 9NKxwx1UojUNOx9ZGYj84VSgRA0RiV4miAmuxDs= X-Google-Smtp-Source: AGHT+IFfivwRxuLAN1HQuB3QQYL0Ca8mPGPEDObH+BVRtXkPgGa40G63gWKQCvJG8k5r3dC/pEBADw== X-Received: by 2002:a17:906:5195:b0:997:e9a3:9c4f with SMTP id y21-20020a170906519500b00997e9a39c4fmr3658167ejk.30.1692379264879; Fri, 18 Aug 2023 10:21:04 -0700 (PDT) Received: from m1x-phil.lan (cnf78-h01-176-184-27-79.dsl.sta.abo.bbox.fr. [176.184.27.79]) by smtp.gmail.com with ESMTPSA id yy10-20020a170906dc0a00b0099d02ca4327sm1411861ejb.54.2023.08.18.10.21.03 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 18 Aug 2023 10:21:04 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Huacai Chen , Xiaojuan Yang , =?utf-8?q?Alex_Benn=C3=A9e?= , Jiajie Chen , Song Gao , Richard Henderson Subject: [PATCH v2 7/8] target/loongarch: Add new object class for loongarch32 cpus Date: Fri, 18 Aug 2023 19:20:15 +0200 Message-ID: <20230818172016.24504-8-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230818172016.24504-1-philmd@linaro.org> References: <20230818172016.24504-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=philmd@linaro.org; helo=mail-ej1-x62f.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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Jiajie Chen Add object class stub for future loongarch32 cpus. Signed-off-by: Jiajie Chen Reviewed-by: Richard Henderson Signed-off-by: Song Gao Message-ID: <20230817093121.1053890-3-gaosong@loongson.cn> [Rebased on TYPE_LOONGARCH64_CPU introduction] Signed-off-by: Philippe Mathieu-Daudé --- target/loongarch/cpu.h | 1 + target/loongarch/cpu.c | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/target/loongarch/cpu.h b/target/loongarch/cpu.h index 3235ad081f..b8af491041 100644 --- a/target/loongarch/cpu.h +++ b/target/loongarch/cpu.h @@ -382,6 +382,7 @@ struct ArchCPU { }; #define TYPE_LOONGARCH_CPU "loongarch-cpu" +#define TYPE_LOONGARCH32_CPU "loongarch32-cpu" #define TYPE_LOONGARCH64_CPU "loongarch64-cpu" OBJECT_DECLARE_CPU_TYPE(LoongArchCPU, LoongArchCPUClass, diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c index 356d039560..5082506f10 100644 --- a/target/loongarch/cpu.c +++ b/target/loongarch/cpu.c @@ -726,6 +726,10 @@ static void loongarch_cpu_class_init(ObjectClass *c, void *data) #endif } +static void loongarch32_cpu_class_init(ObjectClass *c, void *data) +{ +} + static gchar *loongarch64_gdb_arch_name(CPUState *cs) { return g_strdup("loongarch64"); @@ -758,6 +762,13 @@ static const TypeInfo loongarch_cpu_type_infos[] = { .class_size = sizeof(LoongArchCPUClass), .class_init = loongarch_cpu_class_init, }, + { + .name = TYPE_LOONGARCH32_CPU, + .parent = TYPE_LOONGARCH_CPU, + + .abstract = true, + .class_init = loongarch32_cpu_class_init, + }, { .name = TYPE_LOONGARCH64_CPU, .parent = TYPE_LOONGARCH_CPU,