lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <94dac340-2f92-40a3-be56-ba8bd2298328@quicinc.com>
Date: Thu, 3 Apr 2025 18:13:05 +0800
From: Zijun Hu <quic_zijuhu@...cinc.com>
To: Philipp Stanner <phasta@...nel.org>, Jonathan Corbet <corbet@....net>,
        Jens Axboe <axboe@...nel.dk>, Bjorn Helgaas <bhelgaas@...gle.com>,
        Mark Brown
	<broonie@...nel.org>,
        David Lechner <dlechner@...libre.com>,
        Philipp Stanner
	<pstanner@...hat.com>,
        Damien Le Moal <dlemoal@...nel.org>,
        Andy Shevchenko
	<andriy.shevchenko@...ux.intel.com>,
        Yang Yingliang
	<yangyingliang@...wei.com>,
        Hannes Reinecke <hare@...e.de>, Al Viro
	<viro@...iv.linux.org.uk>,
        Li Zetao <lizetao1@...wei.com>, Anuj Gupta
	<anuj20.g@...sung.com>
CC: <linux-doc@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <linux-block@...r.kernel.org>, <linux-pci@...r.kernel.org>
Subject: Re: [PATCH 2/2] PCI: Remove pcim_iounmap_regions()

On 3/27/2025 7:07 PM, Philipp Stanner wrote:
> From: Philipp Stanner <pstanner@...hat.com>
> 
> All users of the deprecated function pcim_iounmap_regions() have been
> ported by now. Remove it.
> 
> Signed-off-by: Philipp Stanner <pstanner@...hat.com>
> ---
>  .../driver-api/driver-model/devres.rst        |  1 -
>  drivers/pci/devres.c                          | 24 -------------------
>  include/linux/pci.h                           |  1 -
>  3 files changed, 26 deletions(-)
> 
> diff --git a/Documentation/driver-api/driver-model/devres.rst b/Documentation/driver-api/driver-model/devres.rst
> index d75728eb05f8..601f1a74d34d 100644
> --- a/Documentation/driver-api/driver-model/devres.rst
> +++ b/Documentation/driver-api/driver-model/devres.rst
> @@ -396,7 +396,6 @@ PCI
>    pcim_iomap_regions()		: do request_region() and iomap() on multiple BARs
>    pcim_iomap_table()		: array of mapped addresses indexed by BAR
>    pcim_iounmap()		: do iounmap() on a single BAR
> -  pcim_iounmap_regions()	: do iounmap() and release_region() on multiple BARs
>    pcim_pin_device()		: keep PCI device enabled after release
>    pcim_set_mwi()		: enable Memory-Write-Invalidate PCI transaction
>  
> diff --git a/drivers/pci/devres.c b/drivers/pci/devres.c
> index 3431a7df3e0d..c60441555758 100644
> --- a/drivers/pci/devres.c
> +++ b/drivers/pci/devres.c
> @@ -946,30 +946,6 @@ int pcim_request_all_regions(struct pci_dev *pdev, const char *name)
>  }
>  EXPORT_SYMBOL(pcim_request_all_regions);
>  
> -/**
> - * pcim_iounmap_regions - Unmap and release PCI BARs (DEPRECATED)
> - * @pdev: PCI device to map IO resources for
> - * @mask: Mask of BARs to unmap and release
> - *
> - * Unmap and release regions specified by @mask.
> - *
> - * This function is DEPRECATED. Do not use it in new code.
> - * Use pcim_iounmap_region() instead.
> - */
> -void pcim_iounmap_regions(struct pci_dev *pdev, int mask)
> -{
> -	int i;
> -
> -	for (i = 0; i < PCI_STD_NUM_BARS; i++) {
> -		if (!mask_contains_bar(mask, i))
> -			continue;
> -
> -		pcim_iounmap_region(pdev, i);
> -		pcim_remove_bar_from_legacy_table(pdev, i);
> -	}
> -}
> -EXPORT_SYMBOL(pcim_iounmap_regions);
> -
>  /**
>   * pcim_iomap_range - Create a ranged __iomap mapping within a PCI BAR
>   * @pdev: PCI device to map IO resources for
> diff --git a/include/linux/pci.h b/include/linux/pci.h
> index 47b31ad724fa..7661f10913ca 100644
> --- a/include/linux/pci.h
> +++ b/include/linux/pci.h
> @@ -2323,7 +2323,6 @@ void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr);
>  void __iomem * const *pcim_iomap_table(struct pci_dev *pdev);
>  int pcim_request_region(struct pci_dev *pdev, int bar, const char *name);
>  int pcim_iomap_regions(struct pci_dev *pdev, int mask, const char *name);
> -void pcim_iounmap_regions(struct pci_dev *pdev, int mask);
>  void __iomem *pcim_iomap_range(struct pci_dev *pdev, int bar,
>  				unsigned long offset, unsigned long len);
>  

Reviewed-by: Zijun Hu <quic_zijuhu@...cinc.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