From ed256144cd6f0ca2ff59fc3fc8dca547506f433b Mon Sep 17 00:00:00 2001 From: Chen Fan Date: Fri, 21 Aug 2015 17:34:45 +0800 Subject: 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 Signed-off-by: Zhu Guihua Signed-off-by: Eduardo Habkost --- hw/i386/pc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'hw/i386') 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) -- cgit v1.2.3-55-g7522