From patchwork Thu Jan 11 12:02:20 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: 761839 Delivered-To: patch@linaro.org Received: by 2002:a5d:6e02:0:b0:337:62d3:c6d5 with SMTP id h2csp2357122wrz; Thu, 11 Jan 2024 04:04:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IGwS9U/lE2tnLm2VxqJ8NBNw2P9jz/8voSWS0xg88w51v35yuXsvydqw8+UcX6bKJXKGLhk X-Received: by 2002:a05:6214:f2b:b0:680:cc64:5e6b with SMTP id iw11-20020a0562140f2b00b00680cc645e6bmr1233864qvb.3.1704974683807; 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=LSquC75vLv7XJbFAnXJ4rGM4/d8tUXpXz6zxaK10mXUFqBABDOuBm/c2dVGYQPBcDV ykpuy/CnGMB8jI9ilnYPECkD7WfJVYjPC0CiXq8f8pSlDiA6ws4vRYDXrlQfRyFaZ+Z8 ctnTmX1BEYQKmXfqNllFlEP4jsx+gog/+6HnavsCdG8ZLVkTebuV+yZTKEskIe+UC1La YeL4qbIrspREOTQxOgVm6cyuy/vaQuwxNtxi7csZB3YtIZtCbmYOaAzpVxwQzhyvGZbq 40++tj/XowlJC92EWs+xzCZfTwuZsVJ4OGGODq7AsHWNMKqiyJIbg7KnVUcMUjo71Uut KeGA== 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=pZ+Rk66u59cimifcoy3fRichLBCz2Ca8YjXNADwDWao=; fh=y6r03noUWfICwPfR8EsTiKAurGXRKk6addDWsOQRxKo=; b=D+sMOuzYwO7RlrodIDb/PHkulTNI4Cv9x4tItuITcvCNHT+UABHy8p8vvmaaZAJjBR nnhGRICKvZ3fz/YwEnz9BYlPANDrgnC97vIQaBj0lbovQJTH49NlTw+JWBfLgfQaYWMb TAjPMXQsgrRbajUy+gl/+IFwxrMg3sgDBaaVKFU8D9gTvQd4UUQRVXe/B2UQmzHSxALq YNf1d93ZfdFtLPBZTU6I2fwgS+nPOSfdpqos8qEGJN/Sayek3+JDmKOnBRQ76bZ4FILQ PXwXXcV81oRBUlcBhd7gG3jfABBhJlPlOLi0QSPDV2Uq9JtUCKO4xG+udy+7lKefAouV HK8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UJSH7zge; 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 n17-20020a0cdc91000000b0067f93134e9fsi635308qvk.446.2024.01.11.04.04.43 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=UJSH7zge; 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 1rNtmQ-0002yC-W9; Thu, 11 Jan 2024 07:03:27 -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 1rNtm3-0002pw-Qx for qemu-devel@nongnu.org; Thu, 11 Jan 2024 07:03:05 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rNtlx-0007Lz-Fe for qemu-devel@nongnu.org; Thu, 11 Jan 2024 07:03:00 -0500 Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-3368ac0f74dso3652047f8f.0 for ; Thu, 11 Jan 2024 04:02:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704974572; x=1705579372; 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=pZ+Rk66u59cimifcoy3fRichLBCz2Ca8YjXNADwDWao=; b=UJSH7zgeVXaBghWOpUxn5/HMliyj6vWy/9Fax/5Z4VyVUWVoCjAWRtDwL7fOCGAWtr TPyc4E+AzEr401hL3gQ6RcTongOxYITnUNPdB8sN3yOYHEcoGjD7E0muUuvLYzlVrzkv 2zpeGV+6AvKPcboJB495bUAZ5EJQndkusTyBjrgZ4U8fNoW4AJ0dJWaiGEW6M2J45985 U0HvhUFoYoTMelydsSkw1D7Y7BiHx4TRtfj2Zc9y0bOPWNKpVjfET6HCzRQhf5WuZfCx 6tgle1XAUITWKMOnsEFS3CB7Prscv35WKwDLfsmEMY4FfSbAIDSpbtLRN3Ozy/T4RUbc 6ymQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704974572; x=1705579372; 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=pZ+Rk66u59cimifcoy3fRichLBCz2Ca8YjXNADwDWao=; b=M56twew4CS1f6uWATwsSKIKN/nAXWDMNz4RrQE13evpJlLyBunFQJhN3u01a0vPFUw 591Bfpw12ZjILUN23KWZoZWUUZiYCvhGJVmXeNv9b1b+y6eEVtN8cDi3ucwc/5OZlZob KuIdBtFhHktO+NnxeNqCyH/Rshp+uizzRWEBOzpX6jKvNqZ1Lg30/UzX9VvsrawCx7Ur qI/K8tjE2vhP7KYyyTp6nQul7rdLrj6GV3YEXPUZUw5SeQSjwGhasoxU+dsqOL/PCt+i dfgOE3hDvyZDYhuSHCmE77Wdva7E1dlwmX5k8KbhPOcmn58Yt81v21qTDOttrj4dlBsm p9Lg== X-Gm-Message-State: AOJu0YzFp2zoJ3pWOMCu40JYVzo9vWrMfl3ZYwGENSqUThk84a5zINcO MAQ/STB2Y6nU01k2lR2gqUDkSkvj1cxr5p3NCujpe6yljyTGSQ== X-Received: by 2002:a05:6000:507:b0:336:8ddc:a470 with SMTP id a7-20020a056000050700b003368ddca470mr686899wrf.43.1704974572389; Thu, 11 Jan 2024 04:02:52 -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 d15-20020adf9c8f000000b00336c43b366fsm1082920wre.12.2024.01.11.04.02.50 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 11 Jan 2024 04:02:51 -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 4/5] target/i386: Rename tcg_cpu_FOO() to include 'x86' Date: Thu, 11 Jan 2024 13:02:20 +0100 Message-ID: <20240111120221.35072-5-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::431; envelope-from=philmd@linaro.org; helo=mail-wr1-x431.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 x86 specific, so rename them as x86_tcg_cpu_FOO() (as other names in this file) to ease navigating the code. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Michael Tokarev --- target/i386/tcg/tcg-cpu.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/target/i386/tcg/tcg-cpu.c b/target/i386/tcg/tcg-cpu.c index 6e881e9e27..e56489caea 100644 --- a/target/i386/tcg/tcg-cpu.c +++ b/target/i386/tcg/tcg-cpu.c @@ -114,18 +114,18 @@ static const struct TCGCPUOps x86_tcg_ops = { #endif /* !CONFIG_USER_ONLY */ }; -static void tcg_cpu_init_ops(AccelCPUClass *accel_cpu, CPUClass *cc) +static void x86_tcg_cpu_init_ops(AccelCPUClass *accel_cpu, CPUClass *cc) { /* for x86, all cpus use the same set of operations */ cc->tcg_ops = &x86_tcg_ops; } -static void tcg_cpu_class_init(CPUClass *cc) +static void x86_tcg_cpu_class_init(CPUClass *cc) { - cc->init_accel_cpu = tcg_cpu_init_ops; + cc->init_accel_cpu = x86_tcg_cpu_init_ops; } -static void tcg_cpu_xsave_init(void) +static void x86_tcg_cpu_xsave_init(void) { #define XO(bit, field) \ x86_ext_save_areas[bit].offset = offsetof(X86XSaveArea, field); @@ -147,25 +147,25 @@ static void tcg_cpu_xsave_init(void) * TCG-specific defaults that override cpudef models when using TCG. * Only for builtin_x86_defs models initialized with x86_register_cpudef_types. */ -static PropValue tcg_default_props[] = { +static PropValue x86_tcg_default_props[] = { { "vme", "off" }, { NULL, NULL }, }; -static void tcg_cpu_instance_init(CPUState *cs) +static void x86_tcg_cpu_instance_init(CPUState *cs) { X86CPU *cpu = X86_CPU(cs); X86CPUClass *xcc = X86_CPU_GET_CLASS(cpu); if (xcc->model) { /* Special cases not set in the X86CPUDefinition structs: */ - x86_cpu_apply_props(cpu, tcg_default_props); + x86_cpu_apply_props(cpu, x86_tcg_default_props); } - tcg_cpu_xsave_init(); + x86_tcg_cpu_xsave_init(); } -static void tcg_cpu_accel_class_init(ObjectClass *oc, void *data) +static void x86_tcg_cpu_accel_class_init(ObjectClass *oc, void *data) { AccelCPUClass *acc = ACCEL_CPU_CLASS(oc); @@ -173,18 +173,18 @@ static void tcg_cpu_accel_class_init(ObjectClass *oc, void *data) acc->cpu_target_realize = tcg_cpu_realizefn; #endif /* CONFIG_USER_ONLY */ - acc->cpu_class_init = tcg_cpu_class_init; - acc->cpu_instance_init = tcg_cpu_instance_init; + acc->cpu_class_init = x86_tcg_cpu_class_init; + acc->cpu_instance_init = x86_tcg_cpu_instance_init; } -static const TypeInfo tcg_cpu_accel_type_info = { +static const TypeInfo x86_tcg_cpu_accel_type_info = { .name = ACCEL_CPU_NAME("tcg"), .parent = TYPE_ACCEL_CPU, - .class_init = tcg_cpu_accel_class_init, + .class_init = x86_tcg_cpu_accel_class_init, .abstract = true, }; -static void tcg_cpu_accel_register_types(void) +static void x86_tcg_cpu_accel_register_types(void) { - type_register_static(&tcg_cpu_accel_type_info); + type_register_static(&x86_tcg_cpu_accel_type_info); } -type_init(tcg_cpu_accel_register_types); +type_init(x86_tcg_cpu_accel_register_types);