From patchwork Tue Apr 18 17:04:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 9686133 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 C49F7602C2 for ; Tue, 18 Apr 2017 19:51:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B072D2838E for ; Tue, 18 Apr 2017 19:51:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A33C5283E1; Tue, 18 Apr 2017 19:51:12 +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 4C1AC2838E for ; Tue, 18 Apr 2017 19:51:12 +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=FW1Yk4DtnKJtvDqk3dp4n2SRnGHOIrr8DIIBqunX4pc=; b=ZNx7p0oCP0Lhng Gh/7HEwLibLJIO2nl38E/++vV9yyWY2nl2CiBi6s0GAdY239iDf7nNnQk5bD3s8sH18Gsxx3hXDWB fPe4H+drozglIaHYHEM6oCkwJTmYnXV7su6jivdpxyh61wY7nWBceHoXILNc4D/gcrx72+5VwiUMD Q7x2qP7dAypLEjT/b1vSqLb4QuGCYBWVxCczWxr52NShDA72SXuTNllbdLOB4VHA4DCvYGePPMIgC JJYrQZmH5FfESWHPYRpz//HXHhbISzTGV9bRNW+MKAHY5S8Chfs2+TquAxq8UzJlo/qSSYkcEI6NB i4orgyzyqR34aoVUl/Dg==; 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 1d0Z9c-00076I-0A; Tue, 18 Apr 2017 19:51:12 +0000 Received: from merlin.infradead.org ([2001:4978:20e::2]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d0Z9a-000765-5Z for linux-arm-kernel@bombadil.infradead.org; Tue, 18 Apr 2017 19:51:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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=zyxoAM8OtpWexiy+BmxRDsnLSrXTJO95KB4+kUXMDps=; b=fo0Vt+BizfPO5Pw3EKVAF/IB+I j9aS5cmpA8e01RlZe3HX5Ab3soGSUYaLJjKnnsC1SJzfEbVZ7UKkqgmYcdeLwU3vMEOpwWEFyB+Tl Hhz3v0MWWlb0B5HEz4zdIlTdMmhszprv9K1mP0L4DdIZsD/kMWDo5WG+BdCt1tBrGpK9e4X4rXz9B 7jmMtNgBQla/ClMKQfDKabo13E0M7IDjm7Oa66LxK4hE2G7tPJsY1IG0X1OBy4Y0B77sSGl9gBtvF W5boneyGlBz0LMAPZJCcyxmW/8vG39qcxEnMDtpnsyr3Bs4b86M6/UG7Qo4mDP2MndDvRfYZQutCY tQoRWGjg==; Received: from galois.linutronix.de ([2a01:7a0:2:106d:700::1]) by merlin.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d0Z9Y-0006vw-ED for linux-arm-kernel@lists.infradead.org; Tue, 18 Apr 2017 19:51:09 +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 1d0Z7c-0002NZ-KG; Tue, 18 Apr 2017 21:49:08 +0200 Message-Id: <20170418170553.026838125@linutronix.de> User-Agent: quilt/0.63-1 Date: Tue, 18 Apr 2017 19:04:50 +0200 From: Thomas Gleixner To: LKML Subject: [patch V2 08/24] hwtracing/coresight-etm3x: Use cpuhp_setup_state_nocalls_cpuslocked() References: <20170418170442.665445272@linutronix.de> MIME-Version: 1.0 Content-Disposition: inline; filename=wtracingcoresight-etm3x_Use_cpuhp_setup_state_nocalls_locked.patch X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170418_155108_609431_0849A439 X-CRM114-Status: GOOD ( 10.38 ) 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_probe() 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 Acked-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight-etm3x.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) --- a/drivers/hwtracing/coresight/coresight-etm3x.c +++ b/drivers/hwtracing/coresight/coresight-etm3x.c @@ -803,12 +803,12 @@ static int etm_probe(struct amba_device dev_err(dev, "ETM arch init failed\n"); if (!etm_count++) { - cpuhp_setup_state_nocalls(CPUHP_AP_ARM_CORESIGHT_STARTING, - "arm/coresight:starting", - etm_starting_cpu, etm_dying_cpu); - ret = cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN, - "arm/coresight:online", - etm_online_cpu, NULL); + cpuhp_setup_state_nocalls_cpuslocked(CPUHP_AP_ARM_CORESIGHT_STARTING, + "arm/coresight:starting", + etm_starting_cpu, etm_dying_cpu); + ret = cpuhp_setup_state_nocalls_cpuslocked(CPUHP_AP_ONLINE_DYN, + "arm/coresight:online", + etm_online_cpu, NULL); if (ret < 0) goto err_arch_supported; hp_online = ret;