Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2501945rdb; Fri, 8 Dec 2023 09:53:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IF9z1x9fD7cOfIkUUSkbZ2u2nu5JUA7Ss4bI4VJpp7e4KPLtuMjJFPeYfGOqBuwA4YctCqT X-Received: by 2002:a17:902:c20d:b0:1d0:649b:89d0 with SMTP id 13-20020a170902c20d00b001d0649b89d0mr460483pll.52.1702058014430; Fri, 08 Dec 2023 09:53:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702058014; cv=none; d=google.com; s=arc-20160816; b=QG1owzbHfnEQZJcH8gYN0AvSS0BZDA5+N6sk84AM0LszM0k4IVQCjcKC8s9/ul1KKR GPEilvfQJpDJDJWDgDWBomdDkyrHkb2w2FGjHyWFG0i+0xpcpnAUp+CBxiYwavhufWgH OFvYoIDRpejjv37LiHgiiev1lc1epytsYVgzcxnQzPV+FsbV3K600Qjjq9Z7QSd36oGo /EfSXKB84yF3Cr5gFpQmDeGlihf4BlRT6Dzs7zcEEflq4BntOBSxsZ7D7w6MXdYPSOLP tFVnFi8K2/TIPnYO5z/CtaTJr1bKJqTW3hqrKFwqxSsnhg3Q0LuDA4hPaG+xWsrUs1zr mOzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :message-id:subject:cc:to:from:date:dkim-signature; bh=qpqKffaFwEZjFQJYh8Gx214JyTzBlv7kSl311vyO9dY=; fh=xd3/DOixWJqTMImTvhLBfv65nHQuRU44BnPrS0LFDok=; b=EqqfUdKSpT5Fl/ENnKMkoHo+Zmv/JmIXmC5EDMXg09mCA/vfjPcHhQX/KBu6MKF16K 0Am+wlxsd2SqlokonfpggcuZgiaPSYLkRK/0u8kzTzIfydU5IPieoontI8JrK1UT0GfM pq9b0WzKFvMHwcp7WbtMWjmnSA1lCcVehmhtQgCsJUakV/fhJXZZoZuXQFguhfjQVxAs HtlO+N5Xc8+IEJbMbQsxLsq7jXguJ7trHnLKL9K7xMe3j2jurHCcD4FJH+SPnTrzU4q6 oD0jQUPwpsFIWGQ+Lu5o/1Jc4ug5zKe9Lfd1h8scljaHVaUww3WpWhk6w49kv5jD7lmr aA+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eGxycqgj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id 19-20020a170902c21300b001cfbd271f2esi1846474pll.7.2023.12.08.09.53.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 09:53:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eGxycqgj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 1568C81E0FC9; Fri, 8 Dec 2023 09:53:30 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1574523AbjLHRxL (ORCPT + 99 others); Fri, 8 Dec 2023 12:53:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1574510AbjLHRxI (ORCPT ); Fri, 8 Dec 2023 12:53:08 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AB5C1985 for ; Fri, 8 Dec 2023 09:53:14 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E9017C433C9; Fri, 8 Dec 2023 17:53:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702057994; bh=WF3sxOQXZ3wLw83HJCehVvDgBYIVEarCTX/DeEoTsgg=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=eGxycqgj63COmF0qtUQFBePJ0mPdT2BJNNnDWkCgHzbJ2siwtIgN1SHMUtVWygUGR ppDKj0ShIsRzytOd4fDSO6nHoubQbLjF7lqT4IcYvpmlVxzeZHo1znch1/4reOSwMm tPODYcSTifUfHzs/1ewcVh4pFM5iyntUJOwdiPUGixyMVuvqQkIirJ9RUZ3JA9I65n QFsYz4sHOBnW9E8sU4hjCYRLTphTNG+d8LxV8R89PSHYcIJFcVhYLnzKOeAF4xvzXr +8VH94qPGsSeZVClZprqW/ygYUhbBpfuZDdFZkk38/h1PfzlDyCHZLGruP2GpLEVip iQuuY5jkbVeKQ== Date: Fri, 8 Dec 2023 11:53:12 -0600 From: Bjorn Helgaas To: Johan Hovold Cc: Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Bjorn Helgaas , Andy Gross , Bjorn Andersson , Konrad Dybcio , Manivannan Sadhasivam , Rob Herring , Nirmal Patel , Jonathan Derrick , linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 0/6] PCI: Fix deadlocks when enabling ASPM Message-ID: <20231208175312.GA803148@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231128081512.19387-1-johan+linaro@kernel.org> X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 08 Dec 2023 09:53:30 -0800 (PST) On Tue, Nov 28, 2023 at 09:15:06AM +0100, Johan Hovold wrote: > The pci_enable_link_state() helper is currently only called from > pci_walk_bus(), something which can lead to a deadlock as both helpers > take a pci_bus_sem read lock. > > Add a new locked helper which can be called with the read lock held and > fix up the two current users (the second is new in 6.7-rc1). > > Note that there are no users left of the original unlocked variant after > this series, but I decided to leave it in place for now (e.g. to mirror > the corresponding helpers to disable link states). > > Included are also a couple of related cleanups. > > Johan > > > Changes in v2 > - fix up the function name in a kernel doc comment as reported by the > kernel test robot > > > Johan Hovold (6): > PCI/ASPM: Add locked helper for enabling link state > PCI: vmd: Fix deadlock when enabling ASPM > PCI: qcom: Fix deadlock when enabling ASPM > PCI: qcom: Clean up ASPM comment > PCI/ASPM: Clean up disable link state parameter > PCI/ASPM: Add lockdep assert to link state helper > > drivers/pci/controller/dwc/pcie-qcom.c | 7 ++- > drivers/pci/controller/vmd.c | 2 +- > drivers/pci/pcie/aspm.c | 65 +++++++++++++++++++------- > include/linux/pci.h | 3 ++ > 4 files changed, 56 insertions(+), 21 deletions(-) Applied to for-linus for v6.7, thanks, Johan!