From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 19F6B606A322 for ; Thu, 3 Dec 2026 01:38:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=o+faSdX7; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.a=rsa-sha256 header.s=default header.b=kdrlOR7i DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date :Subject:To:From:Reply-To:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=91IEkeTAim+lwSfrO4GHhfsbVakv7U/m0U9HBkuObJg=; b=o+faSdX7MbDhOMLs13xDX0NCHg 1EdEiTyvSkFveAjqdieqeMGh2ZJBYa1shq1F4ixPmcnIUcVbSMHMLFvOA4hxW/zpZkTKh6i0t17Ye XspZ3tEcep5OoNrtUcx7ULqjrT/M5NeAvzopt1oZ4xHrMNY4wih6kPkRgoV17sOXWhXv+4ihglA10 VRvztjwi4t8qlkiHpLGW4975Jk62dk9kmrFsUe79SPhwMRWkcunHbUnE+aLMT9US1XSpQeMG8wUuO 0t81zo4q1bE0scyXN6cNasXHNRyhIR89PB5Sqm5QSAHzdRrmrYlWPWeFCTTTY/QBK5UmRG3VtMrAz ZaGwhWVg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYvmU-0000000D8wE-40br; Thu, 03 Dec 2026 01:38:42 +0000 Received: from out30-100.freemail.mail.aliyun.com ([115.124.30.100]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYvmO-0000000D8tk-3k2M for linux-arm-kernel@lists.infradead.org; Thu, 03 Dec 2026 01:38:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1796261913; h=From:To:Subject:Date:Message-ID:MIME-Version; bh=91IEkeTAim+lwSfrO4GHhfsbVakv7U/m0U9HBkuObJg=; b=kdrlOR7icXPx8w7amxOso9kBf6YQDb8LtQyP5b5wkW5JtXcCKuizW9PZ4iODAOhwapOqgIgs9VFq6xSEEXQ9xYEhcq/d4kWoMeLFjY71yhp8j1z5YhAM7WffwHj28Vqeb5bpJk5RiQS/evagPu2fynL1g6fVdVLm6TqG6Lz//D8= X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R881e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033037009110;MF=jiangtianfeng@linux.alibaba.com;NM=1;PH=DS;RN=10;SR=0;TI=SMTPD_---0XGCLwDq_1796261911; Received: from h68d07384.sqa.eu95.tbsite.net(mailfrom:jiangtianfeng@linux.alibaba.com fp:SMTPD_---0XGCLwDq_1796261911 cluster:ay36) by smtp.aliyun-inc.com; Thu, 03 Dec 2026 09:38:32 +0800 From: Jiangtian Feng To: andre.przywara@arm.com Subject: [PATCH 2/4] firmware: smccc: lfa: Drop nested CPU hotplug read lock Date: Thu, 3 Dec 2026 09:38:15 +0800 Message-ID: <20261203013817.1215179-3-jiangtianfeng@linux.alibaba.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261203013817.1215179-1-jiangtianfeng@linux.alibaba.com> References: <20261102165421.3651202-1-andre.przywara@arm.com> <20261203013817.1215179-1-jiangtianfeng@linux.alibaba.com> X-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261202_173837_087981_D9FCCCDD X-CRM114-Status: UNSURE ( 7.21 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -17.6 (-----------------) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, salman.nabi@arm.com, lpieralisi@kernel.org, linux-kernel@vger.kernel.org, Jiangtian Feng , sudeep.holla@kernel.org, nirmoyd@nvidia.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" X-Spam-Status: No, score=-26.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, USER_AGENT_GIT,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 stop_machine() already takes cpus_read_lock() internally. Taking another read lock outside can deadlock if a hotplug writer starts waiting between the two acquisitions. Call stop_machine() directly and let it manage the hotplug lock. Link: https://lore.kernel.org/all/705b63c3-297a-4bf8-9eb2-b826e280e7da@nvidia.com/ Signed-off-by: Jiangtian Feng --- drivers/firmware/smccc/lfa_fw.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/firmware/smccc/lfa_fw.c b/drivers/firmware/smccc/lfa_fw.c index 383157ab7cea..1864176f3410 100644 --- a/drivers/firmware/smccc/lfa_fw.c +++ b/drivers/firmware/smccc/lfa_fw.c @@ -460,10 +460,8 @@ static int activate_fw_component(struct fw_component *comp) comp->use_cpu_rendezvous = comp->cpu_rendezvous_forced || comp->cpu_rendezvous; if (comp->use_cpu_rendezvous) { - cpus_read_lock(); ret = stop_machine(call_lfa_activate, comp, cpu_online_mask); - cpus_read_unlock(); } else { ret = call_lfa_activate(comp); } -- 2.47.3