From 20ec0b66fbf45ede42a31192e8a2a7b72cf59d03 Mon Sep 17 00:00:00 2001 From: Sai Harshini Nimmala Date: Tue, 23 Nov 2021 14:47:02 -0800 Subject: [PATCH] include/linux/cpu: Remove get_online_cpus and put_online_cpus wrapper Upstream has done away with get_online_cpus and put_online_cpus wrappers around cpu_read_lock() and cpu_read_unlock(). Reflect these changes downstream. Change-Id: Ie7ae59b6faba93ea43ce1ba3a4b043ae87e1337f Signed-off-by: Sai Harshini Nimmala --- drivers/soc/qcom/msm_performance.c | 12 ++++++------ kernel/sched/walt/input-boost.c | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/soc/qcom/msm_performance.c b/drivers/soc/qcom/msm_performance.c index 9acd80761e53..a2dcfac2f267 100644 --- a/drivers/soc/qcom/msm_performance.c +++ b/drivers/soc/qcom/msm_performance.c @@ -317,7 +317,7 @@ static ssize_t set_cpu_min_freq(struct kobject *kobj, * of other CPUs in the cluster once it is done for at least one CPU * in the cluster */ - get_online_cpus(); + cpus_read_lock(); for_each_cpu(i, limit_mask_min) { i_cpu_stats = &per_cpu(msm_perf_cpu_stats, i); @@ -333,7 +333,7 @@ static ssize_t set_cpu_min_freq(struct kobject *kobj, for_each_cpu(j, policy.related_cpus) cpumask_clear_cpu(j, limit_mask_min); } - put_online_cpus(); + cpus_read_unlock(); return count; } @@ -397,7 +397,7 @@ static ssize_t set_cpu_max_freq(struct kobject *kobj, cp++; } - get_online_cpus(); + cpus_read_lock(); for_each_cpu(i, limit_mask_max) { i_cpu_stats = &per_cpu(msm_perf_cpu_stats, i); if (cpufreq_get_policy(&policy, i)) @@ -412,7 +412,7 @@ static ssize_t set_cpu_max_freq(struct kobject *kobj, for_each_cpu(j, policy.related_cpus) cpumask_clear_cpu(j, limit_mask_max); } - put_online_cpus(); + cpus_read_unlock(); return count; } @@ -1198,7 +1198,7 @@ static int __init msm_performance_init(void) free_cpumask_var(limit_mask_min); return -ENOMEM; } - get_online_cpus(); + cpus_read_lock(); for_each_possible_cpu(cpu) { if (!cpumask_test_cpu(cpu, cpu_online_mask)) per_cpu(cpu_is_hp, cpu) = true; @@ -1209,7 +1209,7 @@ static int __init msm_performance_init(void) hotplug_notify_up, hotplug_notify_down); - put_online_cpus(); + cpus_read_unlock(); msm_perf_kset = kset_create_and_add("msm_performance", NULL, kernel_kobj); if (!msm_perf_kset) { diff --git a/kernel/sched/walt/input-boost.c b/kernel/sched/walt/input-boost.c index c20454535dab..5372d899bd45 100644 --- a/kernel/sched/walt/input-boost.c +++ b/kernel/sched/walt/input-boost.c @@ -86,7 +86,7 @@ static void update_policy_online(void) struct cpumask online_cpus; /* Re-evaluate policy to trigger adjust notifier for online CPUs */ - get_online_cpus(); + cpus_read_lock(); online_cpus = *cpu_online_mask; for_each_cpu(i, &online_cpus) { policy = cpufreq_cpu_get(i); @@ -100,7 +100,7 @@ static void update_policy_online(void) policy->related_cpus); boost_adjust_notify(policy); } - put_online_cpus(); + cpus_read_unlock(); } static void do_input_boost_rem(struct work_struct *work)