From patchwork Tue Apr 18 17:04:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 9686181 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 437B0602C9 for ; Tue, 18 Apr 2017 20:01:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2E2B128387 for ; Tue, 18 Apr 2017 20:01:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1FAFB25D9E; Tue, 18 Apr 2017 20:01:30 +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 A7A2125D9E for ; Tue, 18 Apr 2017 20:01:29 +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=fRm+GAWTRPhwBeS9N/oZoZQ9zdSuPzJoqiCiASCCcgE=; b=Vp1fHhtLSY0wz4 Q6gPwJ+FrALiynj5sxqPKulMESHrj9+IDFEtFBnUJVkQZElblenj5jFdJq3r3XcUkDC5m5W4T5s23 8q7dcNWtQAstY3liaihjdFqEEgJBEiQ+/Z80ZIbTu/ST9DJ6BP+wmeml4Cs6XiQEHkdPY/rfWedS7 FDnro+ZuGzCgveBy+8c0WnxwTsZ2yw6uPq+OnhhiV7Al7N0OwL5nLVjvohgEOpV9Lm2WoU6VKF97M 3yeO95c/cAJxw/oDiFV1iuG4DxIpgNNFn2fMjQUZc1FvIXi1PtsJJrlzvDcPRTD9i0Tjv1XRrC/F2 LwNy3Ze4Bn1O3AK3vWYw==; 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 1d0ZJX-0003dX-Db; Tue, 18 Apr 2017 20:01:27 +0000 Received: from casper.infradead.org ([2001:770:15f::2]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d0ZJV-0003Qs-Ux for linux-arm-kernel@bombadil.infradead.org; Tue, 18 Apr 2017 20:01:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:MIME-Version:References: Subject:Cc:To:From:Date:Message-Id:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=rWx41E6ZwDeLc+2rDX1qZPOddglPhRejr1YbCay+xfs=; b=Q8nozSvS46YrpXaoor1HCNvGgS 87MEWmqfPS7flE+JTUmX0uk42KNSZ5kswo4GcimUCSfX6NX5IN6J0eTZA7PgzsPJDCO0dmU42ssvY m0Iito+c6/0KGhwb9Yc8MqNMO9RAvbNjR9zAzEwzfZUvYgaZmXLMJPFeDwnWQYveQED9Oo2qtLPIy 857tdalBn8qeuPymd510T0R398NnmtdrKtkDrTI11buGRyhcVQIaTPbCcThxh1zJAgryJodGONCzx ObQQ+0VnYbOQOgxm3DmY9hwyW5M70+xgRgoEC3aoA2FZS7oW4PWnv/97UXwlRhOUSIeOkkMUmG526 upz1/JYQ==; Received: from galois.linutronix.de ([2a01:7a0:2:106d:700::1]) by casper.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d0Z9J-0005kD-4y for linux-arm-kernel@lists.infradead.org; Tue, 18 Apr 2017 19:50:57 +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 1d0Z7e-0002O4-F5; Tue, 18 Apr 2017 21:49:10 +0200 Message-Id: <20170418170553.108514162@linutronix.de> User-Agent: quilt/0.63-1 Date: Tue, 18 Apr 2017 19:04:51 +0200 From: Thomas Gleixner To: LKML Subject: [patch V2 09/24] hwtracing/coresight-etm4x: Use cpuhp_setup_state_nocalls_cpuslocked() References: <20170418170442.665445272@linutronix.de> MIME-Version: 1.0 Content-Disposition: inline; filename=wtracingcoresight-etm4x_Use_cpuhp_setup_state_nocalls_locked.patch X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170418_205053_333672_09A8AB6E X-CRM114-Status: GOOD ( 12.23 ) 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: Mathieu Poirier , Peter Zijlstra , Sebastian Siewior , 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 etm_probe4() holds get_online_cpus() while invoking cpuhp_setup_state_nocalls(). cpuhp_setup_state_nocalls() 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_nocalls_cpuslocked() to avoid the nested call. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Cc: Mathieu Poirier Cc: linux-arm-kernel@lists.infradead.org --- drivers/hwtracing/coresight/coresight-etm4x.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) --- a/drivers/hwtracing/coresight/coresight-etm4x.c +++ b/drivers/hwtracing/coresight/coresight-etm4x.c @@ -990,12 +990,12 @@ static int etm4_probe(struct amba_device dev_err(dev, "ETM arch init failed\n"); if (!etm4_count++) { - cpuhp_setup_state_nocalls(CPUHP_AP_ARM_CORESIGHT_STARTING, - "arm/coresight4:starting", - etm4_starting_cpu, etm4_dying_cpu); - ret = cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN, - "arm/coresight4:online", - etm4_online_cpu, NULL); + cpuhp_setup_state_nocalls_cpuslocked(CPUHP_AP_ARM_CORESIGHT_STARTING, + "arm/coresight4:starting", + etm4_starting_cpu, etm4_dying_cpu); + ret = cpuhp_setup_state_nocalls_cpuslocked(CPUHP_AP_ONLINE_DYN, + "arm/coresight4:online", + etm4_online_cpu, NULL); if (ret < 0) goto err_arch_supported; hp_online = ret;