]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Replace lockless_dereference(bool) with READ_ONCE()
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 5 Jul 2016 07:54:36 +0000 (08:54 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 5 Jul 2016 09:58:07 +0000 (10:58 +0100)
commit340f45c5df8238e9b0d77b7d6a4b26ace462a8a2
tree8bf1afa2c9b6eff8a2803ebc48fd7fded3c5a3c6
parent75dbd4d1f7728052b9e2aea1e45dffe8ab7c92f8
drm/i915: Replace lockless_dereference(bool) with READ_ONCE()

After Joonas complained about using READ_ONCE() on the only use of the
variable in the function, where the intent was to simply document that
the read was intentionally racy and unlocked, I switched the READ_ONCE()
over to lockless_dereference(). However, in linux-next that has a
stronger type-check to only allow pointers and is no longer
interchangeable with READ_ONCE(), see commit 598127856fe2
("locking/barriers: Validate lockless_dereference() is used on a pointer
type")

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Fixes: 9b6fd824cce5 ("drm/i915: Only start retire worker when idle")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/1467705276-707-1-git-send-email-chris@chris-wilson.co.uk
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_irq.c