}
}
- XE_BUG_ON(ads->regset_size < (count * sizeof(struct guc_mmio_reg)));
-
return count;
}
u32 addr = xe_bo_ggtt_addr(ads->bo) + regset_offset;
struct iosys_map regset_map = IOSYS_MAP_INIT_OFFSET(ads_to_map(ads),
regset_offset);
+ unsigned int regset_used = 0;
for_each_hw_engine(hwe, gt, id) {
unsigned int count;
addr += count * sizeof(struct guc_mmio_reg);
iosys_map_incr(®set_map, count * sizeof(struct guc_mmio_reg));
+
+ regset_used += count * sizeof(struct guc_mmio_reg);
}
+
+ XE_BUG_ON(regset_used > ads->regset_size);
}
static void guc_um_init_params(struct xe_guc_ads *ads)