From patchwork Tue Apr 18 17:04:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 9686187 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E7633602C9 for ; Tue, 18 Apr 2017 20:03:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D22AD28375 for ; Tue, 18 Apr 2017 20:03:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C50B8283A6; Tue, 18 Apr 2017 20:03:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5F74F28375 for ; Tue, 18 Apr 2017 20:03:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:Subject:To:From :Date:Message-Id:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: List-Owner; bh=SYcE0vBRtQi82MbV5Pz/NHspwh0CAq3DQERHHgdpWPM=; b=jA44EUCQyTrGP5 Olugr0t2z6IYS2PypAvJDeQ8aMTK3g5W1aWyWOvEDPu9YTAp7gxobfrA78OXI53mm1F4T/CF2saH7 J3tSdMKvy+xusPTWI3I/MJc+Si0aiLpi3XJWrzzdNm+L1Oqwjm4uRtk6prD8kyD2DLxl7TKRx4WVz 7kgBRS9T9S35Dvz9O8P77NY42p5ISrcOlLUNJBAl5EzLmSAmPaXtOMZH4p0/WOlzN0uiGvNBvuk4u OEV5d7dqbFT7xrB8ftWDcv2Er5uh/5O5EnXLErEFIqxNtU6V5FvVgA/F0+pZXahtFGqUnNwnQwgI3 qnkArEg7jMDi9SFY0/Yw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1d0ZLY-0004kH-D4; Tue, 18 Apr 2017 20:03:32 +0000 Received: from galois.linutronix.de ([2a01:7a0:2:106d:700::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d0Z9e-00073a-4B for linux-arm-kernel@lists.infradead.org; Tue, 18 Apr 2017 19:51:18 +0000 Received: from localhost ([127.0.0.1] helo=[127.0.1.1]) by Galois.linutronix.de with esmtp (Exim 4.80) (envelope-from ) id 1d0Z7i-0002OV-82; Tue, 18 Apr 2017 21:49:14 +0200 Message-Id: <20170418170553.274229815@linutronix.de> User-Agent: quilt/0.63-1 Date: Tue, 18 Apr 2017 19:04:53 +0200 From: Thomas Gleixner To: LKML Subject: [patch V2 11/24] ARM/hw_breakpoint: Use cpuhp_setup_state_cpuslocked() References: <20170418170442.665445272@linutronix.de> MIME-Version: 1.0 Content-Disposition: inline; filename=ARMhw_breakpoint_Use_cpuhp_setup_state_locked.patch X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170418_125114_520306_516F2693 X-CRM114-Status: GOOD ( 12.73 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Peter Zijlstra , Sebastian Siewior , Will Deacon , Russell King , Steven Rostedt , Ingo Molnar , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Sebastian Andrzej Siewior arch_hw_breakpoint_init() holds get_online_cpus() while registerring the hotplug callbacks. cpuhp_setup_state() invokes get_online_cpus() as well. This is correct, but prevents the conversion of the hotplug locking to a percpu rwsem. Use cpuhp_setup_state_cpuslocked() to avoid the nested call. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Cc: Will Deacon Cc: Mark Rutland Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Acked-by: Mark Rutland --- arch/arm/kernel/hw_breakpoint.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- a/arch/arm/kernel/hw_breakpoint.c +++ b/arch/arm/kernel/hw_breakpoint.c @@ -1098,8 +1098,9 @@ static int __init arch_hw_breakpoint_ini * assume that a halting debugger will leave the world in a nice state * for us. */ - ret = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "arm/hw_breakpoint:online", - dbg_reset_online, NULL); + ret = cpuhp_setup_state_cpuslocked(CPUHP_AP_ONLINE_DYN, + "arm/hw_breakpoint:online", + dbg_reset_online, NULL); unregister_undef_hook(&debug_reg_hook); if (WARN_ON(ret < 0) || !cpumask_empty(&debug_err_mask)) { core_num_brps = 0;