[drm-intel:drm-intel-next-queued 7/9] drivers/gpu/drm/i915/selftests/intel_memory_region.c:166: undefined reference to `__umoddi3'

kbuild test robot lkp at intel.com
Sat Oct 12 19:20:09 UTC 2019


tree:   git://anongit.freedesktop.org/drm-intel drm-intel-next-queued
head:   6ad145fe0246abe31a312ce19321bb5b11635802
commit: 2f0b97ca02118630132dddf258fbdb5d5f5ec32a [7/9] drm/i915/region: support contiguous allocations
config: i386-randconfig-a004-201941 (attached as .config)
compiler: gcc-6 (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
reproduce:
        git checkout 2f0b97ca02118630132dddf258fbdb5d5f5ec32a
        # save the attached .config to linux build tree
        make ARCH=i386 

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

All errors (new ones prefixed by >>):

   ld: drivers/gpu/drm/i915/intel_memory_region.o: in function `igt_mock_contiguous':
>> drivers/gpu/drm/i915/selftests/intel_memory_region.c:166: undefined reference to `__umoddi3'

vim +166 drivers/gpu/drm/i915/selftests/intel_memory_region.c

   122	
   123	static int igt_mock_contiguous(void *arg)
   124	{
   125		struct intel_memory_region *mem = arg;
   126		struct drm_i915_gem_object *obj;
   127		unsigned long n_objects;
   128		LIST_HEAD(objects);
   129		LIST_HEAD(holes);
   130		I915_RND_STATE(prng);
   131		resource_size_t target;
   132		resource_size_t total;
   133		resource_size_t min;
   134		int err = 0;
   135	
   136		total = resource_size(&mem->region);
   137	
   138		/* Min size */
   139		obj = igt_object_create(mem, &objects, mem->mm.chunk_size,
   140					I915_BO_ALLOC_CONTIGUOUS);
   141		if (IS_ERR(obj))
   142			return PTR_ERR(obj);
   143	
   144		if (obj->mm.pages->nents != 1) {
   145			pr_err("%s min object spans multiple sg entries\n", __func__);
   146			err = -EINVAL;
   147			goto err_close_objects;
   148		}
   149	
   150		igt_object_release(obj);
   151	
   152		/* Max size */
   153		obj = igt_object_create(mem, &objects, total, I915_BO_ALLOC_CONTIGUOUS);
   154		if (IS_ERR(obj))
   155			return PTR_ERR(obj);
   156	
   157		if (obj->mm.pages->nents != 1) {
   158			pr_err("%s max object spans multiple sg entries\n", __func__);
   159			err = -EINVAL;
   160			goto err_close_objects;
   161		}
   162	
   163		igt_object_release(obj);
   164	
   165		/* Internal fragmentation should not bleed into the object size */
 > 166		target = round_up(prandom_u32_state(&prng) % total, PAGE_SIZE);
   167		target = max_t(u64, PAGE_SIZE, target);
   168	
   169		obj = igt_object_create(mem, &objects, target,
   170					I915_BO_ALLOC_CONTIGUOUS);
   171		if (IS_ERR(obj))
   172			return PTR_ERR(obj);
   173	
   174		if (obj->base.size != target) {
   175			pr_err("%s obj->base.size(%llx) != target(%llx)\n", __func__,
   176			       (u64)obj->base.size, (u64)target);
   177			err = -EINVAL;
   178			goto err_close_objects;
   179		}
   180	
   181		if (obj->mm.pages->nents != 1) {
   182			pr_err("%s object spans multiple sg entries\n", __func__);
   183			err = -EINVAL;
   184			goto err_close_objects;
   185		}
   186	
   187		igt_object_release(obj);
   188	
   189		/*
   190		 * Try to fragment the address space, such that half of it is free, but
   191		 * the max contiguous block size is SZ_64K.
   192		 */
   193	
   194		target = SZ_64K;
   195		n_objects = div64_u64(total, target);
   196	
   197		while (n_objects--) {
   198			struct list_head *list;
   199	
   200			if (n_objects % 2)
   201				list = &holes;
   202			else
   203				list = &objects;
   204	
   205			obj = igt_object_create(mem, list, target,
   206						I915_BO_ALLOC_CONTIGUOUS);
   207			if (IS_ERR(obj)) {
   208				err = PTR_ERR(obj);
   209				goto err_close_objects;
   210			}
   211		}
   212	
   213		close_objects(mem, &holes);
   214	
   215		min = target;
   216		target = total >> 1;
   217	
   218		/* Make sure we can still allocate all the fragmented space */
   219		obj = igt_object_create(mem, &objects, target, 0);
   220		if (IS_ERR(obj)) {
   221			err = PTR_ERR(obj);
   222			goto err_close_objects;
   223		}
   224	
   225		igt_object_release(obj);
   226	
   227		/*
   228		 * Even though we have enough free space, we don't have a big enough
   229		 * contiguous block. Make sure that holds true.
   230		 */
   231	
   232		do {
   233			bool should_fail = target > min;
   234	
   235			obj = igt_object_create(mem, &objects, target,
   236						I915_BO_ALLOC_CONTIGUOUS);
   237			if (should_fail != IS_ERR(obj)) {
   238				pr_err("%s target allocation(%llx) mismatch\n",
   239				       __func__, (u64)target);
   240				err = -EINVAL;
   241				goto err_close_objects;
   242			}
   243	
   244			target >>= 1;
   245		} while (target >= mem->mm.chunk_size);
   246	
   247	err_close_objects:
   248		list_splice_tail(&holes, &objects);
   249		close_objects(mem, &objects);
   250		return err;
   251	}
   252	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 29992 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20191013/272831e8/attachment-0001.gz>


More information about the dri-devel mailing list