git: 2d26a28153d2 - stable/12 - ntb_transport(4): Mark callouts MP-safe.

Alexander Motin mav at FreeBSD.org
Tue Aug 24 02:35:20 UTC 2021


The branch stable/12 has been updated by mav:

URL: https://cgit.FreeBSD.org/src/commit/?id=2d26a28153d21ed059b6f2fc854e3eaf9e85e6d7

commit 2d26a28153d21ed059b6f2fc854e3eaf9e85e6d7
Author:     Alexander Motin <mav at FreeBSD.org>
AuthorDate: 2021-08-10 20:30:12 +0000
Commit:     Alexander Motin <mav at FreeBSD.org>
CommitDate: 2021-08-24 02:34:58 +0000

    ntb_transport(4): Mark callouts MP-safe.
    
    The only thing around NTB using Giant lock is NewBus, and these callouts
    have nothing to do with it.
    
    MFC after:      2 weeks
    
    (cherry picked from commit c6902e7796bc78df011131a2b8b024faed884b8f)
---
 sys/dev/ntb/ntb_transport.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys/dev/ntb/ntb_transport.c b/sys/dev/ntb/ntb_transport.c
index 2208bbee0143..219e54720537 100644
--- a/sys/dev/ntb/ntb_transport.c
+++ b/sys/dev/ntb/ntb_transport.c
@@ -490,8 +490,8 @@ ntb_transport_attach(device_t dev)
 	for (i = 0; i < nt->qp_count; i++)
 		ntb_transport_init_queue(nt, i);
 
-	callout_init(&nt->link_work, 0);
-	callout_init(&nt->link_watchdog, 0);
+	callout_init(&nt->link_work, 1);
+	callout_init(&nt->link_watchdog, 1);
 	TASK_INIT(&nt->link_cleanup, 0, ntb_transport_link_cleanup_work, nt);
 	nt->link_is_up = false;
 
@@ -637,7 +637,7 @@ ntb_transport_init_queue(struct ntb_transport_ctx *nt, unsigned int qp_num)
 	qp->tx_max_frame = qmin(transport_mtu, tx_size / 2);
 	qp->tx_max_entry = tx_size / qp->tx_max_frame;
 
-	callout_init(&qp->link_work, 0);
+	callout_init(&qp->link_work, 1);
 	callout_init(&qp->rx_full, 1);
 
 	mtx_init(&qp->ntb_rx_q_lock, "ntb rx q", NULL, MTX_SPIN);


More information about the dev-commits-src-branches mailing list