tree:
https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/wip
head: e0967d360dc97cb0ded9a6fe5d0349d26310e254
commit: 60637d1dffb1fcc6d71a2fdc07b88038a25f3738 [4/12] irq_work: Cleanup
config: x86_64-rhel-7.6-kselftests (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce (this is a W=1 build):
git checkout 60637d1dffb1fcc6d71a2fdc07b88038a25f3738
# 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/err.h:5,
from include/linux/dma-fence.h:16,
from include/linux/dma-fence-array.h:15,
from drivers/gpu/drm/i915/i915_request.c:25:
drivers/gpu/drm/i915/i915_request.c: In function '__notify_execute_cb':
> drivers/gpu/drm/i915/i915_request.c:199:12: error: 'struct
irq_work' has no member named 'llnode'; did you mean 'node'?
199 | work.llnode)
| ^~~~~~
include/linux/compiler.h:319:9: note: in definition of macro
'__compiletime_assert'
319 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler.h:339:2: note: in expansion of macro
'_compiletime_assert'
339 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro
'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:1003:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
1003 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~~~~~~
include/linux/kernel.h:1003:20: note: in expansion of macro '__same_type'
1003 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~
include/linux/llist.h:81:2: note: in expansion of macro 'container_of'
81 | container_of(ptr, type, member)
| ^~~~~~~~~~~~
include/linux/llist.h:174:13: note: in expansion of macro 'llist_entry'
174 | for (pos = llist_entry((node), typeof(*pos), member); \
| ^~~~~~~~~~~
drivers/gpu/drm/i915/i915_request.c:197:2: note: in expansion of macro
'llist_for_each_entry_safe'
197 | llist_for_each_entry_safe(cb, cn,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from <command-line>:
> drivers/gpu/drm/i915/i915_request.c:199:12: error: 'struct
irq_work' has no member named 'llnode'; did you mean 'node'?
199 | work.llnode)
| ^~~~~~
include/linux/compiler_types.h:135:57: note: in definition of macro
'__compiler_offsetof'
135 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
| ^
include/linux/kernel.h:1006:21: note: in expansion of macro 'offsetof'
1006 | ((type *)(__mptr - offsetof(type, member))); })
| ^~~~~~~~
include/linux/llist.h:81:2: note: in expansion of macro 'container_of'
81 | container_of(ptr, type, member)
| ^~~~~~~~~~~~
include/linux/llist.h:174:13: note: in expansion of macro 'llist_entry'
174 | for (pos = llist_entry((node), typeof(*pos), member); \
| ^~~~~~~~~~~
drivers/gpu/drm/i915/i915_request.c:197:2: note: in expansion of macro
'llist_for_each_entry_safe'
197 | llist_for_each_entry_safe(cb, cn,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/i915/i915_request.c:199:12: error: 'struct
irq_work' has no member named 'llnode'; did you mean 'node'?
199 | work.llnode)
| ^~~~~~
include/linux/compiler_types.h:135:57: note: in definition of macro
'__compiler_offsetof'
135 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
| ^
include/linux/llist.h:98:22: note: in expansion of macro 'offsetof'
98 | ((uintptr_t)(ptr) + offsetof(typeof(*(ptr)), member) != 0)
| ^~~~~~~~
include/linux/llist.h:175:7: note: in expansion of macro
'member_address_is_nonnull'
175 | member_address_is_nonnull(pos, member) && \
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/i915_request.c:197:2: note: in expansion of macro
'llist_for_each_entry_safe'
197 | llist_for_each_entry_safe(cb, cn,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/list.h:9,
from include/linux/wait.h:7,
from include/linux/dma-fence.h:17,
from include/linux/dma-fence-array.h:15,
from drivers/gpu/drm/i915/i915_request.c:25:
> drivers/gpu/drm/i915/i915_request.c:199:12: error: 'struct
irq_work' has no member named 'llnode'; did you mean 'node'?
199 | work.llnode)
| ^~~~~~
include/linux/kernel.h:1002:26: note: in definition of macro 'container_of'
1002 | void *__mptr = (void *)(ptr); \
| ^~~
include/linux/llist.h:176:15: note: in expansion of macro 'llist_entry'
176 | (n = llist_entry(pos->member.next, typeof(*n), member), true); \
| ^~~~~~~~~~~
drivers/gpu/drm/i915/i915_request.c:197:2: note: in expansion of macro
'llist_for_each_entry_safe'
197 | llist_for_each_entry_safe(cb, cn,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/err.h:5,
from include/linux/dma-fence.h:16,
from include/linux/dma-fence-array.h:15,
from drivers/gpu/drm/i915/i915_request.c:25:
> drivers/gpu/drm/i915/i915_request.c:199:12: error: 'struct
irq_work' has no member named 'llnode'; did you mean 'node'?
199 | work.llnode)
| ^~~~~~
include/linux/compiler.h:319:9: note: in definition of macro
'__compiletime_assert'
319 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler.h:339:2: note: in expansion of macro
'_compiletime_assert'
339 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro
'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:1003:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
1003 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~~~~~~
include/linux/kernel.h:1003:20: note: in expansion of macro '__same_type'
1003 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~
include/linux/llist.h:81:2: note: in expansion of macro 'container_of'
81 | container_of(ptr, type, member)
| ^~~~~~~~~~~~
include/linux/llist.h:176:15: note: in expansion of macro 'llist_entry'
176 | (n = llist_entry(pos->member.next, typeof(*n), member), true); \
| ^~~~~~~~~~~
drivers/gpu/drm/i915/i915_request.c:197:2: note: in expansion of macro
'llist_for_each_entry_safe'
197 | llist_for_each_entry_safe(cb, cn,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/i915/i915_request.c:199:12: error: 'struct
irq_work' has no member named 'llnode'; did you mean 'node'?
199 | work.llnode)
| ^~~~~~
include/linux/compiler.h:319:9: note: in definition of macro
'__compiletime_assert'
319 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler.h:339:2: note: in expansion of macro
'_compiletime_assert'
339 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro
'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:1003:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
1003 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~~~~~~
include/linux/kernel.h:1003:20: note: in expansion of macro '__same_type'
1003 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~
include/linux/llist.h:81:2: note: in expansion of macro 'container_of'
81 | container_of(ptr, type, member)
| ^~~~~~~~~~~~
include/linux/llist.h:176:15: note: in expansion of macro 'llist_entry'
176 | (n = llist_entry(pos->member.next, typeof(*n), member), true); \
| ^~~~~~~~~~~
drivers/gpu/drm/i915/i915_request.c:197:2: note: in expansion of macro
'llist_for_each_entry_safe'
197 | llist_for_each_entry_safe(cb, cn,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/i915/i915_request.c:199:12: error: 'struct
irq_work' has no member named 'llnode'; did you mean 'node'?
199 | work.llnode)
| ^~~~~~
include/linux/compiler.h:319:9: note: in definition of macro
'__compiletime_assert'
319 | if (!(condition)) \
| ^~~~~~~~~
include/linux/compiler.h:339:2: note: in expansion of macro
'_compiletime_assert'
339 | _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
| ^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro
'compiletime_assert'
39 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
| ^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:1003:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
1003 | BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
| ^~~~~~~~~~~~~~~~
include/linux/kernel.h:1004:6: note: in expansion of macro '__same_type'
1004 | !__same_type(*(ptr), void), \
| ^~~~~~~~~~~
include/linux/llist.h:81:2: note: in expansion of macro 'container_of'
81 | container_of(ptr, type, member)
| ^~~~~~~~~~~~
include/linux/llist.h:176:15: note: in expansion of macro 'llist_entry'
176 | (n = llist_entry(pos->member.next, typeof(*n), member), true); \
| ^~~~~~~~~~~
drivers/gpu/drm/i915/i915_request.c:197:2: note: in expansion of macro
'llist_for_each_entry_safe'
197 | llist_for_each_entry_safe(cb, cn,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from <command-line>:
> drivers/gpu/drm/i915/i915_request.c:199:12: error: 'struct
irq_work' has no member named 'llnode'; did you mean 'node'?
199 | work.llnode)
| ^~~~~~
include/linux/compiler_types.h:135:57: note: in definition of macro
'__compiler_offsetof'
135 | #define __compiler_offsetof(a, b) __builtin_offsetof(a, b)
| ^
include/linux/kernel.h:1006:21: note: in expansion of macro 'offsetof'
1006 | ((type *)(__mptr - offsetof(type, member))); })
| ^~~~~~~~
include/linux/llist.h:81:2: note: in expansion of macro 'container_of'
81 | container_of(ptr, type, member)
| ^~~~~~~~~~~~
include/linux/llist.h:176:15: note: in expansion of macro 'llist_entry'
176 | (n = llist_entry(pos->member.next, typeof(*n), member), true); \
| ^~~~~~~~~~~
drivers/gpu/drm/i915/i915_request.c:197:2: note: in expansion of macro
'llist_for_each_entry_safe'
197 | llist_for_each_entry_safe(cb, cn,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/smp_types.h:5,
from include/linux/smp.h:15,
from include/linux/percpu.h:7,
from include/linux/hrtimer.h:19,
from include/linux/sched.h:20,
from include/linux/dma-fence.h:21,
from include/linux/dma-fence-array.h:15,
from drivers/gpu/drm/i915/i915_request.c:25:
include/linux/llist.h:176:64: warning: left-hand operand of comma expression has no
effect [-Wunused-value]
176 | (n = llist_entry(pos->member.next, typeof(*n), member), true); \
| ^
drivers/gpu/drm/i915/i915_request.c:197:2: note: in expansion of macro
'llist_for_each_entry_safe'
197 | llist_for_each_entry_safe(cb, cn,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/i915_request.c: In function '__await_execution':
drivers/gpu/drm/i915/i915_request.c:481:26: error: 'struct irq_work' has no
member named 'llnode'; did you mean 'node'?
481 | if (llist_add(&cb->work.llnode, &signal->execute_cb)) {
| ^~~~~~
| node
vim +199 drivers/gpu/drm/i915/i915_request.c
b52992c06c9020 drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-10-28 @25
#include <linux/dma-fence-array.h>
3136deb7ba223f drivers/gpu/drm/i915/i915_request.c Lionel Landwerlin 2020-05-08 26
#include <linux/dma-fence-chain.h>
e8861964697116 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-03-01 27
#include <linux/irq_work.h>
e8861964697116 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-03-01 28
#include <linux/prefetch.h>
e601757102cfd3 drivers/gpu/drm/i915/i915_gem_request.c Ingo Molnar 2017-02-01 29
#include <linux/sched.h>
e601757102cfd3 drivers/gpu/drm/i915/i915_gem_request.c Ingo Molnar 2017-02-01 30
#include <linux/sched/clock.h>
f361bf4a66c9bf drivers/gpu/drm/i915/i915_gem_request.c Ingo Molnar 2017-02-03 31
#include <linux/sched/signal.h>
fa545cbf976591 drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-08-04 32
10be98a77c558f drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-05-28 33
#include "gem/i915_gem_context.h"
10be98a77c558f drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-05-28 34
#include "gt/intel_context.h"
2871ea85c119e6 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-10-24 35
#include "gt/intel_ring.h"
3e7abf8141935d drivers/gpu/drm/i915/i915_request.c Andi Shyti 2019-10-24 36
#include "gt/intel_rps.h"
10be98a77c558f drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-05-28 37
21950ee7cc8f13 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-02-05 38
#include "i915_active.h"
696173b064c6da drivers/gpu/drm/i915/i915_request.c Jani Nikula 2019-04-05 39
#include "i915_drv.h"
103b76eeff2e86 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-03-05 40
#include "i915_globals.h"
a09d9a8002368e drivers/gpu/drm/i915/i915_request.c Jani Nikula 2019-08-06 41
#include "i915_trace.h"
696173b064c6da drivers/gpu/drm/i915/i915_request.c Jani Nikula 2019-04-05 42
#include "intel_pm.h"
05235c535404b7 drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-07-20 43
e8861964697116 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-03-01 44
struct execute_cb {
e8861964697116 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-03-01 45
struct irq_work work;
e8861964697116 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-03-01 46
struct i915_sw_fence *fence;
f71e01a78bee1c drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-05-21 47
void (*hook)(struct i915_request *rq, struct dma_fence *signal);
f71e01a78bee1c drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-05-21 48
struct i915_request *signal;
e8861964697116 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-03-01 49
};
e8861964697116 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-03-01 50
32eb6bcfdda9da drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-02-28 51
static struct i915_global_request {
103b76eeff2e86 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-03-05 52
struct i915_global base;
32eb6bcfdda9da drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-02-28 53
struct kmem_cache *slab_requests;
e8861964697116 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-03-01 54
struct kmem_cache *slab_execute_cbs;
32eb6bcfdda9da drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-02-28 55
} global;
32eb6bcfdda9da drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-02-28 56
f54d1867005c33 drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-10-25 57
static const char *i915_fence_get_driver_name(struct dma_fence *fence)
04769652c8c7ad drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-07-20 58
{
5a833995364141 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-06-02 59
return dev_name(to_request(fence)->engine->i915->drm.dev);
04769652c8c7ad drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-07-20 60
}
04769652c8c7ad drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-07-20 61
f54d1867005c33 drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-10-25 62
static const char *i915_fence_get_timeline_name(struct dma_fence *fence)
04769652c8c7ad drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-07-20 63
{
9f3ccd40acf4a3 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-12-20 64
const struct i915_gem_context *ctx;
9f3ccd40acf4a3 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-12-20 65
e61e0f51ba7974 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2018-02-21 66
/*
e61e0f51ba7974 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2018-02-21 67
* The timeline struct (as part of the ppgtt underneath a context)
05506b5be081b7 drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2017-03-30 68
* may be freed when the request is no longer in use by the GPU.
05506b5be081b7 drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2017-03-30 69
* We could extend the life of a context to beyond that of all
05506b5be081b7 drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2017-03-30 70
* fences, possibly keeping the hw resource around indefinitely,
05506b5be081b7 drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2017-03-30 71
* or we just give them a false name. Since
05506b5be081b7 drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2017-03-30 72
* dma_fence_ops.get_timeline_name is a debug feature, the occasional
05506b5be081b7 drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2017-03-30 73
* lie seems justifiable.
05506b5be081b7 drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2017-03-30 74
*/
05506b5be081b7 drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2017-03-30 75
if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags))
05506b5be081b7 drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2017-03-30 76
return "signaled";
05506b5be081b7 drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2017-03-30 77
6a8679c048eb10 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-12-22 78
ctx = i915_request_gem_context(to_request(fence));
9f3ccd40acf4a3 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-12-20 79
if (!ctx)
9f3ccd40acf4a3 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-12-20 80
return "[" DRIVER_NAME "]";
9f3ccd40acf4a3 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-12-20 81
9f3ccd40acf4a3 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-12-20 82
return ctx->name;
04769652c8c7ad drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-07-20 83
}
04769652c8c7ad drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-07-20 84
f54d1867005c33 drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-10-25 85
static bool i915_fence_signaled(struct dma_fence *fence)
04769652c8c7ad drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-07-20 86
{
e61e0f51ba7974 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2018-02-21 87
return i915_request_completed(to_request(fence));
04769652c8c7ad drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-07-20 88
}
04769652c8c7ad drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-07-20 89
f54d1867005c33 drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-10-25 90
static bool i915_fence_enable_signaling(struct dma_fence *fence)
04769652c8c7ad drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-07-20 91
{
52c0fdb25c7c91 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-01-29 92
return i915_request_enable_breadcrumb(to_request(fence));
04769652c8c7ad drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-07-20 93
}
04769652c8c7ad drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-07-20 94
f54d1867005c33 drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-10-25 95
static signed long i915_fence_wait(struct dma_fence *fence,
04769652c8c7ad drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-07-20 96
bool interruptible,
e95433c73a1175 drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-10-28 97
signed long timeout)
04769652c8c7ad drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-07-20 98
{
62eb3c24b37cb5 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-02-13 99
return i915_request_wait(to_request(fence),
62eb3c24b37cb5 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-02-13 100
interruptible | I915_WAIT_PRIORITY,
62eb3c24b37cb5 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-02-13 101
timeout);
04769652c8c7ad drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-07-20 102
}
04769652c8c7ad drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-07-20 103
43acd6516ca970 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-04-02 104
struct kmem_cache *i915_request_slab_cache(void)
43acd6516ca970 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-04-02 105
{
43acd6516ca970 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-04-02 106
return global.slab_requests;
43acd6516ca970 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-04-02 107
}
43acd6516ca970 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-04-02 108
f54d1867005c33 drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-10-25 109
static void i915_fence_release(struct dma_fence *fence)
04769652c8c7ad drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-07-20 110
{
e61e0f51ba7974 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2018-02-21 111
struct i915_request *rq = to_request(fence);
04769652c8c7ad drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-07-20 112
e61e0f51ba7974 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2018-02-21 113
/*
e61e0f51ba7974 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2018-02-21 114
* The request is put onto a RCU freelist (i.e. the address
fc1584059d6c43 drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-11-25 115
* is immediately reused), mark the fences as being freed now.
fc1584059d6c43 drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-11-25 116
* Otherwise the debugobjects for the fences are only marked as
fc1584059d6c43 drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-11-25 117
* freed when the slab cache itself is freed, and so we would get
fc1584059d6c43 drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-11-25 118
* caught trying to reuse dead objects.
fc1584059d6c43 drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-11-25 119
*/
e61e0f51ba7974 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2018-02-21 120
i915_sw_fence_fini(&rq->submit);
0c441cb6f3eeed drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-04-11 121
i915_sw_fence_fini(&rq->semaphore);
fc1584059d6c43 drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-11-25 122
32a4605b38c306 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-05-21 123
/*
32a4605b38c306 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-05-21 124
* Keep one request on each engine for reserved use under mempressure
32a4605b38c306 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-05-21 125
*
32a4605b38c306 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-05-21 126
* We do not hold a reference to the engine here and so have to be
32a4605b38c306 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-05-21 127
* very careful in what rq->engine we poke. The virtual engine is
32a4605b38c306 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-05-21 128
* referenced via the rq->context and we released that ref during
32a4605b38c306 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-05-21 129
* i915_request_retire(), ergo we must not dereference a virtual
32a4605b38c306 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-05-21 130
* engine here. Not that we would want to, as the only consumer of
32a4605b38c306 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-05-21 131
* the reserved engine->request_pool is the power management parking,
32a4605b38c306 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-05-21 132
* which must-not-fail, and that is only run on the physical engines.
32a4605b38c306 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-05-21 133
*
32a4605b38c306 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-05-21 134
* Since the request must have been executed to be have completed,
32a4605b38c306 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-05-21 135
* we know that it will have been processed by the HW and will
32a4605b38c306 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-05-21 136
* not be unsubmitted again, so rq->engine and rq->execution_mask
32a4605b38c306 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-05-21 137
* at this point is stable. rq->execution_mask will be a single
32a4605b38c306 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-05-21 138
* bit if the last and _only_ engine it could execution on was a
32a4605b38c306 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-05-21 139
* physical engine, if it's multiple bits then it started on and
32a4605b38c306 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-05-21 140
* could still be on a virtual engine. Thus if the mask is not a
32a4605b38c306 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-05-21 141
* power-of-two we assume that rq->engine may still be a virtual
32a4605b38c306 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-05-21 142
* engine and so a dangling invalid pointer that we cannot dereference
32a4605b38c306 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-05-21 143
*
32a4605b38c306 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-05-21 144
* For example, consider the flow of a bonded request through a virtual
32a4605b38c306 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-05-21 145
* engine. The request is created with a wide engine mask (all engines
32a4605b38c306 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-05-21 146
* that we might execute on). On processing the bond, the request mask
32a4605b38c306 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-05-21 147
* is reduced to one or more engines. If the request is subsequently
32a4605b38c306 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-05-21 148
* bound to a single engine, it will then be constrained to only
32a4605b38c306 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-05-21 149
* execute on that engine and never returned to the virtual engine
32a4605b38c306 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-05-21 150
* after timeslicing away, see __unwind_incomplete_requests(). Thus we
32a4605b38c306 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-05-21 151
* know that if the rq->execution_mask is a single bit, rq->engine
32a4605b38c306 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-05-21 152
* can be a physical engine with the exact corresponding mask.
32a4605b38c306 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-05-21 153
*/
32a4605b38c306 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-05-21 154
if (is_power_of_2(rq->execution_mask) &&
32a4605b38c306 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-05-21 155
!cmpxchg(&rq->engine->request_pool, NULL, rq))
43acd6516ca970 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-04-02 156
return;
43acd6516ca970 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-04-02 157
32eb6bcfdda9da drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-02-28 158
kmem_cache_free(global.slab_requests, rq);
04769652c8c7ad drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-07-20 159
}
04769652c8c7ad drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-07-20 160
f54d1867005c33 drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-10-25 161
const struct dma_fence_ops i915_fence_ops = {
04769652c8c7ad drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-07-20 162
.get_driver_name = i915_fence_get_driver_name,
04769652c8c7ad drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-07-20 163
.get_timeline_name = i915_fence_get_timeline_name,
04769652c8c7ad drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-07-20 164
.enable_signaling = i915_fence_enable_signaling,
04769652c8c7ad drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-07-20 165
.signaled = i915_fence_signaled,
04769652c8c7ad drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-07-20 166
.wait = i915_fence_wait,
04769652c8c7ad drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-07-20 167
.release = i915_fence_release,
04769652c8c7ad drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-07-20 168
};
04769652c8c7ad drivers/gpu/drm/i915/i915_gem_request.c Chris Wilson 2016-07-20 169
b87b6c0dfce7d6 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-06-18 170
static void irq_execute_cb(struct irq_work *wrk)
b87b6c0dfce7d6 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-06-18 171
{
b87b6c0dfce7d6 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-06-18 172
struct execute_cb *cb = container_of(wrk, typeof(*cb), work);
b87b6c0dfce7d6 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-06-18 173
b87b6c0dfce7d6 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-06-18 174
i915_sw_fence_complete(cb->fence);
b87b6c0dfce7d6 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-06-18 175
kmem_cache_free(global.slab_execute_cbs, cb);
b87b6c0dfce7d6 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-06-18 176
}
b87b6c0dfce7d6 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-06-18 177
b87b6c0dfce7d6 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-06-18 178
static void irq_execute_cb_hook(struct irq_work *wrk)
b87b6c0dfce7d6 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-06-18 179
{
b87b6c0dfce7d6 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-06-18 180
struct execute_cb *cb = container_of(wrk, typeof(*cb), work);
b87b6c0dfce7d6 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-06-18 181
b87b6c0dfce7d6 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-06-18 182
cb->hook(container_of(cb->fence, struct i915_request, submit),
b87b6c0dfce7d6 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-06-18 183
&cb->signal->fence);
b87b6c0dfce7d6 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-06-18 184
i915_request_put(cb->signal);
b87b6c0dfce7d6 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-06-18 185
b87b6c0dfce7d6 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-06-18 186
irq_execute_cb(wrk);
b87b6c0dfce7d6 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-06-18 187
}
b87b6c0dfce7d6 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-06-18 188
3255e00edb91d3 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-07-16 189
static __always_inline void
3255e00edb91d3 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-07-16 190
__notify_execute_cb(struct i915_request *rq, bool (*fn)(struct irq_work *wrk))
b87b6c0dfce7d6 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-06-18 191
{
fc0e1270221626 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-05-26 192
struct execute_cb *cb, *cn;
b87b6c0dfce7d6 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-06-18 193
fc0e1270221626 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-05-26 194
if (llist_empty(&rq->execute_cb))
b87b6c0dfce7d6 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-06-18 195
return;
b87b6c0dfce7d6 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-06-18 196
3255e00edb91d3 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-07-16 197
llist_for_each_entry_safe(cb, cn,
3255e00edb91d3 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-07-16 198
llist_del_all(&rq->execute_cb),
3255e00edb91d3 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-07-16 @199
work.llnode)
3255e00edb91d3 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-07-16 200
fn(&cb->work);
3255e00edb91d3 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2020-07-16 201
}
b87b6c0dfce7d6 drivers/gpu/drm/i915/i915_request.c Chris Wilson 2019-06-18 202
:::::: The code at line 199 was first introduced by commit
:::::: 3255e00edb91d3d4ef8feeaf2ffde96a3668d622 drm/i915: Remove i915_request.lock
requirement for execution callbacks
:::::: TO: Chris Wilson <chris(a)chris-wilson.co.uk>
:::::: CC: Chris Wilson <chris(a)chris-wilson.co.uk>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org