From abd1c9a367dfa2a02a2ce1c4e32db67bebdbac9f Mon Sep 17 00:00:00 2001 From: Daeyeong Lee Date: Mon, 12 Feb 2018 19:25:54 +0900 Subject: [PATCH] [COMMON] soc: samsung: topology: Add DSU level in topology hierarchy Change-Id: I4fa8c4ecdc4638da00375e62827d577489e6fcf1 Signed-off-by: Daeyeong Lee --- arch/arm64/include/asm/topology.h | 1 + drivers/soc/samsung/exynos-topology.c | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/arch/arm64/include/asm/topology.h b/arch/arm64/include/asm/topology.h index 4c07803eb3dc..ee52e851eb2f 100644 --- a/arch/arm64/include/asm/topology.h +++ b/arch/arm64/include/asm/topology.h @@ -26,6 +26,7 @@ extern struct cpu_topology cpu_topology[NR_CPUS]; void init_cpu_topology(void); void store_cpu_topology(unsigned int cpuid); const struct cpumask *cpu_coregroup_mask(int cpu); +const struct cpumask *cpu_cluster_mask(int cpu); #ifdef CONFIG_NUMA diff --git a/drivers/soc/samsung/exynos-topology.c b/drivers/soc/samsung/exynos-topology.c index 158159c1ee02..11f250a31f42 100644 --- a/drivers/soc/samsung/exynos-topology.c +++ b/drivers/soc/samsung/exynos-topology.c @@ -195,6 +195,11 @@ const struct cpumask *cpu_coregroup_mask(int cpu) return &cpu_topology[cpu].core_sibling; } +const struct cpumask *cpu_cluster_mask(int cpu) +{ + return &cpu_topology[cpu].cluster_sibling; +} + static void update_siblings_masks(unsigned int cpuid) { struct cpu_topology *cpu_topo, *cpuid_topo = &cpu_topology[cpuid]; @@ -321,6 +326,7 @@ static struct sched_domain_topology_level arm64_topology[] = { #ifdef CONFIG_SCHED_MC { cpu_coregroup_mask, core_flags, cpu_core_energy, SD_INIT_NAME(MC) }, #endif + { cpu_cluster_mask, SD_INIT_NAME(DSU) }, { cpu_cpu_mask, cpu_flags, cpu_cluster_energy, SD_INIT_NAME(DIE) }, { cpu_cpu_mask, NULL, cpu_system_energy, SD_INIT_NAME(SYS) }, { NULL, } -- 2.20.1