From: Park Bumgyu Date: Thu, 9 Aug 2018 04:54:59 +0000 (+0900) Subject: sched: ems: update topology after energy table creation X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5cbea524ee74f2c71591f0dd5991178b27729b76;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git sched: ems: update topology after energy table creation Change-Id: I12c66b041b801c331d1b631b035bf99d07af763f Signed-off-by: Park Bumgyu --- diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c index 88c9a697e819..91dae6545be2 100644 --- a/drivers/base/arch_topology.c +++ b/drivers/base/arch_topology.c @@ -81,6 +81,12 @@ static ssize_t cpu_capacity_show(struct device *dev, static void update_topology_flags_workfn(struct work_struct *work); static DECLARE_WORK(update_topology_flags_work, update_topology_flags_workfn); +void topology_update(void) +{ + if (topology_detect_flags()) + schedule_work(&update_topology_flags_work); +} + static ssize_t cpu_capacity_store(struct device *dev, struct device_attribute *attr, const char *buf, diff --git a/include/linux/arch_topology.h b/include/linux/arch_topology.h index b6ebce008c19..3ffd248c6b85 100644 --- a/include/linux/arch_topology.h +++ b/include/linux/arch_topology.h @@ -15,6 +15,7 @@ int topology_core_flags(void); int topology_cluster_flags(void); int topology_cpu_flags(void); int topology_update_cpu_topology(void); +void topology_update(void); struct device_node; bool topology_parse_cpu_capacity(struct device_node *cpu_node, int cpu); diff --git a/kernel/sched/ems/energy.c b/kernel/sched/ems/energy.c index d7a13a35e642..e55fe5986e8c 100644 --- a/kernel/sched/ems/energy.c +++ b/kernel/sched/ems/energy.c @@ -479,6 +479,8 @@ void init_sched_energy_table(struct cpumask *cpus, int table_size, update_group_capacity(sd, cpu); rcu_read_unlock(); } + + topology_update(); } static int __init init_sched_energy_data(void)