mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
cpu: Introduce X86CPUTopoInfo structure for argument simplification
In order to simplify arguments of function, introduce a new struct named X86CPUTopoInfo. Signed-off-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com> Signed-off-by: Zhu Guihua <zhugh.fnst@cn.fujitsu.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
c0b520dfb8
commit
ed256144cd
2 changed files with 20 additions and 19 deletions
|
@ -1935,10 +1935,10 @@ static void pc_machine_initfn(Object *obj)
|
|||
|
||||
static unsigned pc_cpu_index_to_socket_id(unsigned cpu_index)
|
||||
{
|
||||
unsigned pkg_id, core_id, smt_id;
|
||||
X86CPUTopoInfo topo;
|
||||
x86_topo_ids_from_idx(smp_cores, smp_threads, cpu_index,
|
||||
&pkg_id, &core_id, &smt_id);
|
||||
return pkg_id;
|
||||
&topo);
|
||||
return topo.pkg_id;
|
||||
}
|
||||
|
||||
static void pc_machine_class_init(ObjectClass *oc, void *data)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue