[Intel-gfx] [PATCH 3/3] drm/i915/selftests: Add selftest for memory region PF handling

kbuild test robot lkp at intel.com
Fri Dec 27 13:52:06 UTC 2019


Hi Abdiel,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on drm-tip/drm-tip next-20191220]
[cannot apply to v5.5-rc3]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Abdiel-Janulgue/drm-i915-Introduce-remap_io_sg-to-prefault-discontiguous-objects/20191225-032829
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-129-g341daf20-dirty
        make ARCH=x86_64 allmodconfig
        make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp at intel.com>


sparse warnings: (new ones prefixed by >>)

>> drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c:759:32: sparse: sparse: incorrect type in argument 1 (different address spaces)
>> drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c:759:32: sparse:    expected void const *s
>> drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c:759:32: sparse:    got unsigned int [noderef] [usertype] <asn:2> *[assigned] map

vim +759 drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c

   731	
   732	static int gtt_obj_set(struct drm_i915_gem_object *obj, bool init)
   733	{
   734		u32 __iomem *map;
   735		struct i915_vma *vma;
   736		int err = 0;
   737	
   738		i915_gem_object_lock(obj);
   739		err = i915_gem_object_set_to_gtt_domain(obj, true);
   740		i915_gem_object_unlock(obj);
   741		if (err)
   742			return err;
   743	
   744		vma = i915_gem_object_ggtt_pin(obj, NULL, 0, 0, PIN_MAPPABLE);
   745		if (IS_ERR(vma))
   746			return PTR_ERR(vma);
   747	
   748		intel_gt_pm_get(vma->vm->gt);
   749		map = i915_vma_pin_iomap(vma);
   750		i915_vma_unpin(vma);
   751		if (IS_ERR(map)) {
   752			err = PTR_ERR(map);
   753			goto out;
   754		}
   755	
   756		if (init) {
   757			memset_io(map, POISON_INUSE, PAGE_SIZE);
   758		} else {
 > 759			if (memchr_inv(map, POISON_FREE, PAGE_SIZE)) {
   760				pr_err("Write via mmap did not land in backing store\n");
   761				err = -EINVAL;
   762			}
   763		}
   764		i915_vma_unpin_iomap(vma);
   765	
   766	out:
   767		intel_gt_pm_put(vma->vm->gt);
   768		return err;
   769	}
   770	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation


More information about the Intel-gfx mailing list