From 84ba05e015dbb3c9fba759293744e37863d260b5 Mon Sep 17 00:00:00 2001 From: Daeyeong Lee Date: Tue, 20 Feb 2018 15:20:46 +0900 Subject: [PATCH] [COMMON] soc: samsung: topology: Modify to not support mpidr to configure cpu_topology Change-Id: I247c35e5ecacfab2946ffef02f7fab7f21a062c8 Signed-off-by: Daeyeong Lee --- drivers/soc/samsung/exynos-topology.c | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/drivers/soc/samsung/exynos-topology.c b/drivers/soc/samsung/exynos-topology.c index 064fdc69b683..10f0aa903344 100644 --- a/drivers/soc/samsung/exynos-topology.c +++ b/drivers/soc/samsung/exynos-topology.c @@ -235,28 +235,15 @@ static void update_siblings_masks(unsigned int cpuid) void store_cpu_topology(unsigned int cpuid) { struct cpu_topology *cpuid_topo = &cpu_topology[cpuid]; - u64 mpidr; - if (cpuid_topo->cluster_id != -1) - goto topology_populated; - - mpidr = read_cpuid_mpidr(); - - /* Uniprocessor systems can rely on default topology values */ - if (mpidr & MPIDR_UP_BITMASK) - return; - - /* Create cpu topology mapping based on MPIDR. */ - 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; - cpuid_topo->coregroup_id = cpuid_topo->cluster_id; + if (cpuid_topo->cluster_id == -1) { + pr_err("CPU topology isn't composed properly\n"); + BUG_ON(cpuid_topo->cluster_id); + } - pr_debug("CPU%u: cluster %d core %d mpidr %#016llx\n", - cpuid, cpuid_topo->cluster_id, cpuid_topo->core_id, mpidr); + pr_debug("CPU%u: cluster %d coregroup %d core %d\n", cpuid, + cpuid_topo->cluster_id, cpuid_topo->coregroup_id, cpuid_topo->core_id); -topology_populated: update_siblings_masks(cpuid); topology_detect_flags(); } -- 2.20.1