x86/iommu: use rangeset_subtract() in arch_iommu_hwdom_init()
PATCH 1/1 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é <[email protected]>
--- xen/drivers/passthrough/x86/iommu.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-)
xen/drivers/passthrough/x86/iommu.c +1 -9
@@ -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); }
Signature · 1 line
2.48.1
Quoted 4 lines · Roger Pau Monne
Remove an open-coded instance of
rangeset_subtract(). No functional change intended.Signed-off-by Roger Pau Monné <[email protected]>
Acked-by Jan Beulich <[email protected]>