]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Use RCU to annotate and enforce protection for breadcrumb's bh
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 9 Aug 2016 16:47:52 +0000 (17:47 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 10 Aug 2016 09:37:49 +0000 (10:37 +0100)
commit522fd3f21fc735756a048d689e4f48143740b14a
tree9d7d010c8c9520eca1e03d26f78978d06685c9ec
parent57189db4724ffd6db1292d81972005d551579b3f
drm/i915: Use RCU to annotate and enforce protection for breadcrumb's bh

The bottom-half we use for processing the breadcrumb interrupt is a
task, which is an RCU protected struct. When accessing this struct, we
need to be holding the RCU read lock to prevent it disappearing beneath
us. We can use the RCU annotation to mark our irq_seqno_bh pointer as
being under RCU guard and then use the RCU accessors to both provide
correct ordering of access through the pointer.

Most notably, this fixes the access from hard irq context to use the RCU
read lock, which both Daniel and Tvrtko complained about.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1470761272-1245-3-git-send-email-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_breadcrumbs.c
drivers/gpu/drm/i915/intel_ringbuffer.c
drivers/gpu/drm/i915/intel_ringbuffer.h