mirror of
https://github.com/torvalds/linux.git
synced 2026-05-02 13:32:40 -04:00
RDMA/rxe: Replace irqsave locks with bh locks
Most of the locks in the rxe driver are _irqsave/restore locks but in fact there are no interrupt threads that run rxe code or share data with rxe. There are softirq threads and data sharing so the appropriate lock type is _bh. This patch replaces all irqsave type locks with bh type locks. Link: https://lore.kernel.org/r/20211103050241.61293-2-rpearsonhpe@gmail.com Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
This commit is contained in:
committed by
Jason Gunthorpe
parent
10f2d1cbf8
commit
21adfa7a3c
@@ -110,7 +110,6 @@ void rnr_nak_timer(struct timer_list *t)
|
||||
static struct rxe_send_wqe *req_next_wqe(struct rxe_qp *qp)
|
||||
{
|
||||
struct rxe_send_wqe *wqe;
|
||||
unsigned long flags;
|
||||
struct rxe_queue *q = qp->sq.queue;
|
||||
unsigned int index = qp->req.wqe_index;
|
||||
unsigned int cons;
|
||||
@@ -124,25 +123,23 @@ static struct rxe_send_wqe *req_next_wqe(struct rxe_qp *qp)
|
||||
/* check to see if we are drained;
|
||||
* state_lock used by requester and completer
|
||||
*/
|
||||
spin_lock_irqsave(&qp->state_lock, flags);
|
||||
spin_lock_bh(&qp->state_lock);
|
||||
do {
|
||||
if (qp->req.state != QP_STATE_DRAIN) {
|
||||
/* comp just finished */
|
||||
spin_unlock_irqrestore(&qp->state_lock,
|
||||
flags);
|
||||
spin_unlock_bh(&qp->state_lock);
|
||||
break;
|
||||
}
|
||||
|
||||
if (wqe && ((index != cons) ||
|
||||
(wqe->state != wqe_state_posted))) {
|
||||
/* comp not done yet */
|
||||
spin_unlock_irqrestore(&qp->state_lock,
|
||||
flags);
|
||||
spin_unlock_bh(&qp->state_lock);
|
||||
break;
|
||||
}
|
||||
|
||||
qp->req.state = QP_STATE_DRAINED;
|
||||
spin_unlock_irqrestore(&qp->state_lock, flags);
|
||||
spin_unlock_bh(&qp->state_lock);
|
||||
|
||||
if (qp->ibqp.event_handler) {
|
||||
struct ib_event ev;
|
||||
|
||||
Reference in New Issue
Block a user