tree:
git://people.freedesktop.org/~mlankhorst/linux locking-rework
head: df835d9d9fee30c2d4584242c64c8b32eae0d0a4
commit: 1537cd41b6372ff0e16eebc7d867d6d6ad7aebde [29/30] remove obj->mm.lock
config: x86_64-fedora-25 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
git checkout 1537cd41b6372ff0e16eebc7d867d6d6ad7aebde
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/rhashtable-types.h:14,
from include/linux/ipc.h:7,
from include/uapi/linux/sem.h:5,
from include/linux/sem.h:5,
from include/linux/sched.h:15,
from include/linux/sched/mm.h:7,
from drivers/gpu/drm/i915/gem/i915_gem_object.c:25:
drivers/gpu/drm/i915/gem/i915_gem_object.c: In function
'i915_gem_object_init':
> drivers/gpu/drm/i915/gem/i915_gem_object.c:56:22: error:
'struct <anonymous>' has no member named 'lock'; did you mean
'blocks'?
56 | mutex_init(&obj->mm.lock);
| ^~~~
include/linux/mutex.h:108:16: note: in definition of macro 'mutex_init'
108 | __mutex_init((mutex), #mutex, &__key); \
| ^~~~~
drivers/gpu/drm/i915/gem/i915_gem_object.c:79:22: error: 'struct
<anonymous>' has no member named 'lock'; did you mean 'blocks'?
79 | &obj->mm.lock);
| ^~~~
| blocks
--
In file included from include/linux/spinlock_types.h:18,
from include/linux/spinlock.h:83,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/slab.h:15,
from include/linux/io-mapping.h:10,
from drivers/gpu/drm/i915/i915_drv.h:36,
from drivers/gpu/drm/i915/gem/i915_gem_pages.c:7:
drivers/gpu/drm/i915/gem/i915_gem_pages.c: In function
'__i915_gem_object_set_pages':
> drivers/gpu/drm/i915/gem/i915_gem_pages.c:21:31: error:
'struct <anonymous>' has no member named 'lock'; did you mean
'blocks'?
21 | lockdep_assert_held(&obj->mm.lock);
| ^~~~
include/linux/lockdep.h:545:46: note: in definition of macro
'lockdep_assert_held'
545 | #define lockdep_assert_held(l) do { (void)(l); } while (0)
| ^
In file included from include/linux/notifier.h:14,
from arch/x86/include/asm/uprobes.h:13,
from include/linux/uprobes.h:49,
from include/linux/mm_types.h:14,
from include/linux/mmzone.h:21,
from include/linux/gfp.h:6,
from include/linux/slab.h:15,
from include/linux/io-mapping.h:10,
from drivers/gpu/drm/i915/i915_drv.h:36,
from drivers/gpu/drm/i915/gem/i915_gem_pages.c:7:
drivers/gpu/drm/i915/gem/i915_gem_pages.c: In function
'__i915_gem_object_get_pages':
drivers/gpu/drm/i915/gem/i915_gem_pages.c:112:49: error: 'struct
<anonymous>' has no member named 'lock'; did you mean 'blocks'?
112 | err = mutex_lock_interruptible_nested(&obj->mm.lock,
I915_MM_GET_PAGES);
| ^~~~
include/linux/mutex.h:174:83: note: in definition of macro
'mutex_lock_interruptible_nested'
174 | # define mutex_lock_interruptible_nested(lock, subclass)
mutex_lock_interruptible(lock)
|
^~~~
drivers/gpu/drm/i915/gem/i915_gem_pages.c:128:24: error: 'struct
<anonymous>' has no member named 'lock'; did you mean 'blocks'?
128 | mutex_unlock(&obj->mm.lock);
| ^~~~
| blocks
In file included from include/linux/spinlock_types.h:18,
from include/linux/spinlock.h:83,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:6,
from include/linux/slab.h:15,
from include/linux/io-mapping.h:10,
from drivers/gpu/drm/i915/i915_drv.h:36,
from drivers/gpu/drm/i915/gem/i915_gem_pages.c:7:
drivers/gpu/drm/i915/gem/i915_gem_pages.c: In function
'i915_gem_object_writeback':
drivers/gpu/drm/i915/gem/i915_gem_pages.c:143:31: error: 'struct
<anonymous>' has no member named 'lock'; did you mean 'blocks'?
143 | lockdep_assert_held(&obj->mm.lock);
| ^~~~
include/linux/lockdep.h:545:46: note: in definition of macro
'lockdep_assert_held'
545 | #define lockdep_assert_held(l) do { (void)(l); } while (0)
| ^
drivers/gpu/drm/i915/gem/i915_gem_pages.c: In function
'__i915_gem_object_put_pages':
drivers/gpu/drm/i915/gem/i915_gem_pages.c:203:22: error: 'struct
<anonymous>' has no member named 'lock'; did you mean 'blocks'?
203 | mutex_lock(&obj->mm.lock);
| ^~~~
| blocks
drivers/gpu/drm/i915/gem/i915_gem_pages.c:232:24: error: 'struct
<anonymous>' has no member named 'lock'; did you mean 'blocks'?
232 | mutex_unlock(&obj->mm.lock);
| ^~~~
| blocks
In file included from include/linux/notifier.h:14,
from arch/x86/include/asm/uprobes.h:13,
from include/linux/uprobes.h:49,
from include/linux/mm_types.h:14,
from include/linux/mmzone.h:21,
from include/linux/gfp.h:6,
from include/linux/slab.h:15,
from include/linux/io-mapping.h:10,
from drivers/gpu/drm/i915/i915_drv.h:36,
from drivers/gpu/drm/i915/gem/i915_gem_pages.c:7:
drivers/gpu/drm/i915/gem/i915_gem_pages.c: In function
'i915_gem_object_pin_map':
drivers/gpu/drm/i915/gem/i915_gem_pages.c:328:49: error: 'struct
<anonymous>' has no member named 'lock'; did you mean 'blocks'?
328 | err = mutex_lock_interruptible_nested(&obj->mm.lock,
I915_MM_GET_PAGES);
| ^~~~
include/linux/mutex.h:174:83: note: in definition of macro
'mutex_lock_interruptible_nested'
174 | # define mutex_lock_interruptible_nested(lock, subclass)
mutex_lock_interruptible(lock)
|
^~~~
drivers/gpu/drm/i915/gem/i915_gem_pages.c:373:24: error: 'struct
<anonymous>' has no member named 'lock'; did you mean 'blocks'?
373 | mutex_unlock(&obj->mm.lock);
| ^~~~
| blocks
--
In file included from include/linux/notifier.h:14,
from arch/x86/include/asm/uprobes.h:13,
from include/linux/uprobes.h:49,
from include/linux/mm_types.h:14,
from include/linux/mmzone.h:21,
from include/linux/gfp.h:6,
from include/linux/xarray.h:14,
from include/linux/radix-tree.h:18,
from include/linux/fs.h:15,
from include/linux/highmem.h:5,
from drivers/gpu/drm/i915/gem/i915_gem_phys.c:7:
drivers/gpu/drm/i915/gem/i915_gem_phys.c: In function
'i915_gem_object_attach_phys':
> drivers/gpu/drm/i915/gem/i915_gem_phys.c:177:29: error:
'struct <anonymous>' has no member named 'lock'; did you mean
'blocks'?
177 | mutex_lock_nested(&obj->mm.lock,
I915_MM_GET_PAGES);
| ^~~~
include/linux/mutex.h:173:55: note: in definition of macro 'mutex_lock_nested'
173 | # define mutex_lock_nested(lock, subclass) mutex_lock(lock)
| ^~~~
drivers/gpu/drm/i915/gem/i915_gem_phys.c:220:24: error: 'struct
<anonymous>' has no member named 'lock'; did you mean 'blocks'?
220 | mutex_unlock(&obj->mm.lock);
| ^~~~
| blocks
--
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c: In function 'i915_gem_shrink':
> drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:197:25: error:
'struct <anonymous>' has no member named 'lock'; did you mean
'blocks'?
197 | mutex_lock(&obj->mm.lock);
| ^~~~
| blocks
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:202:27: error: 'struct
<anonymous>' has no member named 'lock'; did you mean 'blocks'?
202 | mutex_unlock(&obj->mm.lock);
| ^~~~
| blocks
--
drivers/gpu/drm/i915/gem/i915_gem_tiling.c: In function
'i915_gem_object_set_tiling':
> drivers/gpu/drm/i915/gem/i915_gem_tiling.c:268:22: error:
'struct <anonymous>' has no member named 'lock'; did you mean
'blocks'?
268 | mutex_lock(&obj->mm.lock);
| ^~~~
| blocks
drivers/gpu/drm/i915/gem/i915_gem_tiling.c:283:24: error: 'struct
<anonymous>' has no member named 'lock'; did you mean 'blocks'?
283 | mutex_unlock(&obj->mm.lock);
| ^~~~
| blocks
vim +56 drivers/gpu/drm/i915/gem/i915_gem_object.c
25 #include <linux/sched/mm.h>
26
27 #include "display/intel_frontbuffer.h"
28 #include "gt/intel_gt.h"
29 #include "i915_drv.h"
30 #include "i915_gem_clflush.h"
31 #include "i915_gem_context.h"
32 #include "i915_gem_mman.h"
33 #include "i915_gem_object.h"
34 #include "i915_globals.h"
35 #include "i915_trace.h"
36
37 static struct i915_global_object {
38 struct i915_global base;
39 struct kmem_cache *slab_objects;
40 } global;
41
42 struct drm_i915_gem_object *i915_gem_object_alloc(void)
43 {
44 return kmem_cache_zalloc(global.slab_objects, GFP_KERNEL);
45 }
46
47 void i915_gem_object_free(struct drm_i915_gem_object *obj)
48 {
49 return kmem_cache_free(global.slab_objects, obj);
50 }
51
52 void i915_gem_object_init(struct drm_i915_gem_object *obj,
53 const struct drm_i915_gem_object_ops *ops,
54 struct lock_class_key *key)
55 {
56 mutex_init(&obj->mm.lock);
57
58 spin_lock_init(&obj->vma.lock);
59 INIT_LIST_HEAD(&obj->vma.list);
60
61 INIT_LIST_HEAD(&obj->mm.link);
62
63 INIT_LIST_HEAD(&obj->lut_list);
64 spin_lock_init(&obj->lut_lock);
65
66 spin_lock_init(&obj->mmo.lock);
67 obj->mmo.offsets = RB_ROOT;
68
69 init_rcu_head(&obj->rcu);
70
71 obj->ops = ops;
72
73 obj->mm.madv = I915_MADV_WILLNEED;
74 INIT_RADIX_TREE(&obj->mm.get_page.radix, GFP_KERNEL | __GFP_NOWARN);
75 mutex_init(&obj->mm.get_page.lock);
76
77 if (IS_ENABLED(CONFIG_LOCKDEP) && i915_gem_object_is_shrinkable(obj))
78 i915_gem_shrinker_taints_mutex(to_i915(obj->base.dev),
79 &obj->mm.lock);
80 }
81
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org