Message ID | 20210106123939.18435-2-chris@chris-wilson.co.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/4] drm/i915/selftests: Break out of the lrc layout test after register mismatch | expand |
On 06/01/2021 12:39, Chris Wilson wrote: > Use memset_io() on the iomem, and silence sparse as we copy from the > iomem to normal system pages. > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> > --- > drivers/gpu/drm/i915/gt/selftest_reset.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/i915/gt/selftest_reset.c b/drivers/gpu/drm/i915/gt/selftest_reset.c > index 5ec8d4e9983f..b7befcfbdcde 100644 > --- a/drivers/gpu/drm/i915/gt/selftest_reset.c > +++ b/drivers/gpu/drm/i915/gt/selftest_reset.c > @@ -96,10 +96,10 @@ __igt_reset_stolen(struct intel_gt *gt, > if (!__drm_mm_interval_first(>->i915->mm.stolen, > page << PAGE_SHIFT, > ((page + 1) << PAGE_SHIFT) - 1)) > - memset32(s, STACK_MAGIC, PAGE_SIZE / sizeof(u32)); > + memset_io(s, STACK_MAGIC, PAGE_SIZE); > > - in = s; > - if (i915_memcpy_from_wc(tmp, s, PAGE_SIZE)) > + in = (void __force *)s; > + if (i915_memcpy_from_wc(tmp, in, PAGE_SIZE)) > in = tmp; > crc[page] = crc32_le(0, in, PAGE_SIZE); > > @@ -134,8 +134,8 @@ __igt_reset_stolen(struct intel_gt *gt, > ggtt->error_capture.start, > PAGE_SIZE); > > - in = s; > - if (i915_memcpy_from_wc(tmp, s, PAGE_SIZE)) > + in = (void __force *)s; > + if (i915_memcpy_from_wc(tmp, in, PAGE_SIZE)) > in = tmp; > x = crc32_le(0, in, PAGE_SIZE); > > Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Regards, Tvrtko
diff --git a/drivers/gpu/drm/i915/gt/selftest_reset.c b/drivers/gpu/drm/i915/gt/selftest_reset.c index 5ec8d4e9983f..b7befcfbdcde 100644 --- a/drivers/gpu/drm/i915/gt/selftest_reset.c +++ b/drivers/gpu/drm/i915/gt/selftest_reset.c @@ -96,10 +96,10 @@ __igt_reset_stolen(struct intel_gt *gt, if (!__drm_mm_interval_first(>->i915->mm.stolen, page << PAGE_SHIFT, ((page + 1) << PAGE_SHIFT) - 1)) - memset32(s, STACK_MAGIC, PAGE_SIZE / sizeof(u32)); + memset_io(s, STACK_MAGIC, PAGE_SIZE); - in = s; - if (i915_memcpy_from_wc(tmp, s, PAGE_SIZE)) + in = (void __force *)s; + if (i915_memcpy_from_wc(tmp, in, PAGE_SIZE)) in = tmp; crc[page] = crc32_le(0, in, PAGE_SIZE); @@ -134,8 +134,8 @@ __igt_reset_stolen(struct intel_gt *gt, ggtt->error_capture.start, PAGE_SIZE); - in = s; - if (i915_memcpy_from_wc(tmp, s, PAGE_SIZE)) + in = (void __force *)s; + if (i915_memcpy_from_wc(tmp, in, PAGE_SIZE)) in = tmp; x = crc32_le(0, in, PAGE_SIZE);
Use memset_io() on the iomem, and silence sparse as we copy from the iomem to normal system pages. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> --- drivers/gpu/drm/i915/gt/selftest_reset.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)