diff mbox series

[RFC,33/52] i386: Rename init_topo_info() to init_apic_topo_info()

Message ID 20230213095035.158240-34-zhao1.liu@linux.intel.com
State New
Headers show
Series Introduce hybrid CPU topology | expand

Commit Message

Zhao Liu Feb. 13, 2023, 9:50 a.m. UTC
From: Zhao Liu <zhao1.liu@intel.com>

Rename init_topo_info() to init_apic_topo_info() to adapt
X86ApicidTopoInfo.

Co-Developed-by: Zhuocheng Ding <zhuocheng.ding@intel.com>
Signed-off-by: Zhuocheng Ding <zhuocheng.ding@intel.com>
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
---
 hw/i386/x86.c         | 12 ++++++------
 include/hw/i386/x86.h |  3 ++-
 2 files changed, 8 insertions(+), 7 deletions(-)

Comments

Philippe Mathieu-Daudé Feb. 13, 2023, 1:27 p.m. UTC | #1
On 13/2/23 10:50, Zhao Liu wrote:
> From: Zhao Liu <zhao1.liu@intel.com>
> 
> Rename init_topo_info() to init_apic_topo_info() to adapt
> X86ApicidTopoInfo.
> 
> Co-Developed-by: Zhuocheng Ding <zhuocheng.ding@intel.com>
> Signed-off-by: Zhuocheng Ding <zhuocheng.ding@intel.com>
> Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
> ---
>   hw/i386/x86.c         | 12 ++++++------
>   include/hw/i386/x86.h |  3 ++-
>   2 files changed, 8 insertions(+), 7 deletions(-)


