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: 714681 Delivered-To: patch@linaro.org Received: by 2002:a5d:484e:0:b0:317:ecd7:513f with SMTP id n14csp632582wrs; Fri, 18 Aug 2023 10:21:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEtrzkAAd2IV4AHparP9/NGPii0hY6x7Y+ZoLG8Ke1hmjSglpVlTgk5HF/mN6gTmjhDqv5y X-Received: by 2002:a05:622a:c1:b0:406:9466:6962 with SMTP id p1-20020a05622a00c100b0040694666962mr4926221qtw.61.1692379295339; Fri, 18 Aug 2023 10:21:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692379295; cv=none; d=google.com; s=arc-20160816; b=Nku7fnVGrM7VqLsecNsp8qGOLubQnNPWNvPtoKSMMPVn2JVP43a1BOhSMkdaOhmckN y0YSJSd9t0MPn6BpKDJodDHedU7+7Su+548LG3uEQI1Gyr0Vbs1xU58oadB2qL7+sPJF smfRibziY2spjKKnrUB8wvbAtPgLmaNmpzVRxGHy7Yu4mkqHsICQ7zUo9/LU3Mh+FVgC 6dD8a7WlH7cqZJSDOeJp8hiSJgb/Spgy9vSdr7HaSKnfD+uUnRws6Pm9LMuRF7mU/kjE bEbWZ4e977KcVU9KxfWXk0J2FgSxLYpU1F6llyotQeQv3jxmNkTNzqPBCdHafI24BoKm QOXQ== 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=uEMElgMvR1O3ZuyrTpBd0rfdnbX1M9RkvLN7Ub/Z4Dw=; fh=r/JHKP8J9R2uTR7nHOCSLBWmfdDcyFCnoeAYTYM6zJY=; b=rvQe7WgsT/jaVfJRG2Kwc40gfLYRdyBD2kryQquwbI84FbAagMJueRilrWuQDCwm1g NT1b3N3QbKLDBGHkw9zvmTV1DTDtw5lqRH/iF02b65eYDXcxweQAY+UbL5jU5l2mvv8P hac/Pz8LElpX+y8i41DOxfOag+ub6VrzohyzkQ5Yb1he6sSR7ke/M5URww5Tk1vOfxqm /zHvMPvLCXXEww9vJk/gB2fOfmJauwajgQyXCHfEFdJYNG4SYFmOaBXmEdRmnuJKKfiV jFa+P9lxMGeQ76VB1QEB/uNRip1m5rp/23NTdr10DS5spYE209mYrOUQiTNouRH7vy7H qOEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MuRNZy5W; 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 c8-20020a05622a024800b004037cd9bd51si1500214qtx.46.2023.08.18.10.21.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 18 Aug 2023 10:21:35 -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=MuRNZy5W; 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 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-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.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,