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:
Roger Pau Monne committed 2025-05-15 11:21:26 +02:00
1 parent 50bbacacb8
commit f1f351df03
1 file changed
+1 -9
+1 -9
View File
@@ -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);
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.