[Intel-gfx] [PATCH 6/9] drm/i915: Drop __rcu from gem_context->vm

kernel test robot lkp at intel.com
Tue Aug 3 00:35:19 UTC 2021


Hi Daniel,

I love your patch! Perhaps something to improve:

[auto build test WARNING on drm-tip/drm-tip]
[cannot apply to drm-intel/for-linux-next drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next drm/drm-next v5.14-rc3 next-20210730]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Daniel-Vetter/remove-rcu-support-from-i915_address_space/20210802-234929
base:   git://anongit.freedesktop.org/drm/drm-tip drm-tip
config: i386-randconfig-s002-20210802 (attached as .config)
compiler: gcc-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.3-341-g8af24329-dirty
        # https://github.com/0day-ci/linux/commit/4a70c02a8b49ee9845e8222c55b4bf932e843224
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Daniel-Vetter/remove-rcu-support-from-i915_address_space/20210802-234929
        git checkout 4a70c02a8b49ee9845e8222c55b4bf932e843224
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=i386 SHELL=/bin/bash

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


sparse warnings: (new ones prefixed by >>)
   drivers/gpu/drm/i915/gem/i915_gem_context.c: note: in included file (through drivers/gpu/drm/i915/gt/intel_gt_requests.h, drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c):
   /usr/lib/gcc/x86_64-linux-gnu/10/include/stddef.h:406:9: sparse: sparse: preprocessor token offsetof redefined
   drivers/gpu/drm/i915/gem/i915_gem_context.c: note: in included file (through include/uapi/linux/posix_types.h, include/uapi/linux/types.h, include/linux/types.h, ...):
   include/linux/stddef.h:17:9: sparse: this was the original definition
   drivers/gpu/drm/i915/gem/i915_gem_context.c: note: in included file:
>> drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c:698:33: sparse: sparse: incompatible types in comparison expression (different address spaces):
>> drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c:698:33: sparse:    struct i915_address_space [noderef] __rcu *
>> drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c:698:33: sparse:    struct i915_address_space *

vim +698 drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c

