From nobody Fri Dec 19 18:55:31 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 26EAC1B6D06; Fri, 16 May 2025 17:41:53 +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=1747417316; cv=none; b=pThMupHdU53xKqoYRzH9tErn/3NtIlHf95XqyGhDovXqRWQe12Pczx1r00AlEGE1gbuYbYdWOxoYAav0i4OfvBZ8Ae5TjRW0YNsgeN6DOxP/CW1a1KuwYEV+/m8xD0EhpcAoZ9P/WDO2JUdrw2EboH6K7yyoXOlNruds98aZQQw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747417316; c=relaxed/simple; bh=fdV4EBB0Ubivi1ebzVTZviSinak1zsr42O6eeHj5myE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FemFVHCGA+vAjiSpn7UK6NrjgmoVm1IHlZ7P/jRzAFEHX+zYM3I+JDY5IJg0GnoS6QkqLi+Q4LPGtVlz5kSzdOglfpBGCqAUaV4d4vt8ljj90p57UEGMsi4p535XZ457BqmItkKz2MNndZMBpgfIbfOUADb741xxzWxAT3nTWyk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=b4mWpOAb; 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="b4mWpOAb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8E845C4CEEF; Fri, 16 May 2025 17:41:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1747417313; bh=fdV4EBB0Ubivi1ebzVTZviSinak1zsr42O6eeHj5myE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b4mWpOAba+9nr+nvF8VFs3M8ftLXq87LCe2FC945zYKgH51AGP8sQxGoWezSW0+Y8 sbvTfpdO0jHjy9cq6nqbnJrWbihHm+5uQ/3y8m5exfbL/8Guh3KmpvPsnXU9BtdL9h Qe2OLyNHIC1aeSeeFnGzuOtIPm/Nk3AeONa6Qz2dc/HBWe5urgTHwbZPvESPzoZndi +oBEJP0/bST3mokrJCAleYBbQLe7A/6g52pZQdSmOaqlNJpC9ATv4QgIzXK/N6bhVs yWw2RgsL+KC6n4/PPgm0WUFVxCPvsNY6MhxA67vQW00VvY5LWZHjJ8ppC9pvdoUieH jwci8IOoAd9JA== From: Philipp Stanner To: Jonathan Corbet , Bjorn Helgaas , Philipp Stanner , Mark Brown , David Lechner , Andy Shevchenko , Zijun Hu , Yang Yingliang , Greg Kroah-Hartman , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: [PATCH v2 1/6] PCI: Remove hybrid devres nature from request functions Date: Fri, 16 May 2025 19:41:36 +0200 Message-ID: <20250516174141.42527-2-phasta@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250516174141.42527-1-phasta@kernel.org> References: <20250516174141.42527-1-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=20 --- 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 18:55:31 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 A98CE2777F9; Fri, 16 May 2025 17:41:57 +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=1747417317; cv=none; b=T7nVzErd+hZ9pqYgRcl50C2zY2RBPWd4u2eDFZz3GKtXOGRx2+6HWIFnK+jIzUDPCYb+KvjFHtEVBLxh9uzjEqD7idcDHk8Qk1wG+KwmmPOE0TL0ao7cGt9BjM4Y2a/cb71qSQKc9WnFEBLrp2ySKdBiVHuQ+QOvxwiYRVsCZas= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747417317; c=relaxed/simple; bh=/SrqagrckwF6dgNkAoSXSSD6RhUeKwgwHwvPTIQ04bY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=rFRauA+JVPPCrr2tmosTS3Er8cbrOdP9PvTLe2/4eVgtZPYVZzhjyYcvbWozE6QhqL/rNllgQXj7u+ykIIHs5exZakvjBOUC8uI84DN/KN6Aewnqz/KyPK5i/tUYHaJzKZdy2VF1e4UcN0Ri0ja1uJU8Vqm9P59UTm0tEG2jIcY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LNrg7Foa; 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="LNrg7Foa" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2928BC4CEE4; Fri, 16 May 2025 17:41:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1747417317; bh=/SrqagrckwF6dgNkAoSXSSD6RhUeKwgwHwvPTIQ04bY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LNrg7FoauNvW/3I8JfK2FOIE5Gchu1UoNxfRDahLQS49NSyuEzF4OyUBIg6Dgy3Fd RV6xAkCTlqz+Nr+Hlo4toYUM0ogjW43wEkcAWfcVs2xxCA34iAMyYRDHc1207dCkCT R9kQ2EG35KLj3JLb/mHnH07hw8IA7js7xwQs4n9kkXHnCX5nJH4acV4IXbEJO3yr2h xDuBGFa6wqjWkELzE+WDk2RVUeBUP8CNiCuU8fYCDS3lYn/vLFZRpBAIartpuI4GEG cA+dC3+YGWAn6wcrjVkHeWbroxk3hAPhYdcnaWdC6vaOLYl9k7RyuSEGY56AKMXfKk T/SOmyD+7FEOA== From: Philipp Stanner To: Jonathan Corbet , Bjorn Helgaas , Philipp Stanner , Mark Brown , David Lechner , Andy Shevchenko , Zijun Hu , Yang Yingliang , Greg Kroah-Hartman , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: [PATCH v2 2/6] Documentation/driver-api: Update pcim_enable_device() Date: Fri, 16 May 2025 19:41:37 +0200 Message-ID: <20250516174141.42527-3-phasta@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250516174141.42527-1-phasta@kernel.org> References: <20250516174141.42527-1-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=20 --- 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..9443911c4742 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, PCI dev gets deactivated automati= cally 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 18:55:31 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 49CA52741CD; Fri, 16 May 2025 17:42:00 +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=1747417321; cv=none; b=B1i0dfRlRceLF8FkJAsLjxHdCFURrVsqTGa4KO+CiHNdLz8FcnGcgDxK5fSUq9lrMxOrDcGnwRT6MhaOaYy/dgpt7aqvngwvv5MoLKLVo1peoqaqE9d3Izw6HvXtTljxTSrPEdKfq04BavAsOcstfeFlj4H0jJwBD3AFDBsQ+PY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747417321; c=relaxed/simple; bh=c1ROWu0lfGtKMMpettEtZCS5NGvMgU/+Xjau9CxLvpo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FVSXYcJpx0Am06d3EXfEUxHm9sCPxnIqDfL3dPFC8Qd6eaob4hXi/bi8mLG6kzpsI0Vdh1NynV4dQbpwF9PudpdSTmhfBPU1Mvh7yTsN4wsZLd/VT95fRv88ls4LMTKuYqdxR+MnZP+K/tpIbGL3hTw7BSBzRwKub+HsdGdrWuI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bPE0J8mp; 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="bPE0J8mp" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B77EDC4CEF0; Fri, 16 May 2025 17:41:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1747417320; bh=c1ROWu0lfGtKMMpettEtZCS5NGvMgU/+Xjau9CxLvpo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bPE0J8mp3Y48oscDtYpaoS1rkv6XQhRHnDNBBUooWcUegMvh3q7rHlAGEqI9EW1BX SWcgEJT05vxPpj35mZRT09ykUMkBGVWl0zvEWbl78/OJF42RS6USz6SZwXLZJge19n hRtSJmwmIFAjVFlkgPD4N7jSl+UmxNqXa/DGa3pGi7/ZnzeU/ehTK16oHj4KmgzMeu d9mlCUhEA7xyp1xBZiExXlsH58CpChK4sDdbxAjJo1syxU7A8LMUKJ0YDl+5qZ+Xs1 HBIwrRh1HxJk3/4e2Hqaz51hH47HjWJSIZOwK2ora2gfO587MKgSGwNI0KgaD6EtHK t9cCk3Avz2iWQ== From: Philipp Stanner To: Jonathan Corbet , Bjorn Helgaas , Philipp Stanner , Mark Brown , David Lechner , Andy Shevchenko , Zijun Hu , Yang Yingliang , Greg Kroah-Hartman , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: [PATCH v2 3/6] PCI: Remove pcim_request_region_exclusive() Date: Fri, 16 May 2025 19:41:38 +0200 Message-ID: <20250516174141.42527-4-phasta@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250516174141.42527-1-phasta@kernel.org> References: <20250516174141.42527-1-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=20 --- 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 18:55:31 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 D5D292741CD; Fri, 16 May 2025 17:42:04 +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=1747417324; cv=none; b=UpmcHCR4AgBzQiOJq4yyrsfo0PuKBk2wRncSCWa9iIfOXv1e223qHR/LmZq0kfY/pKKSdw8XYZrtkmoNjLhKtbjW8bQcbZ5qiPU8vbw9fPBSoIeLrc4Wy1e8h0uhkZDSCJdRgMSxXS5qhAyAQ782OKgDofyvskIqhYYuhm+jc6s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747417324; c=relaxed/simple; bh=GU4MOVdN8oQjUQHsT+2DBnOtiOsxgXpBZ4DC2Y4gtzY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=c6cTHIqGuqcQZ4l0SpE9DySnmil+s3AfPRIyK4xZjfoSa8w0mj7MGM75c9wDiazXxRCabcOKzyIO3oo8CwE21bkR4uS0/SskjMS240IxbWaK3EYWpC4LpiQKwlPDbxRJxRfuxpAaO3SJJQ2Mmk+hSqFtXgEBKwvixDwy9jqJkwE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=hC0rQ8QT; 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="hC0rQ8QT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 52017C4CEE4; Fri, 16 May 2025 17:42:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1747417324; bh=GU4MOVdN8oQjUQHsT+2DBnOtiOsxgXpBZ4DC2Y4gtzY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hC0rQ8QTsj46e6u5Rs2P7D48OuG1/AEL87VtzEn6EmPjNrYP9uhSNyxoegzwGO62d 3vc7GGdCMQtY8Htn/iFox0Hn54c7rMccbIV5aoX7TjIhEtNdpB55hdBD5VZcOnxBq5 0cm0hlj/BcCAFvxPBP6QO0FJdCqxy13LyduvIpvxehWwiMWHl6Rq1FAyzukyn+HlgO fUJjXK3NDN6Nbydl7/8Ir4Dp2LyKmGER0kSWXwSXwjGP7HRE57QVlhoyk1d2FZO/QF q/+dtnfHxC9teQLtSPSjDpJ/Q3xdKulm8MvX+hR1dTeYslWll43SvlD4Gia+Qk2xDF heDcUBrj3QXCA== From: Philipp Stanner To: Jonathan Corbet , Bjorn Helgaas , Philipp Stanner , Mark Brown , David Lechner , Andy Shevchenko , Zijun Hu , Yang Yingliang , Greg Kroah-Hartman , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: [PATCH v2 4/6] PCI: Remove request_flags relict from devres Date: Fri, 16 May 2025 19:41:39 +0200 Message-ID: <20250516174141.42527-5-phasta@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250516174141.42527-1-phasta@kernel.org> References: <20250516174141.42527-1-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=20 --- 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 18:55:31 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 7A0282741CD; Fri, 16 May 2025 17:42:08 +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=1747417328; cv=none; b=lTBe+laJS5FTSD+oJkSHR/Z0ArmFuX3x/868wg2CyEVPCmGHKKlXXTOyA6ukwKkqu8FoW2orHyg73tAVXtgkTJ6RZabS9wi7HGHssAQ5V48PEofleS2UuHvI5z+Yf62KdKlFfTIf24afi9TsA7WLfJD7mwu1+27DxN1YKvS/qj0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747417328; c=relaxed/simple; bh=42SV3VsGcpt92Drq8U0HrYQWXhRFIKXePa7w+P/2foY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jUS05ApE7JSWsUM2GIQcn50ad1q53EOLVW79BAB8qifZrHzt/Y/Wfhox8NOdCJ6PKnOI/e1B8rQ9vw9edohu7yrY2tQSaLYds5tR6rugLO1rH7gYmWSBE3l6yFFhvbohIoLQ1dM738jWjLSibZC4+O/71QAQkzuH93NhqtNS6kc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gDav7pF1; 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="gDav7pF1" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E10D0C4CEED; Fri, 16 May 2025 17:42:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1747417327; bh=42SV3VsGcpt92Drq8U0HrYQWXhRFIKXePa7w+P/2foY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gDav7pF1nB5OfnDe5qz8mfj2GY68W3O5AVp24hPXSqiQPIMlULryu7mmU/NjrETpk A9Ubmp/hmiPt9CHDQp4DqS1PQE+9UkISqnw8KOzV1QdK6annjlZIPhSnbY9AJV7pzE J7dkv4nE6ZKBbSIDGEyYUoToc0wAJDNXbiyqnkrxJwgguNUJ4rJyAMs3qE0zEFJ6xS n4I+oFJDoZI3BPiQ2a6WPftetrMZiDn0OkqLVHTZRxOmEJwM5MPngcmD6zKP/zZbxt 4QVvTKWBOYFdKQqmcSn33M/d+FUNgCmW/dc30qo1sucqu3b3a888hmEDOdDul1dCew pBnib39x7S5Gg== From: Philipp Stanner To: Jonathan Corbet , Bjorn Helgaas , Philipp Stanner , Mark Brown , David Lechner , Andy Shevchenko , Zijun Hu , Yang Yingliang , Greg Kroah-Hartman , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: [PATCH v2 5/6] PCI: Remove redundant set of request funcs Date: Fri, 16 May 2025 19:41:40 +0200 Message-ID: <20250516174141.42527-6-phasta@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250516174141.42527-1-phasta@kernel.org> References: <20250516174141.42527-1-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=20 --- 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 18:55:31 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 0E12825CC77; Fri, 16 May 2025 17:42:11 +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=1747417332; cv=none; b=sXnjoaNhqYPSosJbkNXuV0xZvMpWG7bEJJtk1QdjilI63/5FXmReEwSd8AYsBzURRSrsTaUpgyy+QfqQdXy9IFf1B0A6yNd/MgZCibBR1LriQkKOyin7lukfr4OEqG1D/w6L9zlA22itCRB8e7CMZpnGn/zY99HvESClduQjMuQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1747417332; c=relaxed/simple; bh=aHb4LFr3eYFJfnPvyI1wlR82Dyg/3IrBHAyHSTUXdVs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JgGycn1dKbIza4Y1VipeuitXaic0JD0GLnboMTT5/q1qPZGnwzrwb8ljdYFvTlC5xyK5jp3pq83oQJJ4ey3RDZb1Bo/x1GKqd82TT9rTgwBgfrYECMCLklmVHFTY0i3ILvVfD9worZ2ClhxFClPezkJJb7u7ycoUOl88M+jXEQs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=NhDGzoqd; 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="NhDGzoqd" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7B069C4CEE4; Fri, 16 May 2025 17:42:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1747417331; bh=aHb4LFr3eYFJfnPvyI1wlR82Dyg/3IrBHAyHSTUXdVs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NhDGzoqdjletwYuNaDgi1U4AcuQOMgW20BhwcM1wBJvkpFD36SozlJjvnGab7jR/0 diZuymZvQNPzh00utpf2XfPcAiaDTtYwLNFhPD+fI0EFW3nfhJfTMntJFZnylGCbmc Z4jh04hbZvclFsjw3lNB7X6LqZmugieea71pV3QU2bjlwV3h9RMtc6VWtN4xiKKZNp WdY/fE/x6W+BpXi9558CrnMDdQSNDv/jBt70GFD8gSuriRiomoAN7X9JjK+CL/LSnd Qu4uW0tby2Gp1Nb4e67NK+apYNIqzO+pSuksCBaEocXto+Gm/x5nBXt6qGUl5YPwLB SsX5+xdYz0Z2w== From: Philipp Stanner To: Jonathan Corbet , Bjorn Helgaas , Philipp Stanner , Mark Brown , David Lechner , Andy Shevchenko , Zijun Hu , Yang Yingliang , Greg Kroah-Hartman , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: [PATCH v2 6/6] PCI: Remove hybrid-devres hazzard warnings from doc Date: Fri, 16 May 2025 19:41:41 +0200 Message-ID: <20250516174141.42527-7-phasta@kernel.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250516174141.42527-1-phasta@kernel.org> References: <20250516174141.42527-1-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=20 --- 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