Skip to content

Commit

Permalink
drm/i915: Use tasklet_unlock_spin_wait() in __tasklet_disable_sync_on…
Browse files Browse the repository at this point in the history
…ce()

The i915 driver has its own tasklet interface which was overseen in the
tasklet rework. __tasklet_disable_sync_once() is a wrapper around
tasklet_unlock_wait(). tasklet_unlock_wait() might sleep, but the i915
wrappers invokes it from non-preemtible contexts with bottom halves disabled.

Use tasklet_unlock_spin_wait() instead which can be invoked from
non-preemptible contexts.

Fixes: da04474 ("tasklets: Replace spin wait in tasklet_unlock_wait()")
Reported-by: kernel test robot <oliver.sang@intel.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20210323092221.awq7g5b2muzypjw3@flow
  • Loading branch information
Sebastian Andrzej Siewior authored and Thomas Gleixner committed Mar 25, 2021
1 parent a359f75 commit 6e45791
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/i915_gem.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ static inline bool tasklet_is_locked(const struct tasklet_struct *t)
static inline void __tasklet_disable_sync_once(struct tasklet_struct *t)
{
if (!atomic_fetch_inc(&t->count))
tasklet_unlock_wait(t);
tasklet_unlock_spin_wait(t);
}

static inline bool __tasklet_is_enabled(const struct tasklet_struct *t)
Expand Down

0 comments on commit 6e45791

Please sign in to comment.