diff mbox series

[4/5] target/i386: Rename tcg_cpu_FOO() to include 'x86'

Message ID 20240111120221.35072-5-philmd@linaro.org
State Superseded
Headers show
Series misc: Trivial code rename cleanup | expand

Commit Message

Philippe Mathieu-Daudé Jan. 11, 2024, 12:02 p.m. UTC
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é <philmd@linaro.org>
---
 target/i386/tcg/tcg-cpu.c | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

Comments

Michael Tokarev Jan. 11, 2024, 7:53 p.m. UTC | #1
11.01.2024 15:02, Philippe Mathieu-Daudé :
> 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.

Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>

Wow, that's a large list of recipients..

> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   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);
diff mbox series

Patch

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);