f2085c8e950d53 drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c Chris Wilson   2019-08-27  631  
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  632  static int igt_ctx_exec(void *arg)
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  633  {
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  634  	struct drm_i915_private *i915 = arg;
e0695db7298ec2 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2019-03-22  635  	struct intel_engine_cs *engine;
6e1281412ab9e6 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-11-14  636  	int err = -ENODEV;
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  637  
0fdbe58c4a0f8c drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2018-07-06  638  	/*
0fdbe58c4a0f8c drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2018-07-06  639  	 * Create a few different contexts (with different mm) and write
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  640  	 * through each ctx/mm using the GPU making sure those writes end
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  641  	 * up in the expected pages of our obj.
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  642  	 */
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  643  
0fdbe58c4a0f8c drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2018-07-06  644  	if (!DRIVER_CAPS(i915)->has_logical_contexts)
0fdbe58c4a0f8c drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2018-07-06  645  		return 0;
0fdbe58c4a0f8c drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2018-07-06  646  
51757cf4d7e6e1 drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c Tvrtko Ursulin 2019-10-22  647  	for_each_uabi_engine(engine, i915) {
e0695db7298ec2 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2019-03-22  648  		struct drm_i915_gem_object *obj = NULL;
e0695db7298ec2 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2019-03-22  649  		unsigned long ncontexts, ndwords, dw;
f2085c8e950d53 drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c Chris Wilson   2019-08-27  650  		struct i915_request *tq[5] = {};
e0695db7298ec2 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2019-03-22  651  		struct igt_live_test t;
e0695db7298ec2 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2019-03-22  652  		IGT_TIMEOUT(end_time);
e0695db7298ec2 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2019-03-22  653  		LIST_HEAD(objects);
a8c9a7f52ec5a4 drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c Chris Wilson   2019-11-07  654  		struct file *file;
e0695db7298ec2 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2019-03-22  655  
e0695db7298ec2 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2019-03-22  656  		if (!intel_engine_can_store_dword(engine))
e0695db7298ec2 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2019-03-22  657  			continue;
e0695db7298ec2 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2019-03-22  658  
e0695db7298ec2 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2019-03-22  659  		if (!engine->context_size)
e0695db7298ec2 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2019-03-22  660  			continue; /* No logical context support in HW */
e0695db7298ec2 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2019-03-22  661  
ef47a0e0f49d53 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-03-13  662  		file = mock_file(i915);
ef47a0e0f49d53 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-03-13  663  		if (IS_ERR(file))
ef47a0e0f49d53 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-03-13  664  			return PTR_ERR(file);
ef47a0e0f49d53 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-03-13  665  
e0695db7298ec2 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2019-03-22  666  		err = igt_live_test_begin(&t, i915, __func__, engine->name);
8dd0f8d37eaec2 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2018-10-12  667  		if (err)
a4e7ccdac38ec8 drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c Chris Wilson   2019-10-04  668  			goto out_file;
8dd0f8d37eaec2 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2018-10-12  669  
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  670  		ncontexts = 0;
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  671  		ndwords = 0;
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  672  		dw = 0;
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  673  		while (!time_after(jiffies, end_time)) {
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  674  			struct i915_gem_context *ctx;
75b974a859e5d9 drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c Chris Wilson   2019-08-24  675  			struct intel_context *ce;
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  676  
5888d588597408 drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c Jason Ekstrand 2021-07-08  677  			ctx = kernel_context(i915, NULL);
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  678  			if (IS_ERR(ctx)) {
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  679  				err = PTR_ERR(ctx);
a4e7ccdac38ec8 drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c Chris Wilson   2019-10-04  680  				goto out_file;
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  681  			}
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  682  
75b974a859e5d9 drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c Chris Wilson   2019-08-24  683  			ce = i915_gem_context_get_engine(ctx, engine->legacy_idx);
21b0c32bdaba7c drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c Chris Wilson   2019-08-27  684  			GEM_BUG_ON(IS_ERR(ce));
75b974a859e5d9 drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c Chris Wilson   2019-08-24  685  
ca83d5840cb641 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-05-23  686  			if (!obj) {
75b974a859e5d9 drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c Chris Wilson   2019-08-24  687  				obj = create_test_object(ce->vm, file, &objects);
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  688  				if (IS_ERR(obj)) {
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  689  					err = PTR_ERR(obj);
75b974a859e5d9 drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c Chris Wilson   2019-08-24  690  					intel_context_put(ce);
c4e6488120e9ef drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c Chris Wilson   2019-08-27  691  					kernel_context_close(ctx);
a4e7ccdac38ec8 drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c Chris Wilson   2019-10-04  692  					goto out_file;
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  693  				}
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  694  			}
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  695  
75b974a859e5d9 drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c Chris Wilson   2019-08-24  696  			err = gpu_fill(ce, obj, dw);
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  697  			if (err) {
2935ed5339c495 drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c Chris Wilson   2019-10-04 @698  				pr_err("Failed to fill dword %lu [%lu/%lu] with gpu (%s) [full-ppgtt? %s], err=%d\n",
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  699  				       ndwords, dw, max_dwords(obj),
2935ed5339c495 drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c Chris Wilson   2019-10-04  700  				       engine->name,
a4e7ccdac38ec8 drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c Chris Wilson   2019-10-04  701  				       yesno(!!rcu_access_pointer(ctx->vm)),
a4e7ccdac38ec8 drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c Chris Wilson   2019-10-04  702  				       err);
f2085c8e950d53 drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c Chris Wilson   2019-08-27  703  				intel_context_put(ce);
c4e6488120e9ef drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c Chris Wilson   2019-08-27  704  				kernel_context_close(ctx);
a4e7ccdac38ec8 drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c Chris Wilson   2019-10-04  705  				goto out_file;
f2085c8e950d53 drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c Chris Wilson   2019-08-27  706  			}
f2085c8e950d53 drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c Chris Wilson   2019-08-27  707  
f2085c8e950d53 drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c Chris Wilson   2019-08-27  708  			err = throttle(ce, tq, ARRAY_SIZE(tq));
f2085c8e950d53 drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c Chris Wilson   2019-08-27  709  			if (err) {
f2085c8e950d53 drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c Chris Wilson   2019-08-27  710  				intel_context_put(ce);
c4e6488120e9ef drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c Chris Wilson   2019-08-27  711  				kernel_context_close(ctx);
a4e7ccdac38ec8 drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c Chris Wilson   2019-10-04  712  				goto out_file;
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  713  			}
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  714  
ca83d5840cb641 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-05-23  715  			if (++dw == max_dwords(obj)) {
ca83d5840cb641 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-05-23  716  				obj = NULL;
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  717  				dw = 0;
ca83d5840cb641 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-05-23  718  			}
e0695db7298ec2 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2019-03-22  719  
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  720  			ndwords++;
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  721  			ncontexts++;
f2085c8e950d53 drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c Chris Wilson   2019-08-27  722  
f2085c8e950d53 drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c Chris Wilson   2019-08-27  723  			intel_context_put(ce);
c4e6488120e9ef drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c Chris Wilson   2019-08-27  724  			kernel_context_close(ctx);
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  725  		}
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  726  
e0695db7298ec2 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2019-03-22  727  		pr_info("Submitted %lu contexts to %s, filling %lu dwords\n",
e0695db7298ec2 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2019-03-22  728  			ncontexts, engine->name, ndwords);
e0695db7298ec2 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2019-03-22  729  
e0695db7298ec2 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2019-03-22  730  		ncontexts = dw = 0;
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  731  		list_for_each_entry(obj, &objects, st_link) {
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  732  			unsigned int rem =
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  733  				min_t(unsigned int, ndwords - dw, max_dwords(obj));
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  734  
e0695db7298ec2 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2019-03-22  735  			err = cpu_check(obj, ncontexts++, rem);
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  736  			if (err)
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  737  				break;
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  738  
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  739  			dw += rem;
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  740  		}
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  741  
a4e7ccdac38ec8 drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c Chris Wilson   2019-10-04  742  out_file:
f2085c8e950d53 drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c Chris Wilson   2019-08-27  743  		throttle_release(tq, ARRAY_SIZE(tq));
e4a8c8130ba3ac drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2019-01-21  744  		if (igt_live_test_end(&t))
7c2f5bc5f0f41a drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2018-05-05  745  			err = -EIO;
791ff39ae32a34 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2017-02-13  746  
a8c9a7f52ec5a4 drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c Chris Wilson   2019-11-07  747  		fput(file);
e0695db7298ec2 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2019-03-22  748  		if (err)
e0695db7298ec2 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2019-03-22  749  			return err;
6582f4f613e352 drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c Chris Wilson   2019-07-04  750  
6582f4f613e352 drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c Chris Wilson   2019-07-04  751  		i915_gem_drain_freed_objects(i915);
e0695db7298ec2 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2019-03-22  752  	}
e0695db7298ec2 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2019-03-22  753  
e0695db7298ec2 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2019-03-22  754  	return 0;
e0695db7298ec2 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2019-03-22  755  }
e0695db7298ec2 drivers/gpu/drm/i915/selftests/i915_gem_context.c     Chris Wilson   2019-03-22  756  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 40618 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gfx/attachments/20210803/551e6657/attachment-0001.gz>


More information about the Intel-gfx mailing list