From: Marc Zyngier Date: Tue, 1 Aug 2017 08:02:57 +0000 (+0100) Subject: clocksource/arm_arch_timer: Use static_branch_enable_cpuslocked() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=450f9689f294c331c56ec37d68302ccc19c7caa2;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Peter Zijlstra (Intel) Cc: Leo Yan Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-arm-kernel@lists.infradead.org Link: http://lkml.kernel.org/r/20170801080257.5056-5-marc.zyngier@arm.com Signed-off-by: Ingo Molnar --- 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