rpmsg: glink: Use spinlock in tx path
authorBjorn Andersson <bjorn.andersson@linaro.org>
Tue, 13 Feb 2018 19:04:04 +0000 (11:04 -0800)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Tue, 20 Mar 2018 02:52:54 +0000 (10:52 +0800)
commit29fc9b3873607d01b1ff1ae077982cf5629010af
treedf164e56cfbaebac29baf4f92352769029838e6c
parent33e3820dda8876792bd8135db633c741a07263be
rpmsg: glink: Use spinlock in tx path

Switch the tx_lock to a spinlock we allow clients to use rpmsg_trysend()
from atomic context.

In order to allow clients to sleep while waiting for space in the FIFO
we release the lock temporarily around the delay; which should be
replaced by sending a READ_NOTIF and waiting for the remote to signal
us that space has been made available.

Tested-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/rpmsg/qcom_glink_native.c