From a0f6cfe1ec14738f292d1e46247a8fe112e5045f Mon Sep 17 00:00:00 2001 From: Dietmar Eggemann Date: Wed, 30 Nov 2016 20:36:31 +0000 Subject: [PATCH] arm64: Set SD_ASYM_CPUCAPACITY sched_domain flag on DIE level Enable Capacity-Aware_scheduling. This is a shortcut from the EAS integration implementation. We know there are SoCs in use which have asymmetric cpu capacities on DIE level. Change-Id: I7f1326e86b8fc08b65d1c1341da7d1ef1013dcbc Signed-off-by: Dietmar Eggemann (cherry picked from commit 82f95a8cdff67770f02b7e4f5b1c084f42afc0e2) Signed-off-by: Chris Redpath --- arch/arm64/kernel/topology.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/arm64/kernel/topology.c b/arch/arm64/kernel/topology.c index 5b2c67a510d8..7758f7ff131b 100644 --- a/arch/arm64/kernel/topology.c +++ b/arch/arm64/kernel/topology.c @@ -258,6 +258,11 @@ const struct cpumask *cpu_coregroup_mask(int cpu) return &cpu_topology[cpu].core_sibling; } +static int cpu_cpu_flags(void) +{ + return SD_ASYM_CPUCAPACITY; +} + static inline int cpu_corepower_flags(void) { return SD_SHARE_PKG_RESOURCES | SD_SHARE_POWERDOMAIN | \ @@ -268,7 +273,7 @@ static struct sched_domain_topology_level arm64_topology[] = { #ifdef CONFIG_SCHED_MC { cpu_coregroup_mask, cpu_corepower_flags, cpu_core_energy, SD_INIT_NAME(MC) }, #endif - { cpu_cpu_mask, NULL, cpu_cluster_energy, SD_INIT_NAME(DIE) }, + { cpu_cpu_mask, cpu_cpu_flags, cpu_cluster_energy, SD_INIT_NAME(DIE) }, { NULL, }, }; -- 2.34.1