]> git.baikalelectronics.ru Git - kernel.git/commit
staging: vchiq: Fix local event signalling
authorPhil Elwell <phil@raspberrypi.org>
Fri, 11 Jan 2019 11:34:53 +0000 (11:34 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Jan 2019 15:31:09 +0000 (16:31 +0100)
commitf4df17df40ce929c317f8a7d4d68913abc1bb4b4
treecb56ba2d41c78511d7c5b8fd633fd5167c42c073
parent334efea14c6e85646620e5bd7597ec8fc7fdfc0c
staging: vchiq: Fix local event signalling

Prior to the recent event reworking (see Fixes), thread synchronisation
was implemented using completions, the worker thread being woken with
a call to complete(). The replacement uses waitqueues, which are more
like condition variables in that the waiting thread is only woken if
the condition is true.

When the VPU signals the ARM, it first sets the event's fired flag to
indicate which event is being signalled, but the places in the
ARM-side code where the worker thread is being woken -
remote_event_signal_local via request_poll - did not do so as it
wasn't previously necessary, and since the armed flag was being
cleared this lead to a deadlock.

Fixes: efdd1778c8e2 ("staging: vchiq: rework remove_event handling")
Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c