[Intel-gfx] [PATCH] drm/i915: Replace lockless_dereference(bool) with READ_ONCE()
Chris Wilson
chris at chris-wilson.co.uk
Tue Jul 5 09:59:54 UTC 2016
On Tue, Jul 05, 2016 at 12:54:50PM +0300, Mika Kuoppala wrote:
> Chris Wilson <chris at chris-wilson.co.uk> writes:
>
> > 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 331b6d8c7afc
> > ("locking/barriers: Validate lockless_dereference() is used on a pointer
> > type")
> >
> > Reported-by: Stephen Rothwell <sfr at canb.auug.org.au>
> > Fixes: 67d97da34917 ("drm/i915: Only start retire worker when idle")
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
>
> Reviewed-by: Mika Kuoppala <mika.kuoppala at intel.com>
Ta, though if PeterZ complains more about superfluous use of data
dependency barriers we may have to invent our own documentatary macro.
-Chris
>
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list