mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
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@citrix.com> Acked-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
50bbacacb8
commit
f1f351df03
1 file changed
+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);
|
||||
}
|
||||
|
||||