> diff --git a/include/hw/i386/x86.h b/include/hw/i386/x86.h
> index ac6f1e4a74af..d84f7717900c 100644
> --- a/include/hw/i386/x86.h
> +++ b/include/hw/i386/x86.h
> @@ -98,7 +98,8 @@ struct X86MachineState {
>   #define TYPE_X86_MACHINE   MACHINE_TYPE_NAME("x86")
>   OBJECT_DECLARE_TYPE(X86MachineState, X86MachineClass, X86_MACHINE)
>   
> -void init_topo_info(X86ApicidTopoInfo *topo_info, const X86MachineState *x86ms);
> +void init_apicid_topo_info(X86ApicidTopoInfo *topo_info,
> +                           const X86MachineState *x86ms);

Maybe s/init_apicid_topo_info/init_apic_topo_info/?

Otherwise,

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Zhao Liu Feb. 14, 2023, 10:20 a.m. UTC | #2
On Mon, Feb 13, 2023 at 02:27:18PM +0100, Philippe Mathieu-Daudé wrote:
> Date: Mon, 13 Feb 2023 14:27:18 +0100
> From: Philippe Mathieu-Daudé <philmd@linaro.org>
> Subject: Re: [RFC 33/52] i386: Rename init_topo_info() to
>  init_apic_topo_info()
> 
> On 13/2/23 10:50, Zhao Liu wrote:
> > From: Zhao Liu <zhao1.liu@intel.com>
> > 
> > Rename init_topo_info() to init_apic_topo_info() to adapt
> > X86ApicidTopoInfo.
> > 
> > Co-Developed-by: Zhuocheng Ding <zhuocheng.ding@intel.com>
> > Signed-off-by: Zhuocheng Ding <zhuocheng.ding@intel.com>
> > Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
> > ---
> >   hw/i386/x86.c         | 12 ++++++------
> >   include/hw/i386/x86.h |  3 ++-
> >   2 files changed, 8 insertions(+), 7 deletions(-)
> 
> 
> > diff --git a/include/hw/i386/x86.h b/include/hw/i386/x86.h
> > index ac6f1e4a74af..d84f7717900c 100644
> > --- a/include/hw/i386/x86.h
> > +++ b/include/hw/i386/x86.h
> > @@ -98,7 +98,8 @@ struct X86MachineState {
> >   #define TYPE_X86_MACHINE   MACHINE_TYPE_NAME("x86")
> >   OBJECT_DECLARE_TYPE(X86MachineState, X86MachineClass, X86_MACHINE)
> > -void init_topo_info(X86ApicidTopoInfo *topo_info, const X86MachineState *x86ms);
> > +void init_apicid_topo_info(X86ApicidTopoInfo *topo_info,
> > +                           const X86MachineState *x86ms);
> 
> Maybe s/init_apicid_topo_info/init_apic_topo_info/?
> 
> Otherwise,
> 
> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> 
Will remove the "id" suffix. Thanks!

Zhao
diff mbox series

Patch

diff --git a/hw/i386/x86.c b/hw/i386/x86.c
index f20b0c3a5f12..a13c931df062 100644
--- a/hw/i386/x86.c
+++ b/hw/i386/x86.c
@@ -65,8 +65,8 @@ 
 /* Physical Address of PVH entry point read from kernel ELF NOTE */
 static size_t pvh_start_addr;
 
-inline void init_topo_info(X86ApicidTopoInfo *topo_info,
-                           const X86MachineState *x86ms)
+inline void init_apicid_topo_info(X86ApicidTopoInfo *topo_info,
+                                  const X86MachineState *x86ms)
 {
     MachineState *ms = MACHINE(x86ms);
 
@@ -89,7 +89,7 @@  uint32_t x86_cpu_apic_id_from_index(X86MachineState *x86ms,
 {
     X86ApicidTopoInfo topo_info;
 
-    init_topo_info(&topo_info, x86ms);
+    init_apicid_topo_info(&topo_info, x86ms);
 
     return x86_apicid_from_cpu_idx(&topo_info, cpu_index);
 }
@@ -301,7 +301,7 @@  void x86_cpu_pre_plug(HotplugHandler *hotplug_dev,
         }
     }
 
-    init_topo_info(&topo_info, x86ms);
+    init_apicid_topo_info(&topo_info, x86ms);
 
     /*
      * If APIC ID is not set,
@@ -483,7 +483,7 @@  int64_t x86_get_default_cpu_node_id(const MachineState *ms, int idx)
    X86MachineState *x86ms = X86_MACHINE(ms);
    X86ApicidTopoInfo topo_info;
 
-   init_topo_info(&topo_info, x86ms);
+   init_apicid_topo_info(&topo_info, x86ms);
 
    assert(idx < ms->possible_cpus->len);
    x86_topo_ids_from_apicid(ms->possible_cpus->cpus[idx].arch_id,
@@ -511,7 +511,7 @@  const CPUArchIdList *x86_possible_cpu_arch_ids(MachineState *ms)
                                   sizeof(CPUArchId) * max_cpus);
     ms->possible_cpus->len = max_cpus;
 
-    init_topo_info(&topo_info, x86ms);
+    init_apicid_topo_info(&topo_info, x86ms);
 
     for (i = 0; i < ms->possible_cpus->len; i++) {
         X86CPUTopoIDs topo_ids;
diff --git a/include/hw/i386/x86.h b/include/hw/i386/x86.h
index ac6f1e4a74af..d84f7717900c 100644
--- a/include/hw/i386/x86.h
+++ b/include/hw/i386/x86.h
@@ -98,7 +98,8 @@  struct X86MachineState {
 #define TYPE_X86_MACHINE   MACHINE_TYPE_NAME("x86")
 OBJECT_DECLARE_TYPE(X86MachineState, X86MachineClass, X86_MACHINE)
 
-void init_topo_info(X86ApicidTopoInfo *topo_info, const X86MachineState *x86ms);
+void init_apicid_topo_info(X86ApicidTopoInfo *topo_info,
+                           const X86MachineState *x86ms);
 
 uint32_t x86_cpu_apic_id_from_index(X86MachineState *pcms,
                                     unsigned int cpu_index);