Commit 6ad2a66
drm/i915: Order OP vs. timeout correctly in __wait_for()
Put the barrier() before the OP so that anything we read out in
OP and check in COND will actually be read out after the timeout
has been evaluated.
Currently the only place where we use OP is __intel_wait_for_register(),
but the use there is precisely susceptible to this reordering, assuming
the ktime_*() stuff itself doesn't act as a sufficient barrier:
__intel_wait_for_register(...)
{
...
ret = __wait_for(reg_value = intel_uncore_read_notrace(...),
(reg_value & mask) == value, ...);
...
}
Cc: [email protected]
Fixes: 1c3c1dc ("drm/i915: Add compiler barrier to wait_for")
Signed-off-by: Ville Syrjälä <[email protected]>
Link: https://patch.msgid.link/[email protected]
Reviewed-by: Jani Nikula <[email protected]>
(cherry picked from commit a464bac)
Signed-off-by: Joonas Lahtinen <[email protected]>1 parent 08441f1 commit 6ad2a66
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | 28 | | |
30 | 29 | | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
0 commit comments