power: qcom: Move power table notification outside of critical section
Since the blocking chain notifiers can be called from process context, the notification must not be sent from within a critical section. Move the blocking notification outside the critical section. Change-Id: Ia5679310fc59f25643e7c8d572cc230d262c5937 Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
This commit is contained in:
parent
b2a2802cd5
commit
f668e1e3d0
1 changed files with 11 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
|
@ -377,6 +377,7 @@ static int update_userspace_power(struct sched_params __user *argp)
|
|||
struct cpu_activity_info *node;
|
||||
struct cpu_static_info *sp, *clear_sp;
|
||||
int cpumask, cluster, mpidr;
|
||||
bool pdata_valid[NR_CPUS] = {0};
|
||||
|
||||
get_user(cpumask, &argp->cpumask);
|
||||
get_user(cluster, &argp->cluster);
|
||||
|
@ -448,13 +449,19 @@ static int update_userspace_power(struct sched_params __user *argp)
|
|||
}
|
||||
cpu_stats[cpu].ptable = per_cpu(ptable, cpu);
|
||||
repopulate_stats(cpu);
|
||||
|
||||
blocking_notifier_call_chain(
|
||||
&msm_core_stats_notifier_list, cpu, NULL);
|
||||
pdata_valid[cpu] = true;
|
||||
}
|
||||
}
|
||||
spin_unlock(&update_lock);
|
||||
|
||||
for_each_possible_cpu(cpu) {
|
||||
if (!pdata_valid[cpu])
|
||||
continue;
|
||||
|
||||
blocking_notifier_call_chain(
|
||||
&msm_core_stats_notifier_list, cpu, NULL);
|
||||
}
|
||||
|
||||
activate_power_table = true;
|
||||
return 0;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue