From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753195AbdHJMTD (ORCPT ); Thu, 10 Aug 2017 08:19:03 -0400 Received: from terminus.zytor.com ([65.50.211.136]:45533 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752878AbdHJMSp (ORCPT ); Thu, 10 Aug 2017 08:18:45 -0400 Date: Thu, 10 Aug 2017 05:15:09 -0700 From: tip-bot for Marc Zyngier Message-ID: Cc: peterz@infradead.org, hpa@zytor.com, tglx@linutronix.de, mingo@kernel.org, marc.zyngier@arm.com, leo.yan@linaro.org, torvalds@linux-foundation.org, linux-kernel@vger.kernel.org Reply-To: hpa@zytor.com, peterz@infradead.org, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, leo.yan@linaro.org, tglx@linutronix.de, marc.zyngier@arm.com, mingo@kernel.org In-Reply-To: <20170801080257.5056-5-marc.zyngier@arm.com> References: <20170801080257.5056-5-marc.zyngier@arm.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:locking/core] clocksource/arm_arch_timer: Use static_branch_enable_cpuslocked() Git-Commit-ID: 450f9689f294c331c56ec37d68302ccc19c7caa2 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 450f9689f294c331c56ec37d68302ccc19c7caa2 Gitweb: http://git.kernel.org/tip/450f9689f294c331c56ec37d68302ccc19c7caa2 Author: Marc Zyngier AuthorDate: Tue, 1 Aug 2017 09:02:57 +0100 Committer: Ingo Molnar CommitDate: Thu, 10 Aug 2017 12:29:00 +0200 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 --- drivers/clocksource/arm_arch_timer.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c index aae87c4..c62e716 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