[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] 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>
---
 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 67f025c1ec6a..0954cc49225e 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);
     }
-- 
2.48.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.