diff options
| author | Marc Zyngier <[email protected]> | 2017-08-01 08:02:57 +0000 |
|---|---|---|
| committer | Ingo Molnar <[email protected]> | 2017-08-10 10:29:00 +0000 |
| commit | 450f9689f294c331c56ec37d68302ccc19c7caa2 (patch) | |
| tree | 44c24dfc4959328092637722e4d365288ebe4dec /drivers/clocksource/arm_arch_timer.c | |
| parent | jump_label: Provide hotplug context variants (diff) | |
| download | kernel-450f9689f294c331c56ec37d68302ccc19c7caa2.tar.gz kernel-450f9689f294c331c56ec37d68302ccc19c7caa2.zip | |
clocksource/arm_arch_timer: Use static_branch_enable_cpuslocked()
Use the new static_branch_enable_cpuslocked() function to switch
the workaround static key on the CPU hotplug path.
Signed-off-by: Marc Zyngier <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Cc: Leo Yan <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'drivers/clocksource/arm_arch_timer.c')
| -rw-r--r-- | drivers/clocksource/arm_arch_timer.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c index aae87c4c546e..c62e71614c75 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c @@ -455,7 +455,11 @@ void arch_timer_enable_workaround(const struct arch_timer_erratum_workaround *wa per_cpu(timer_unstable_counter_workaround, i) = wa; } - static_branch_enable(&arch_timer_read_ool_enabled); + /* + * Use the locked version, as we're called from the CPU + * hotplug framework. Otherwise, we end-up in deadlock-land. + */ + static_branch_enable_cpuslocked(&arch_timer_read_ool_enabled); /* * Don't use the vdso fastpath if errata require using the |
