From bc0bc878f4ab17b3d166ff620a6711c4a24716e7 Mon Sep 17 00:00:00 2001 From: Amber Lin Date: Mon, 11 Mar 2019 13:02:56 -0400 Subject: [PATCH] libhsakmt: Fix missing apicid in topology While adding x2APIC support, apicid for non-x2apic was missing out by mistake. Change-Id: I25eed362c035c0e9fb9ea948899c49f70311f269 Signed-off-by: Amber Lin [ROCm/ROCR-Runtime commit: cfa47ac1f9302588180e9713a5c34e4e9b74444f] --- projects/rocr-runtime/src/topology.c | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/rocr-runtime/src/topology.c b/projects/rocr-runtime/src/topology.c index 4e3290c7ea..ec034bcf52 100644 --- a/projects/rocr-runtime/src/topology.c +++ b/projects/rocr-runtime/src/topology.c @@ -1242,6 +1242,7 @@ static HSAKMT_STATUS topology_create_temp_cpu_cache_list(void **temp_cpu_ci_list } else { eax = 0x1; cpuid(&eax, &ebx, &ecx, &edx); + this_cpu->apicid = (ebx >> 24) & 0xff; this_cpu->max_num_apicid = (ebx >> 16) & 0x0FF; } this_cpu->num_caches = cpuid_find_num_cache_leaves(cpuid_op_cache);