From patchwork Sat Apr 15 17:01:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 9682307 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 21FF560132 for ; Sat, 15 Apr 2017 17:32:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1438C28449 for ; Sat, 15 Apr 2017 17:32:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 08E2228474; Sat, 15 Apr 2017 17:32:35 +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 6790328449 for ; Sat, 15 Apr 2017 17:32: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=G/asaNU5PAQLZUDWnw0YtpnabZ+Jcjg1LCy3QICOdaQ=; b=K559CoFz6SvI3L DpWMU7bS5CoNahb0PZA/wYHQZ4B+NTNh97RPsiXTRmUsptUSqn94CXW6f6ZyiXRX68JV0/n6qZl4L LTD/QOZ5dy7AWvCMgGZ74zjKURs/1VAp1cb62MTQD0PmgYmfin3S84xKSI2LNujHD96RCsm1CTIn6 rzcIHnxeowMtlfOl7tRd/R8VU4/YoHE9n3QdM2GflGgL6nhbsgv1dn05hrTsIXTy7tRdoxfdrTZlP dI5ejDVmnxEQDmqQNtkIVH177qBqdtC/Q72IRphCKAW7PeubJPFS+6M8waa9Vb5/N/omGQzgS2+HR mCy/gtoiui1z68HDwaVg==; 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 1czRYi-0006jB-T2; Sat, 15 Apr 2017 17:32:28 +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 1czRXu-0006XF-KE for linux-arm-kernel@lists.infradead.org; Sat, 15 Apr 2017 17:31:40 +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 1czRWN-00084Q-DP; Sat, 15 Apr 2017 19:30:03 +0200 Message-Id: <20170415171651.995563335@linutronix.de> User-Agent: quilt/0.63-1 Date: Sat, 15 Apr 2017 19:01:16 +0200 From: Thomas Gleixner To: LKML Subject: [patch 09/20] hwtracing/coresight-etm4x: Use cpuhp_setup_state_nocalls_locked() References: <20170415170107.643253702@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-20170415_103138_834902_DE6B1B03 X-CRM114-Status: GOOD ( 10.64 ) 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_locked() 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_locked(CPUHP_AP_ARM_CORESIGHT_STARTING, + "arm/coresight4:starting", + etm4_starting_cpu, etm4_dying_cpu); + ret = cpuhp_setup_state_nocalls_locked(CPUHP_AP_ONLINE_DYN, + "arm/coresight4:online", + etm4_online_cpu, NULL); if (ret < 0) goto err_arch_supported; hp_online = ret;