|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] x86/iommu: use rangeset_subtract() in arch_iommu_hwdom_init()
commit f1f351df030986c7beccb76ae3dfb58bf436da18
Author: Roger Pau Monne <roger.pau@xxxxxxxxxx>
AuthorDate: Thu May 15 10:52:56 2025 +0200
Commit: Roger Pau Monne <roger.pau@xxxxxxxxxx>
CommitDate: Thu May 15 11:21:26 2025 +0200
x86/iommu: use rangeset_subtract() in arch_iommu_hwdom_init()
Remove an open-coded instance of rangeset_subtract(). No functional change
intended.
Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
xen/drivers/passthrough/x86/iommu.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/xen/drivers/passthrough/x86/iommu.c
b/xen/drivers/passthrough/x86/iommu.c
index 67f025c1ec..0954cc4922 100644
--- a/xen/drivers/passthrough/x86/iommu.c
+++ b/xen/drivers/passthrough/x86/iommu.c
@@ -312,14 +312,6 @@ void iommu_identity_map_teardown(struct domain *d)
}
}
-static int __hwdom_init cf_check map_subtract(unsigned long s, unsigned long e,
- void *data)
-{
- struct rangeset *map = data;
-
- return rangeset_remove_range(map, s, e);
-}
-
struct handle_iomemcap {
struct rangeset *r;
unsigned long last;
@@ -505,7 +497,7 @@ void __hwdom_init arch_iommu_hwdom_init(struct domain *d)
* since ranges in mmio_ro_ranges are already explicitly mapped below
* in read-only mode.
*/
- rc = rangeset_report_ranges(mmio_ro_ranges, 0, ~0UL, map_subtract,
map);
+ rc = rangeset_subtract(map, mmio_ro_ranges);
if ( rc )
panic("IOMMU failed to remove read-only regions: %d\n", rc);
}
--
generated by git-patchbot for /home/xen/git/xen.git#staging
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |