diff options
author | Chen Fan <chen.fan.fnst@cn.fujitsu.com> | 2015-08-21 17:34:45 +0800 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2015-10-02 16:22:01 -0300 |
commit | ed256144cd6f0ca2ff59fc3fc8dca547506f433b (patch) | |
tree | d36d6a8aaf7e0c3f629da7ba2533aca046b18e2d /hw | |
parent | c0b520dfb8890294a9f8879f4759172900585995 (diff) |
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>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/i386/pc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/i386/pc.c b/hw/i386/pc.c index efbd41a1f1..01eefa3e09 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -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) |