From patchwork Thu Jan 11 12:02:21 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: 761838 Delivered-To: patch@linaro.org Received: by 2002:a5d:6e02:0:b0:337:62d3:c6d5 with SMTP id h2csp2357118wrz; Thu, 11 Jan 2024 04:04:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IHD81jzdYnPAwzKhxIVX0DxE8ynphK3LMdVp1PpqGkrBZYacCJQitFt4wiKCoJOJUYtfkTy X-Received: by 2002:a25:ac88:0:b0:da0:5370:fdce with SMTP id x8-20020a25ac88000000b00da05370fdcemr1051813ybi.19.1704974683236; Thu, 11 Jan 2024 04:04:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704974683; cv=none; d=google.com; s=arc-20160816; b=bu2ikp316BNPdlt009w+vgfx206YwQBjRjMe+m5WnQsztu+u0TCMV1cwT35wCShH4U zkoTJZbK3ZpU6kANMF8kpG3kinxf58mMGtZIo+okKVjVKD3XKRswSKFfq94/8mJ+op5p 92Aj7vuq3tJ4TD/AfAlQiYz25B0tgbBJxjaQqwS9iu5uoQDeg/pF6Z0C/+E+B3pzW8EC LnqMtwRhNGt8evBDi29d5w9I97K49Aljlk0eT6uIV8foK++ZnzbRcrGItu77ZcAtQ6ZN Ihb6y2IUBPXSzMYvl6SX5RRTMv00y2afhl42/GRWdy9Gy9RM4KS2uWJCvKVxy71nLt0e CHPQ== 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=c3GnBwtsWZjmvkynj7oUUXZs0ui1nia9dU8ifkh5Y4E=; fh=y6r03noUWfICwPfR8EsTiKAurGXRKk6addDWsOQRxKo=; b=t2kVkcRYC2yt8VzQvwapLmsh3ki3IXhCnxjh0GWMMgEfhPQNgsfeDnOnN8CtX7pDLC VIlLi3BBjWErrMXkgTZBFuP0VAoSffbJv3n0wK6vr/yygJWRXPbwQa+ke4Pji0Gn7qLd DIqyiXNDZ3cvmDZA/D9rKP+0271SwA97NHnsGtmIeKnIONNE4BkfRvU8JxQMzOHQThub vJauitcs0jqbMzRYxxcwa1qv4pdU2sKcCHy6lBgkhhPlFLhj3CSXfKRFY2AVBqD2AP19 /3Pkh3Rw9PxGSPpNscjxJaGzGOoCpkLJBnz9DhmBl5q7xZDPLHW8mRuxMUUTvhBEN9qJ 0+LA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LS7arI4D; 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 d22-20020a05610231b600b00466dd96e9ddsi44749vsh.275.2024.01.11.04.04.42 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 11 Jan 2024 04:04:43 -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=LS7arI4D; 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 1rNtmz-0003RI-M8; Thu, 11 Jan 2024 07:04:01 -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 1rNtm8-0002tu-JH for qemu-devel@nongnu.org; Thu, 11 Jan 2024 07:03:10 -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 1rNtm2-0007NZ-9c for qemu-devel@nongnu.org; Thu, 11 Jan 2024 07:03:05 -0500 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-3368ac0f74dso3652125f8f.0 for ; Thu, 11 Jan 2024 04:03:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704974579; x=1705579379; 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=c3GnBwtsWZjmvkynj7oUUXZs0ui1nia9dU8ifkh5Y4E=; b=LS7arI4DLSdd0rFkc+l/YR82iFnHs6UWVxJBPyDY7qNtU+pwJb4vVb0zl8xx0L4dUd K+78UT62cBthZ3mhKAsByh2kpxJn1mJoR8fzZ6tNP+pyj/DuQdynM4MGVg+QxIQ187fc XUtVtyt6euO/AH0Bi/NJ/YQlR+8WZ9mIiD/OKtFemuNJl1zrphvuPgdfaA18H+xwquPs fxLy9MaJKA0gXZixaKBcghQT5POJhnwY/qLjglHBbFVQL0n7yrdstwKKSTMP3aNNTXL0 EKFBHBrIMW17COSdS7wQI1TiUzi04Judo1LlmehMJLstap9vgJSt2RsjmsfQhq4+nMIM Ochg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704974579; x=1705579379; 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=c3GnBwtsWZjmvkynj7oUUXZs0ui1nia9dU8ifkh5Y4E=; b=Sxs+6PGTUt623lSBoqQSX9+Zr/NaXA7SJfh+HIhCIhvLZweWP3SnalkTvPPDJusNED KNfuiXvNnehTv9ZLGY/u5ZA5+gnXtbcUt0BOmuIOd63fIFMN0WZPIFKLI+jaPsQ/z8IB e8Hm5qWgToyoO/1o8hLM5ziFiHHk0OCYzimLv0kGCrqpe0e2Yr/KbYSxrXxef8fjPUzD Ep8YJPYWRpApcJNZTMd7KvF82S5CI8L3NmI97VQKTE1/KCjDzIDMJsRnWz9I7ivKQO+/ DJjGfm7bBWyUMnrYr/IGNJMoDavmD/jFTHbgRZUueqDYfxe9UlqiQXGnsw/0uuGwXoSm 8bPg== X-Gm-Message-State: AOJu0Yz2tTyV+jGnRiU903Z/wEOAPZn+2CKlyfcOBekSj80FtAiztvtW 8W8GjEPmQQGsgKDOEuXD5Z0bjGxlyLAwGpyWHEsRvFtemtNsnw== X-Received: by 2002:adf:ed12:0:b0:337:628f:55a1 with SMTP id a18-20020adfed12000000b00337628f55a1mr537162wro.78.1704974578904; Thu, 11 Jan 2024 04:02:58 -0800 (PST) Received: from m1x-phil.lan (vau06-h02-176-184-43-236.dsl.sta.abo.bbox.fr. [176.184.43.236]) by smtp.gmail.com with ESMTPSA id z11-20020a5d44cb000000b00336898daceasm1048278wrr.96.2024.01.11.04.02.56 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 11 Jan 2024 04:02:58 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Weiwei Li , Alistair Francis , qemu-s390x@nongnu.org, Michael Tokarev , David Hildenbrand , Christian Borntraeger , qemu-riscv@nongnu.org, Palmer Dabbelt , Bin Meng , qemu-trivial@nongnu.org, Halil Pasic , Paolo Bonzini , Ilya Leoshkevich , Eduardo Habkost , Laurent Vivier , Liu Zhiwei , Eric Farman , Thomas Huth , Daniel Henrique Barboza , =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= Subject: [PATCH 5/5] target/riscv: Rename tcg_cpu_FOO() to include 'riscv' Date: Thu, 11 Jan 2024 13:02:21 +0100 Message-ID: <20240111120221.35072-6-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240111120221.35072-1-philmd@linaro.org> References: <20240111120221.35072-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 The tcg_cpu_FOO() names are riscv specific, so rename them as riscv_tcg_cpu_FOO() (as other names in this file) to ease navigating the code. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel Henrique Barboza Reviewed-by: Alistair Francis --- target/riscv/tcg/tcg-cpu.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/target/riscv/tcg/tcg-cpu.c b/target/riscv/tcg/tcg-cpu.c index 14133ff665..994ca1cdf9 100644 --- a/target/riscv/tcg/tcg-cpu.c +++ b/target/riscv/tcg/tcg-cpu.c @@ -929,7 +929,7 @@ static bool riscv_cpu_is_vendor(Object *cpu_obj) * -> cpu_exec_realizefn() * -> tcg_cpu_realize() (via accel_cpu_common_realize()) */ -static bool tcg_cpu_realize(CPUState *cs, Error **errp) +static bool riscv_tcg_cpu_realize(CPUState *cs, Error **errp) { RISCVCPU *cpu = RISCV_CPU(cs); Error *local_err = NULL; @@ -1372,7 +1372,7 @@ static bool riscv_cpu_has_max_extensions(Object *cpu_obj) return object_dynamic_cast(cpu_obj, TYPE_RISCV_CPU_MAX) != NULL; } -static void tcg_cpu_instance_init(CPUState *cs) +static void riscv_tcg_cpu_instance_init(CPUState *cs) { RISCVCPU *cpu = RISCV_CPU(cs); Object *obj = OBJECT(cpu); @@ -1386,7 +1386,7 @@ static void tcg_cpu_instance_init(CPUState *cs) } } -static void tcg_cpu_init_ops(AccelCPUClass *accel_cpu, CPUClass *cc) +static void riscv_tcg_cpu_init_ops(AccelCPUClass *accel_cpu, CPUClass *cc) { /* * All cpus use the same set of operations. @@ -1394,30 +1394,30 @@ static void tcg_cpu_init_ops(AccelCPUClass *accel_cpu, CPUClass *cc) cc->tcg_ops = &riscv_tcg_ops; } -static void tcg_cpu_class_init(CPUClass *cc) +static void riscv_tcg_cpu_class_init(CPUClass *cc) { - cc->init_accel_cpu = tcg_cpu_init_ops; + cc->init_accel_cpu = riscv_tcg_cpu_init_ops; } -static void tcg_cpu_accel_class_init(ObjectClass *oc, void *data) +static void riscv_tcg_cpu_accel_class_init(ObjectClass *oc, void *data) { AccelCPUClass *acc = ACCEL_CPU_CLASS(oc); - acc->cpu_class_init = tcg_cpu_class_init; - acc->cpu_instance_init = tcg_cpu_instance_init; - acc->cpu_target_realize = tcg_cpu_realize; + acc->cpu_class_init = riscv_tcg_cpu_class_init; + acc->cpu_instance_init = riscv_tcg_cpu_instance_init; + acc->cpu_target_realize = riscv_tcg_cpu_realize; } -static const TypeInfo tcg_cpu_accel_type_info = { +static const TypeInfo riscv_tcg_cpu_accel_type_info = { .name = ACCEL_CPU_NAME("tcg"), .parent = TYPE_ACCEL_CPU, - .class_init = tcg_cpu_accel_class_init, + .class_init = riscv_tcg_cpu_accel_class_init, .abstract = true, }; -static void tcg_cpu_accel_register_types(void) +static void riscv_tcg_cpu_accel_register_types(void) { - type_register_static(&tcg_cpu_accel_type_info); + type_register_static(&riscv_tcg_cpu_accel_type_info); } -type_init(tcg_cpu_accel_register_types); +type_init(riscv_tcg_cpu_accel_register_types);