From nobody Fri Dec 19 16:05:20 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3915A2629C; Mon, 19 May 2025 11:30:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747654228; cv=none; b=mDf8OA3osIQbtMSRO0H/AR5ausJ+jEo/hMll3wUZaftJHJpKU/HB8fsGaI59zmM/ZJryI98ApCOeUlZlp6KCZKXqGxEyUNVUEIi+l2ODdzoXn/OP9T4DH3xVA3WgIwlKpeFtUBOUIubrVfWTxzhCw3T7CpvJpqMVkH+/BtUmNq0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747654228; c=relaxed/simple; bh=qwS3qxoPs9zP+KP5UE5JcbIR0eEtNBeA+RSPEGwLH9g=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FiuStrrA3GS2s8liY9NNmgvx+2bpxLH0RIhINXkmb0czdT9LWB/fqzqIzlNDa2QUh0Hba5XreRnPzsNQQzkxDimf2CCRU52YVX4NaqQ8KkUuUbYRBNZxcvIPNTzfKhNG21UMUk1ebe9n2fbrTp0bYZ2sMDZRLy1EZMcYAmwLYtI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=jnUN8J2u; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="jnUN8J2u" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B8E94C4CEF0; Mon, 19 May 2025 11:30:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1747654226; bh=qwS3qxoPs9zP+KP5UE5JcbIR0eEtNBeA+RSPEGwLH9g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jnUN8J2uqC982h7RVGxfI7rM4OorjSFtPvwS7QJNCx35WizIoVkmTctX89VYvmNyt s6fi8ys/pL+PgatvkDCkOWIQHmf62Ni8d4eOHNPwf/owf5U/x8jtWFo37OUCcbKNLf JytMZeY7LlMTMHtK/jtkj3Hj1Mu56ciG07bqEg4veWi1/980xe5l8u0zCFHPtQrEvQ BX+i2plyt2wk+RnmePlBQTzepEIgCarJtNSy6vIssGb6Kw9VKOsJrT9elue9jJL/do /ZSTQ+6O145oa+lzuDTl4xqszcP+TLl7NRZpA461fYfR6Mas+0QCIjfwQ8Zyw5ggHw KoK8YzN98aqWg== From: Philipp Stanner To: Jonathan Corbet , Bjorn Helgaas , Mark Brown , Philipp Stanner , David Lechner , Greg Kroah-Hartman , Yang Yingliang , Zijun Hu , Andy Shevchenko , Sathyanarayanan Kuppuswamy Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: [PATCH v3 1/6] PCI: Remove hybrid devres nature from request functions Date: Mon, 19 May 2025 13:29:55 +0200 Message-ID: <20250519112959.25487-3-phasta@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250519112959.25487-2-phasta@kernel.org> References: <20250519112959.25487-2-phasta@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" All functions based on __pci_request_region() and its release counter part support "hybrid mode", where the functions become managed if the PCI device was enabled with pcim_enable_device(). Removing this undesirable feature requires to remove all users who activated their device with that function and use one of the affected request functions. These users were: ASoC alsa cardreader cirrus i2c mmc mtd mtd mxser net spi vdpa vmwgfx all of which have been ported to always-managed pcim_ functions by now. The hybrid nature can, thus, be removed from the aforementioned PCI functions. Remove all function guards and documentation in pci.c related to the hybrid redirection. Adjust the visibility of pcim_release_region(). Signed-off-by: Philipp Stanner Reviewed-by: Andy Shevchenko Reviewed-by: Kuppuswamy Sathyanarayanan --- drivers/pci/devres.c | 39 ++++++++++++--------------------------- drivers/pci/pci.c | 42 ------------------------------------------ drivers/pci/pci.h | 1 - 3 files changed, 12 insertions(+), 70 deletions(-) diff --git a/drivers/pci/devres.c b/drivers/pci/devres.c index 73047316889e..5480d537f400 100644 --- a/drivers/pci/devres.c +++ b/drivers/pci/devres.c @@ -6,30 +6,13 @@ /* * On the state of PCI's devres implementation: * - * The older devres API for PCI has two significant problems: + * The older PCI devres API has one significant problem: * - * 1. It is very strongly tied to the statically allocated mapping table in - * struct pcim_iomap_devres below. This is mostly solved in the sense o= f the - * pcim_ functions in this file providing things like ranged mapping by - * bypassing this table, whereas the functions that were present in the= old - * API still enter the mapping addresses into the table for users of th= e old - * API. - * - * 2. The region-request-functions in pci.c do become managed IF the devic= e has - * been enabled with pcim_enable_device() instead of pci_enable_device(= ). - * This resulted in the API becoming inconsistent: Some functions have = an - * obviously managed counter-part (e.g., pci_iomap() <-> pcim_iomap()), - * whereas some don't and are never managed, while others don't and are - * _sometimes_ managed (e.g. pci_request_region()). - * - * Consequently, in the new API, region requests performed by the pcim_ - * functions are automatically cleaned up through the devres callback - * pcim_addr_resource_release(). - * - * Users of pcim_enable_device() + pci_*region*() are redirected in - * pci.c to the managed functions here in this file. This isn't exactly - * perfect, but the only alternative way would be to port ALL drivers - * using said combination to pcim_ functions. + * It is very strongly tied to the statically allocated mapping table in s= truct + * pcim_iomap_devres below. This is mostly solved in the sense of the pcim_ + * functions in this file providing things like ranged mapping by bypassing + * this table, whereas the functions that were present in the old API still + * enter the mapping addresses into the table for users of the old API. * * TODO: * Remove the legacy table entirely once all calls to pcim_iomap_table() in @@ -89,10 +72,12 @@ static inline void pcim_addr_devres_clear(struct pcim_a= ddr_devres *res) =20 /* * The following functions, __pcim_*_region*, exist as counterparts to the - * versions from pci.c - which, unfortunately, can be in "hybrid mode", i.= e., - * sometimes managed, sometimes not. + * versions from pci.c - which, unfortunately, were in the past in "hybrid + * mode", i.e., sometimes managed, sometimes not. * - * To separate the APIs cleanly, we define our own, simplified versions he= re. + * To separate the APIs cleanly, we defined our own, simplified versions h= ere. + * + * TODO: unify those functions with the counterparts in pci.c */ =20 /** @@ -893,7 +878,7 @@ int pcim_request_region_exclusive(struct pci_dev *pdev,= int bar, const char *nam * Release a region manually that was previously requested by * pcim_request_region(). */ -void pcim_release_region(struct pci_dev *pdev, int bar) +static void pcim_release_region(struct pci_dev *pdev, int bar) { struct pcim_addr_devres res_searched; =20 diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index e77d5b53c0ce..4acc23823637 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -3937,16 +3937,6 @@ void pci_release_region(struct pci_dev *pdev, int ba= r) if (!pci_bar_index_is_valid(bar)) return; =20 - /* - * This is done for backwards compatibility, because the old PCI devres - * API had a mode in which the function became managed if it had been - * enabled with pcim_enable_device() instead of pci_enable_device(). - */ - if (pci_is_managed(pdev)) { - pcim_release_region(pdev, bar); - return; - } - if (pci_resource_len(pdev, bar) =3D=3D 0) return; if (pci_resource_flags(pdev, bar) & IORESOURCE_IO) @@ -3984,13 +3974,6 @@ static int __pci_request_region(struct pci_dev *pdev= , int bar, if (!pci_bar_index_is_valid(bar)) return -EINVAL; =20 - if (pci_is_managed(pdev)) { - if (exclusive =3D=3D IORESOURCE_EXCLUSIVE) - return pcim_request_region_exclusive(pdev, bar, name); - - return pcim_request_region(pdev, bar, name); - } - if (pci_resource_len(pdev, bar) =3D=3D 0) return 0; =20 @@ -4027,11 +4010,6 @@ static int __pci_request_region(struct pci_dev *pdev= , int bar, * * Returns 0 on success, or %EBUSY on error. A warning * message is also printed on failure. - * - * NOTE: - * This is a "hybrid" function: It's normally unmanaged, but becomes manag= ed - * when pcim_enable_device() has been called in advance. This hybrid featu= re is - * DEPRECATED! If you want managed cleanup, use the pcim_* functions inste= ad. */ int pci_request_region(struct pci_dev *pdev, int bar, const char *name) { @@ -4084,11 +4062,6 @@ static int __pci_request_selected_regions(struct pci= _dev *pdev, int bars, * @name: Name of the driver requesting the resources * * Returns: 0 on success, negative error code on failure. - * - * NOTE: - * This is a "hybrid" function: It's normally unmanaged, but becomes manag= ed - * when pcim_enable_device() has been called in advance. This hybrid featu= re is - * DEPRECATED! If you want managed cleanup, use the pcim_* functions inste= ad. */ int pci_request_selected_regions(struct pci_dev *pdev, int bars, const char *name) @@ -4104,11 +4077,6 @@ EXPORT_SYMBOL(pci_request_selected_regions); * @name: name of the driver requesting the resources * * Returns: 0 on success, negative error code on failure. - * - * NOTE: - * This is a "hybrid" function: It's normally unmanaged, but becomes manag= ed - * when pcim_enable_device() has been called in advance. This hybrid featu= re is - * DEPRECATED! If you want managed cleanup, use the pcim_* functions inste= ad. */ int pci_request_selected_regions_exclusive(struct pci_dev *pdev, int bars, const char *name) @@ -4144,11 +4112,6 @@ EXPORT_SYMBOL(pci_release_regions); * * Returns 0 on success, or %EBUSY on error. A warning * message is also printed on failure. - * - * NOTE: - * This is a "hybrid" function: It's normally unmanaged, but becomes manag= ed - * when pcim_enable_device() has been called in advance. This hybrid featu= re is - * DEPRECATED! If you want managed cleanup, use the pcim_* functions inste= ad. */ int pci_request_regions(struct pci_dev *pdev, const char *name) { @@ -4173,11 +4136,6 @@ EXPORT_SYMBOL(pci_request_regions); * * Returns 0 on success, or %EBUSY on error. A warning message is also * printed on failure. - * - * NOTE: - * This is a "hybrid" function: It's normally unmanaged, but becomes manag= ed - * when pcim_enable_device() has been called in advance. This hybrid featu= re is - * DEPRECATED! If you want managed cleanup, use the pcim_* functions inste= ad. */ int pci_request_regions_exclusive(struct pci_dev *pdev, const char *name) { diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index b81e99cd4b62..8c3e5fb2443a 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -1062,7 +1062,6 @@ static inline pci_power_t mid_pci_get_power_state(str= uct pci_dev *pdev) int pcim_intx(struct pci_dev *dev, int enable); int pcim_request_region_exclusive(struct pci_dev *pdev, int bar, const char *name); -void pcim_release_region(struct pci_dev *pdev, int bar); =20 /* * Config Address for PCI Configuration Mechanism #1 --=20 2.49.0 From nobody Fri Dec 19 16:05:20 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6B42D27511C; Mon, 19 May 2025 11:30:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747654230; cv=none; b=syxeSUrGpTvnzzvneVl65CC+pmqGQ/QMn81vj4McZl3QQHF0SWAFbQ5mjjqPG65REqCwBwPkQJVzQygvZ16WFwLZGbilKuYxrs73Xy6XGa3isnPvevJ1gNfpjjvIrmnuIb56BHlHu3lceBAU7xLBoA1Yi81Bqbqcd5/bLC1Of6Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747654230; c=relaxed/simple; bh=EOTXJySNIRQ1hPgH/GQOn7ZCvUlevAKYgutrhZhqAOU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gyhMonhNjP3AIkZuGHEdnzOgsvOJXBqzIxwAn3O7agWJc9PkOGAbh80UtdZNeCmba/Bw4gUTa/NjTPbbsvinA/AsPB8ZlAyGSridWX3hrfZ8X0WlyR+uNG3U6q4aifdzuYr7n0U7wBcsvIHcjco13A8U9BXexFlTkAlY3GKHhD0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=JfaWN0F7; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="JfaWN0F7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3A977C4CEE4; Mon, 19 May 2025 11:30:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1747654230; bh=EOTXJySNIRQ1hPgH/GQOn7ZCvUlevAKYgutrhZhqAOU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JfaWN0F7MFws4criB+GKIi0vHpk8WokfNZGVC4bFtizg+x7Lqt0s/fB+ToeFVy4lk NLtyLNGSa13CvIeRsNE+0Ive7uM0uTdit1pPiIne0yIwN1XYdCQTn2CFsg9jqjn5To 8zggGRXh+UglM9cIcyjwlNtaY49CNP8lTZb5mCMmaUwr8+/RnlzAJo5ZUPNVTN3G8J KZRcs8ENrbcL03ilXOPN5v614XGeOxPKbhRC1xiNQTSLj54/mUEpdG286NujzxaZ1o YPZRG+/pQm9fNKHsRRZpesiDdCeMe/i+w2q4BkI+gdKrnR6MNc8U6BQHzQ1PV9hTCw UzJ6ZOl7Xusjg== From: Philipp Stanner To: Jonathan Corbet , Bjorn Helgaas , Mark Brown , Philipp Stanner , David Lechner , Greg Kroah-Hartman , Yang Yingliang , Zijun Hu , Andy Shevchenko , Sathyanarayanan Kuppuswamy Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: [PATCH v3 2/6] Documentation/driver-api: Update pcim_enable_device() Date: Mon, 19 May 2025 13:29:56 +0200 Message-ID: <20250519112959.25487-4-phasta@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250519112959.25487-2-phasta@kernel.org> References: <20250519112959.25487-2-phasta@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" pcim_enable_device() is not related anymore to switching the mode of operation of any functions. It merely sets up a devres callback for automatically disabling the PCI device on driver detach. Adjust the function's documentation. Signed-off-by: Philipp Stanner Reviewed-by: Kuppuswamy Sathyanarayanan Reviewed-by: Andy Shevchenko --- Sorry, I didn't find a way to do a line-break with which `make htmldocs` doesn't complain. --- Documentation/driver-api/driver-model/devres.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/driver-api/driver-model/devres.rst b/Documentati= on/driver-api/driver-model/devres.rst index d75728eb05f8..9b52a3e4b931 100644 --- a/Documentation/driver-api/driver-model/devres.rst +++ b/Documentation/driver-api/driver-model/devres.rst @@ -391,7 +391,7 @@ PCI devm_pci_remap_cfgspace() : ioremap PCI configuration space devm_pci_remap_cfg_resource() : ioremap PCI configuration space resource =20 - pcim_enable_device() : after success, some PCI ops become managed + pcim_enable_device() : after success, the PCI device gets disabled auto= matically on driver detach pcim_iomap() : do iomap() on a single BAR pcim_iomap_regions() : do request_region() and iomap() on multiple BARs pcim_iomap_table() : array of mapped addresses indexed by BAR --=20 2.49.0 From nobody Fri Dec 19 16:05:20 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3F9A1276045; Mon, 19 May 2025 11:30:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747654234; cv=none; b=qzVNZ0QXFNlJRbbArMjDw8OrXs0o2jqP2spWeYklXrcP5oZc8mlfbgPK95xFptI3kIWuL1vicgBEHEC7wpmmPVFr2Ir9Oza47QQmUDDIw5b34W7F4hU4qv1B2QLyI0Iy1BXC0sN+Ctu262N6Dn68hbSVEavCjSUk56Vs16E8qpg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747654234; c=relaxed/simple; bh=0CDEo8glAhVsWbgEFoyQpPYpxMH8Urv8zPMM06VfINM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UBQHIfVLMW7kB8PAcLfmMBW5zs15vEZMQKmvoFDQeaVJhrqCDfHN80KgJ90LfI+EPPGyLIM0kSS/w2lh64tyO1y5CxlJhX3bEO2v/QL5BhxiKtJkm7TkIElQ8qCgYszeEiBbiT4l30cI1qJjS3Hi/R2NaPBT+IBwiUKQ4tZl0To= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WBa6XIcv; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WBa6XIcv" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B0DE4C4CEE4; Mon, 19 May 2025 11:30:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1747654233; bh=0CDEo8glAhVsWbgEFoyQpPYpxMH8Urv8zPMM06VfINM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WBa6XIcvevxCme/UBsPF9VF81/My8CDGLW7crsQYtXiq7FZMil+MdwwjkSJicfS0I Qh7qh+TATbqROvGjSywBgZTVOnb907M9oFApqPTejA9M1nJfWzBNuxdJ6+BmEOLZBM 052bIu2u4Je+v4pdfhPkrLmTgFAzXSi0U9NSnHKdQ24dxN8f8BRjHfCmisWw3ByhQ/ E6XvoXZtqZH5UEl097a4R69PKXhFWWWlyd5UvL1a3WqsMVYNA+EVmB3UqCTARX4N+F nvk8OuBplgWQcErBWcrSkdR/j5hRaSluHV7kUvW53WcZLT+1rTl12YjaumyvCRaCIl UxWxBqucbXFgA== From: Philipp Stanner To: Jonathan Corbet , Bjorn Helgaas , Mark Brown , Philipp Stanner , David Lechner , Greg Kroah-Hartman , Yang Yingliang , Zijun Hu , Andy Shevchenko , Sathyanarayanan Kuppuswamy Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: [PATCH v3 3/6] PCI: Remove pcim_request_region_exclusive() Date: Mon, 19 May 2025 13:29:57 +0200 Message-ID: <20250519112959.25487-5-phasta@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250519112959.25487-2-phasta@kernel.org> References: <20250519112959.25487-2-phasta@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" pcim_request_region_exclusive() was only needed for redirecting the relatively exotic exclusive request functions in pci.c in case of them operating in managed mode. The managed nature has been removed from those functions and no one else uses pcim_request_region_exclusive(). Remove pcim_request_region_exclusive(). Signed-off-by: Philipp Stanner Reviewed-by: Andy Shevchenko Reviewed-by: Kuppuswamy Sathyanarayanan --- drivers/pci/devres.c | 18 ------------------ drivers/pci/pci.h | 2 -- 2 files changed, 20 deletions(-) diff --git a/drivers/pci/devres.c b/drivers/pci/devres.c index 5480d537f400..769b92f4f66a 100644 --- a/drivers/pci/devres.c +++ b/drivers/pci/devres.c @@ -852,24 +852,6 @@ int pcim_request_region(struct pci_dev *pdev, int bar,= const char *name) } EXPORT_SYMBOL(pcim_request_region); =20 -/** - * pcim_request_region_exclusive - Request a PCI BAR exclusively - * @pdev: PCI device to request region for - * @bar: Index of BAR to request - * @name: Name of the driver requesting the resource - * - * Returns: 0 on success, a negative error code on failure. - * - * Request region specified by @bar exclusively. - * - * The region will automatically be released on driver detach. If desired, - * release manually only with pcim_release_region(). - */ -int pcim_request_region_exclusive(struct pci_dev *pdev, int bar, const cha= r *name) -{ - return _pcim_request_region(pdev, bar, name, IORESOURCE_EXCLUSIVE); -} - /** * pcim_release_region - Release a PCI BAR * @pdev: PCI device to operate on diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 8c3e5fb2443a..cfc9e71a4d84 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -1060,8 +1060,6 @@ static inline pci_power_t mid_pci_get_power_state(str= uct pci_dev *pdev) #endif =20 int pcim_intx(struct pci_dev *dev, int enable); -int pcim_request_region_exclusive(struct pci_dev *pdev, int bar, - const char *name); =20 /* * Config Address for PCI Configuration Mechanism #1 --=20 2.49.0 From nobody Fri Dec 19 16:05:20 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BA2DC277804; Mon, 19 May 2025 11:30:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747654237; cv=none; b=CzZ4SRPED6/9XErAYuY+QzdmRs6ILldZ/JNvOTruy+/LIkHl0lY/SZWcoOc1In2Bz3v5TTkAzx/UpHtpt4dGYGY6gYE0HyBUg+71ed80eOxj7z6BJxlnJ80LHWChchYFB0ZX09ZFTIfPOWA417EcwDgwsawV1FK6KUWCI9dKjsg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747654237; c=relaxed/simple; bh=AzoGK9e92IB4GFZK7Gp2iJJ2pTc/LyEYyg91BJBdfgM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FGocX16ixCKBZCwqAXtJNDZfH8M7fQaqJCmbF789QFI/mxqGlEHO+dLXkPIaXP32nHGrsUQam4kbZl4ZUIMruHTBF9KH8B5ZIw7hYlnQeteNI2fbYfGBjd+TEJu9SrMFfYeXx0TpKPwH/vNi5Ih8j12qmcGHEOKww0N9PP7slX8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=q2HshcfL; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="q2HshcfL" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 31528C4AF09; Mon, 19 May 2025 11:30:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1747654237; bh=AzoGK9e92IB4GFZK7Gp2iJJ2pTc/LyEYyg91BJBdfgM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q2HshcfL0q1z+eqswEUIFHRJ6lyVnQwjgfGxHQA18Ul43qbbIsXUdpG6RwnqGlcwu OJij3sO/iPMhhxJgS7LVlBU5cKrRqlOZUnVLAtoxOzdPOdSXvQjTurtkllSq1jRKDk mRQwCpJQkgQUDMnAFj+M/+M336x87s4v+awg4fuyTeYDS6V/R9S2Kka17q1bJIZpYs Vp2F8ex5e7nDhpm4Pl6f/H6fMuMjg7H4CnptorikyQbEEjbaN6tTBSl9kiX91wenlM TJ1K5sgkHPJT98TnKC7LOXtBkI7XgAkdCmw3TwpaSpOOUyPY0aMoP+mU1thZIb0TTQ 2NT1KeAskRWQg== From: Philipp Stanner To: Jonathan Corbet , Bjorn Helgaas , Mark Brown , Philipp Stanner , David Lechner , Greg Kroah-Hartman , Yang Yingliang , Zijun Hu , Andy Shevchenko , Sathyanarayanan Kuppuswamy Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: [PATCH v3 4/6] PCI: Remove request_flags relict from devres Date: Mon, 19 May 2025 13:29:58 +0200 Message-ID: <20250519112959.25487-6-phasta@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250519112959.25487-2-phasta@kernel.org> References: <20250519112959.25487-2-phasta@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" pcim_request_region_exclusive(), the only user in PCI devres that needed exclusive region requests, has been removed. All features related to exclusive requests can, therefore, be removed, too. Remove them. Signed-off-by: Philipp Stanner Reviewed-by: Kuppuswamy Sathyanarayanan Reviewed-by: Andy Shevchenko --- drivers/pci/devres.c | 46 +++++++++++++++++++------------------------- 1 file changed, 20 insertions(+), 26 deletions(-) diff --git a/drivers/pci/devres.c b/drivers/pci/devres.c index 769b92f4f66a..ae79e5f95c8a 100644 --- a/drivers/pci/devres.c +++ b/drivers/pci/devres.c @@ -808,31 +808,6 @@ int pcim_iomap_regions(struct pci_dev *pdev, int mask,= const char *name) } EXPORT_SYMBOL(pcim_iomap_regions); =20 -static int _pcim_request_region(struct pci_dev *pdev, int bar, const char = *name, - int request_flags) -{ - int ret; - struct pcim_addr_devres *res; - - if (!pci_bar_index_is_valid(bar)) - return -EINVAL; - - res =3D pcim_addr_devres_alloc(pdev); - if (!res) - return -ENOMEM; - res->type =3D PCIM_ADDR_DEVRES_TYPE_REGION; - res->bar =3D bar; - - ret =3D __pcim_request_region(pdev, bar, name, request_flags); - if (ret !=3D 0) { - pcim_addr_devres_free(res); - return ret; - } - - devres_add(&pdev->dev, res); - return 0; -} - /** * pcim_request_region - Request a PCI BAR * @pdev: PCI device to request region for @@ -848,7 +823,26 @@ static int _pcim_request_region(struct pci_dev *pdev, = int bar, const char *name, */ int pcim_request_region(struct pci_dev *pdev, int bar, const char *name) { - return _pcim_request_region(pdev, bar, name, 0); + int ret; + struct pcim_addr_devres *res; + + if (!pci_bar_index_is_valid(bar)) + return -EINVAL; + + res =3D pcim_addr_devres_alloc(pdev); + if (!res) + return -ENOMEM; + res->type =3D PCIM_ADDR_DEVRES_TYPE_REGION; + res->bar =3D bar; + + ret =3D __pcim_request_region(pdev, bar, name, 0); + if (ret !=3D 0) { + pcim_addr_devres_free(res); + return ret; + } + + devres_add(&pdev->dev, res); + return 0; } EXPORT_SYMBOL(pcim_request_region); =20 --=20 2.49.0 From nobody Fri Dec 19 16:05:20 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 290A827510C; Mon, 19 May 2025 11:30:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747654241; cv=none; b=S+zHIsiHeEeHIrIoGUMrU9DdbCdf4Pyt8+AXMQ0f2d4qZk9zu5bamlAzvX0PFusPqvDxst+urJ+HkN3eRRugPUdpB+7w4Ti+MP3bwC0PryOBgBrhRrQlwSixjNcpAg1BZixsVW7tUCFB9jrXRt7g15hCIxYb1J2QNZe6iB37DJw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747654241; c=relaxed/simple; bh=Lqbb8q+TSDiYTJdPjJ4SZW6MOmSwTrVO3i+5A/UwH50=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Teh+aDck1ddEHO/kGNgadJ9p6T7N48uImPRIF/xGPdS8Ia2Jo5KYACpWjpbycnX4oeRTImdN4iydUnsJxLQ6s7yMqzQEMwQsrX+ca06aEg6qzoGwupm6Z3Cv1V+mHHXL6Oo8xyduWAkfV01FcwyqP3QtMko0KcwbSAn9TtUBhes= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HJ3QanBE; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HJ3QanBE" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A72FDC4CEEB; Mon, 19 May 2025 11:30:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1747654240; bh=Lqbb8q+TSDiYTJdPjJ4SZW6MOmSwTrVO3i+5A/UwH50=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HJ3QanBEShBNByM9je3SfcQEdxgmr7tojwE/hkp5Xntkn3w5gglTTqDYvBvO61aQS AOUX/L212VSzZGSBRyA65tqXSmjUQkin7ysRT2jzwIsp9phlTrpET/DtasBcKlJyF8 mw1jKGUqS+pVZW+R8WRO1xqmpifkNGYSNpjzJpdIici1aDbO4fd2G215IrIWlRmVFC kybnETV+FbGRSkfgXTp8LNim5DAzO5VR7o5+toDN0mhb5G0gsmxsAQb3pWozLskEoH FJzd1NWvsgjQ2bZSOo+Xtraj8wXEa9caHC2Wr0AobU7Buj9LFCFUx6JRfKI06dBQV+ cJ687FNjNt/cQ== From: Philipp Stanner To: Jonathan Corbet , Bjorn Helgaas , Mark Brown , Philipp Stanner , David Lechner , Greg Kroah-Hartman , Yang Yingliang , Zijun Hu , Andy Shevchenko , Sathyanarayanan Kuppuswamy Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: [PATCH v3 5/6] PCI: Remove redundant set of request funcs Date: Mon, 19 May 2025 13:29:59 +0200 Message-ID: <20250519112959.25487-7-phasta@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250519112959.25487-2-phasta@kernel.org> References: <20250519112959.25487-2-phasta@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" When the demangling of the hybrid devres functions within PCI was implemented, it was necessary to implement several PCI functions a second time to avoid cyclic calls, since the hybrid functions in pci.c call the managed functions in devres.c, which in turn can be directly used outside of PCI and needed request infrastructure, too. Therefore, __pcim_request_region_range(), __pci_release_region_range() and wrappers around them were implemented. The hybrid nature has recently been removed from all functions in pci.c. Therefore, the functions in devres.c can now directly use their counterparts in pci.c without causing a call-cycle. Remove __pcim_request_region_range(), __pcim_request_region_range() and the wrappers. Use the corresponding request functions from pci.c in devres.c Signed-off-by: Philipp Stanner Reviewed-by: Andy Shevchenko Reviewed-by: Kuppuswamy Sathyanarayanan --- drivers/pci/devres.c | 110 ++----------------------------------------- 1 file changed, 5 insertions(+), 105 deletions(-) diff --git a/drivers/pci/devres.c b/drivers/pci/devres.c index ae79e5f95c8a..4a4604b78b90 100644 --- a/drivers/pci/devres.c +++ b/drivers/pci/devres.c @@ -70,106 +70,6 @@ static inline void pcim_addr_devres_clear(struct pcim_a= ddr_devres *res) res->bar =3D -1; } =20 -/* - * The following functions, __pcim_*_region*, exist as counterparts to the - * versions from pci.c - which, unfortunately, were in the past in "hybrid - * mode", i.e., sometimes managed, sometimes not. - * - * To separate the APIs cleanly, we defined our own, simplified versions h= ere. - * - * TODO: unify those functions with the counterparts in pci.c - */ - -/** - * __pcim_request_region_range - Request a ranged region - * @pdev: PCI device the region belongs to - * @bar: BAR the range is within - * @offset: offset from the BAR's start address - * @maxlen: length in bytes, beginning at @offset - * @name: name of the driver requesting the resource - * @req_flags: flags for the request, e.g., for kernel-exclusive requests - * - * Returns: 0 on success, a negative error code on failure. - * - * Request a range within a device's PCI BAR. Sanity check the input. - */ -static int __pcim_request_region_range(struct pci_dev *pdev, int bar, - unsigned long offset, - unsigned long maxlen, - const char *name, int req_flags) -{ - resource_size_t start =3D pci_resource_start(pdev, bar); - resource_size_t len =3D pci_resource_len(pdev, bar); - unsigned long dev_flags =3D pci_resource_flags(pdev, bar); - - if (start =3D=3D 0 || len =3D=3D 0) /* Unused BAR. */ - return 0; - if (len <=3D offset) - return -EINVAL; - - start +=3D offset; - len -=3D offset; - - if (len > maxlen && maxlen !=3D 0) - len =3D maxlen; - - if (dev_flags & IORESOURCE_IO) { - if (!request_region(start, len, name)) - return -EBUSY; - } else if (dev_flags & IORESOURCE_MEM) { - if (!__request_mem_region(start, len, name, req_flags)) - return -EBUSY; - } else { - /* That's not a device we can request anything on. */ - return -ENODEV; - } - - return 0; -} - -static void __pcim_release_region_range(struct pci_dev *pdev, int bar, - unsigned long offset, - unsigned long maxlen) -{ - resource_size_t start =3D pci_resource_start(pdev, bar); - resource_size_t len =3D pci_resource_len(pdev, bar); - unsigned long flags =3D pci_resource_flags(pdev, bar); - - if (len <=3D offset || start =3D=3D 0) - return; - - if (len =3D=3D 0 || maxlen =3D=3D 0) /* This an unused BAR. Do nothing. */ - return; - - start +=3D offset; - len -=3D offset; - - if (len > maxlen) - len =3D maxlen; - - if (flags & IORESOURCE_IO) - release_region(start, len); - else if (flags & IORESOURCE_MEM) - release_mem_region(start, len); -} - -static int __pcim_request_region(struct pci_dev *pdev, int bar, - const char *name, int flags) -{ - unsigned long offset =3D 0; - unsigned long len =3D pci_resource_len(pdev, bar); - - return __pcim_request_region_range(pdev, bar, offset, len, name, flags); -} - -static void __pcim_release_region(struct pci_dev *pdev, int bar) -{ - unsigned long offset =3D 0; - unsigned long len =3D pci_resource_len(pdev, bar); - - __pcim_release_region_range(pdev, bar, offset, len); -} - static void pcim_addr_resource_release(struct device *dev, void *resource_= raw) { struct pci_dev *pdev =3D to_pci_dev(dev); @@ -177,11 +77,11 @@ static void pcim_addr_resource_release(struct device *= dev, void *resource_raw) =20 switch (res->type) { case PCIM_ADDR_DEVRES_TYPE_REGION: - __pcim_release_region(pdev, res->bar); + pci_release_region(pdev, res->bar); break; case PCIM_ADDR_DEVRES_TYPE_REGION_MAPPING: pci_iounmap(pdev, res->baseaddr); - __pcim_release_region(pdev, res->bar); + pci_release_region(pdev, res->bar); break; case PCIM_ADDR_DEVRES_TYPE_MAPPING: pci_iounmap(pdev, res->baseaddr); @@ -720,7 +620,7 @@ void __iomem *pcim_iomap_region(struct pci_dev *pdev, i= nt bar, res->type =3D PCIM_ADDR_DEVRES_TYPE_REGION_MAPPING; res->bar =3D bar; =20 - ret =3D __pcim_request_region(pdev, bar, name, 0); + ret =3D pci_request_region(pdev, bar, name); if (ret !=3D 0) goto err_region; =20 @@ -734,7 +634,7 @@ void __iomem *pcim_iomap_region(struct pci_dev *pdev, i= nt bar, return res->baseaddr; =20 err_iomap: - __pcim_release_region(pdev, bar); + pci_release_region(pdev, bar); err_region: pcim_addr_devres_free(res); =20 @@ -835,7 +735,7 @@ int pcim_request_region(struct pci_dev *pdev, int bar, = const char *name) res->type =3D PCIM_ADDR_DEVRES_TYPE_REGION; res->bar =3D bar; =20 - ret =3D __pcim_request_region(pdev, bar, name, 0); + ret =3D pci_request_region(pdev, bar, name); if (ret !=3D 0) { pcim_addr_devres_free(res); return ret; --=20 2.49.0 From nobody Fri Dec 19 16:05:20 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BAF45278756; Mon, 19 May 2025 11:30:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747654244; cv=none; b=rbHGWClqkMsLq6YZBAGMV+U5eb0e5tugiaR8nIy76ZZNu/atTNXFYN2ofncnq3KKI9Y2QQpRyxZBovBSwsW33YkKm7/v7JI0sFO3jmbLKYDoSqUhNjTRUkuBAAibwRkJmMJ9/bR49g1nMYzVRpE8OaDh+IBufYNQRCA3JmD1gM8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747654244; c=relaxed/simple; bh=Dmbm1Nsz0mLac3rVEQyjSTWhEKqeKGKYB7oPAJpKuco=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=vEbGPiae9v2vSbLlj68tQiFc7M44hkB3Wj/ZaTWm+R0CPDLMWiNL8Xl27vC/8nDpaiYlGhZtGEEk7NsmAMEUBTJYVmFZrBbSoUA9OuICaSTYpN9bz1UTWZH+51PWvXurU5hQrhueqE7tKkAoRSVAWwrzp5qK27/16kPWqiJQkR0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lY4cbMiM; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lY4cbMiM" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 26FC2C4CEE4; Mon, 19 May 2025 11:30:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1747654244; bh=Dmbm1Nsz0mLac3rVEQyjSTWhEKqeKGKYB7oPAJpKuco=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lY4cbMiMv6Z+P9EKta3qTSi8UgTM02ZQ2FlgtSfE5Qo6GK1tS6l9VBjTemm8fVs2S mS661TIhZ3d61gbOvIdGyTWe1ZaD7Y1LUrdclpqhP1GEWNMZRx7WRuemtIXuGGU3pL n+rv5P8VY+OZRLqvvvpz2WHS56VIMDsbcgw3IOzMc7AUG4ZiPSK7bD4ZFhMxz4y1KK RbsJMWfBtkSrU20pC0YV4EXqRNcx5w8T+TLnZu4CN4KBRXEjEfF7X8MbtyLLFYD1UW 5OHIDWgUlQjb7yByJz3sf5fa/+uaSd6Yw0MMJh2NvhZfCdcA/IiwANnQtyw5sjeHuW LczAisYgykAEg== From: Philipp Stanner To: Jonathan Corbet , Bjorn Helgaas , Mark Brown , Philipp Stanner , David Lechner , Greg Kroah-Hartman , Yang Yingliang , Zijun Hu , Andy Shevchenko , Sathyanarayanan Kuppuswamy Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: [PATCH v3 6/6] PCI: Remove hybrid-devres hazzard warnings from doc Date: Mon, 19 May 2025 13:30:00 +0200 Message-ID: <20250519112959.25487-8-phasta@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250519112959.25487-2-phasta@kernel.org> References: <20250519112959.25487-2-phasta@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" pci/iomap.c still contains warnings about those functions not behaving in a managed manner if pcim_enable_device() was called. Since all hybrid behavior that users could know about has been removed by now, those explicit warnings are no longer necessary. Remove the hybrid-devres warnings from the docstrings. Signed-off-by: Philipp Stanner Reviewed-by: Andy Shevchenko Reviewed-by: Kuppuswamy Sathyanarayanan --- drivers/pci/iomap.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/drivers/pci/iomap.c b/drivers/pci/iomap.c index fe706ed946df..ea86c282a386 100644 --- a/drivers/pci/iomap.c +++ b/drivers/pci/iomap.c @@ -25,10 +25,6 @@ * * @maxlen specifies the maximum length to map. If you want to get access = to * the complete BAR from offset to the end, pass %0 here. - * - * NOTE: - * This function is never managed, even if you initialized with - * pcim_enable_device(). * */ void __iomem *pci_iomap_range(struct pci_dev *dev, int bar, @@ -76,10 +72,6 @@ EXPORT_SYMBOL(pci_iomap_range); * * @maxlen specifies the maximum length to map. If you want to get access = to * the complete BAR from offset to the end, pass %0 here. - * - * NOTE: - * This function is never managed, even if you initialized with - * pcim_enable_device(). * */ void __iomem *pci_iomap_wc_range(struct pci_dev *dev, int bar, @@ -127,10 +119,6 @@ EXPORT_SYMBOL_GPL(pci_iomap_wc_range); * * @maxlen specifies the maximum length to map. If you want to get access = to * the complete BAR without checking for its length first, pass %0 here. - * - * NOTE: - * This function is never managed, even if you initialized with - * pcim_enable_device(). If you need automatic cleanup, use pcim_iomap(). * */ void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) { @@ -152,10 +140,6 @@ EXPORT_SYMBOL(pci_iomap); * * @maxlen specifies the maximum length to map. If you want to get access = to * the complete BAR without checking for its length first, pass %0 here. - * - * NOTE: - * This function is never managed, even if you initialized with - * pcim_enable_device(). * */ void __iomem *pci_iomap_wc(struct pci_dev *dev, int bar, unsigned long max= len) { --=20 2.49.0