summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-07-30 11:27:01 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-07-30 11:27:01 +0200
commit5a4c996764da496afcc470a6e13dc23a8f55aca8 (patch)
tree3a4072147bcb22100ddad6c537aa8a890f32daf4 /kernel
parentbafaf056e0734f7bca7d27716bb3c672e87bb0b1 (diff)
parent9b3d9bb3e4deef41095e513c2ffbebab20f9a982 (diff)
Merge back cpufreq material for 4.19.
Diffstat (limited to 'kernel')
-rw-r--r--kernel/cpu.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c
index 0db8938fbb23..307486baa477 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -290,6 +290,12 @@ void cpus_read_lock(void)
}
EXPORT_SYMBOL_GPL(cpus_read_lock);
+int cpus_read_trylock(void)
+{
+ return percpu_down_read_trylock(&cpu_hotplug_lock);
+}
+EXPORT_SYMBOL_GPL(cpus_read_trylock);
+
void cpus_read_unlock(void)
{
percpu_up_read(&cpu_hotplug_lock);