From c72c2669c6779d16099ebd4f5a11e93fcb14f54c Mon Sep 17 00:00:00 2001 From: Narinder Date: Thu, 11 Jun 2015 14:53:00 -0700 Subject: [PATCH] Fixes to get ACPI based kernel booting. Temporary fix to get going. Signed-off-by: Vadim Lomovtsev --- arch/arm64/kernel/topology.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm64/kernel/topology.c b/arch/arm64/kernel/topology.c index fcb8f7b42271..8ca4ab288c42 100644 --- a/arch/arm64/kernel/topology.c +++ b/arch/arm64/kernel/topology.c @@ -258,12 +258,19 @@ void store_cpu_topology(unsigned int cpuid) cpuid_topo->cluster_id = MPIDR_AFFINITY_LEVEL(mpidr, 2) | MPIDR_AFFINITY_LEVEL(mpidr, 3) << 8; } else { +#ifdef CONFIG_ACPI + /* Multiprocessor system : Single-thread per core */ + cpuid_topo->thread_id = -1; + cpuid_topo->core_id = (((mpidr >> 8) & 0xff) * 16) + (mpidr & 0xff); + cpuid_topo->cluster_id = (cpuid_topo->core_id) > 47 ? 1:0; +#else /* Multiprocessor system : Single-thread per core */ cpuid_topo->thread_id = -1; cpuid_topo->core_id = MPIDR_AFFINITY_LEVEL(mpidr, 0); cpuid_topo->cluster_id = MPIDR_AFFINITY_LEVEL(mpidr, 1) | MPIDR_AFFINITY_LEVEL(mpidr, 2) << 8 | MPIDR_AFFINITY_LEVEL(mpidr, 3) << 16; +#endif } pr_debug("CPU%u: cluster %d core %d thread %d mpidr %#016llx\n", -- 2.39.5