haven: dbl: Make hh_dbl_ functions wait for capid availability

Client drivers may successfully register with a doorbell even before
doorbell capids are known to Linux. However, we do need to know capids
for send, read, reset, and mask functions. Here, we mirror the behavior
of message queues by placing the calling thread in a waitqueue until the
capids are populated by RM.

Change-Id: Ie1cf98d0fe344bb2a878bb655db78705d4292ff9
Signed-off-by: Elliot Berman <[email protected]>
This commit is contained in:
Elliot Berman 2020-04-23 23:23:59 -07:00
commit 23f7911bfe
5 changed files with 72 additions and 35 deletions

View file

@ -94,7 +94,7 @@ static inline int channel_hh_kick(struct neuron_mq_data_priv *priv)
hh_dbl_flags_t dbl_mask = CH_DBL_MASK;
int ret;
ret = hh_dbl_send(priv->tx_dbl, &dbl_mask);
ret = hh_dbl_send(priv->tx_dbl, &dbl_mask, 0);
if (ret)
pr_err("failed to raise virq to the sender %d\n", ret);

View file

@ -68,7 +68,7 @@ static inline int channel_hh_kick(struct neuron_mq_data_priv *priv)
hh_dbl_flags_t dbl_mask = CH_DBL_MASK;
int ret;
ret = hh_dbl_send(priv->tx_dbl, &dbl_mask);
ret = hh_dbl_send(priv->tx_dbl, &dbl_mask, 0);
if (ret)
pr_err("failed to raise virq to the sender %d\n", ret);