Skip to content

Commit 6d9c592

Browse files
Philipp Stannerbjorn-helgaas
authored andcommitted
PCI: Remove pcim_iomap_regions_request_all()
pcim_iomap_regions_request_all() have been deprecated in commit e354bb8 ("PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()"). All users of this function have been ported to other interfaces by now. Remove pcim_iomap_regions_request_all(). Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Philipp Stanner <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Damien Le Moal <[email protected]>
1 parent bfeb07b commit 6d9c592

File tree

3 files changed

+0
-59
lines changed

3 files changed

+0
-59
lines changed

Documentation/driver-api/driver-model/devres.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,6 @@ PCI
394394
pcim_enable_device() : after success, some PCI ops become managed
395395
pcim_iomap() : do iomap() on a single BAR
396396
pcim_iomap_regions() : do request_region() and iomap() on multiple BARs
397-
pcim_iomap_regions_request_all() : do request_region() on all and iomap() on multiple BARs
398397
pcim_iomap_table() : array of mapped addresses indexed by BAR
399398
pcim_iounmap() : do iounmap() on a single BAR
400399
pcim_iounmap_regions() : do iounmap() and release_region() on multiple BARs

drivers/pci/devres.c

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -959,62 +959,6 @@ int pcim_request_all_regions(struct pci_dev *pdev, const char *name)
959959
}
960960
EXPORT_SYMBOL(pcim_request_all_regions);
961961

962-
/**
963-
* pcim_iomap_regions_request_all - Request all BARs and iomap specified ones
964-
* (DEPRECATED)
965-
* @pdev: PCI device to map IO resources for
966-
* @mask: Mask of BARs to iomap
967-
* @name: Name associated with the requests
968-
*
969-
* Returns: 0 on success, negative error code on failure.
970-
*
971-
* Request all PCI BARs and iomap regions specified by @mask.
972-
*
973-
* To release these resources manually, call pcim_release_region() for the
974-
* regions and pcim_iounmap() for the mappings.
975-
*
976-
* This function is DEPRECATED. Don't use it in new code. Instead, use one
977-
* of the pcim_* region request functions in combination with a pcim_*
978-
* mapping function.
979-
*/
980-
int pcim_iomap_regions_request_all(struct pci_dev *pdev, int mask,
981-
const char *name)
982-
{
983-
int bar;
984-
int ret;
985-
void __iomem **legacy_iomap_table;
986-
987-
ret = pcim_request_all_regions(pdev, name);
988-
if (ret != 0)
989-
return ret;
990-
991-
for (bar = 0; bar < PCI_STD_NUM_BARS; bar++) {
992-
if (!mask_contains_bar(mask, bar))
993-
continue;
994-
if (!pcim_iomap(pdev, bar, 0))
995-
goto err;
996-
}
997-
998-
return 0;
999-
1000-
err:
1001-
/*
1002-
* If bar is larger than 0, then pcim_iomap() above has most likely
1003-
* failed because of -EINVAL. If it is equal 0, most likely the table
1004-
* couldn't be created, indicating -ENOMEM.
1005-
*/
1006-
ret = bar > 0 ? -EINVAL : -ENOMEM;
1007-
legacy_iomap_table = (void __iomem **)pcim_iomap_table(pdev);
1008-
1009-
while (--bar >= 0)
1010-
pcim_iounmap(pdev, legacy_iomap_table[bar]);
1011-
1012-
pcim_release_all_regions(pdev);
1013-
1014-
return ret;
1015-
}
1016-
EXPORT_SYMBOL(pcim_iomap_regions_request_all);
1017-
1018962
/**
1019963
* pcim_iounmap_regions - Unmap and release PCI BARs
1020964
* @pdev: PCI device to map IO resources for

include/linux/pci.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2301,8 +2301,6 @@ void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr);
23012301
void __iomem * const *pcim_iomap_table(struct pci_dev *pdev);
23022302
int pcim_request_region(struct pci_dev *pdev, int bar, const char *name);
23032303
int pcim_iomap_regions(struct pci_dev *pdev, int mask, const char *name);
2304-
int pcim_iomap_regions_request_all(struct pci_dev *pdev, int mask,
2305-
const char *name);
23062304
void pcim_iounmap_regions(struct pci_dev *pdev, int mask);
23072305
void __iomem *pcim_iomap_range(struct pci_dev *pdev, int bar,
23082306
unsigned long offset, unsigned long len);

0 commit comments

Comments
 (0)