Lines Matching full:mw

33 static int rvu_mbox_init(struct rvu *rvu, struct mbox_wq_info *mw,
2195 struct mbox_wq_info *mw; in __rvu_mbox_handler() local
2200 mw = &rvu->afpf_wq_info; in __rvu_mbox_handler()
2203 mw = &rvu->afvf_wq_info; in __rvu_mbox_handler()
2209 devid = mwork - mw->mbox_wrk; in __rvu_mbox_handler()
2210 mbox = &mw->mbox; in __rvu_mbox_handler()
2215 if (mw->mbox_wrk[devid].num_msgs == 0) in __rvu_mbox_handler()
2220 for (id = 0; id < mw->mbox_wrk[devid].num_msgs; id++) { in __rvu_mbox_handler()
2253 mw->mbox_wrk[devid].num_msgs = 0; in __rvu_mbox_handler()
2285 struct mbox_wq_info *mw; in __rvu_mbox_up_handler() local
2291 mw = &rvu->afpf_wq_info; in __rvu_mbox_up_handler()
2294 mw = &rvu->afvf_wq_info; in __rvu_mbox_up_handler()
2300 devid = mwork - mw->mbox_wrk_up; in __rvu_mbox_up_handler()
2301 mbox = &mw->mbox_up; in __rvu_mbox_up_handler()
2305 if (mw->mbox_wrk_up[devid].up_num_msgs == 0) { in __rvu_mbox_up_handler()
2312 for (id = 0; id < mw->mbox_wrk_up[devid].up_num_msgs; id++) { in __rvu_mbox_up_handler()
2342 mw->mbox_wrk_up[devid].up_num_msgs = 0; in __rvu_mbox_up_handler()
2421 static int rvu_mbox_init(struct rvu *rvu, struct mbox_wq_info *mw, in rvu_mbox_init() argument
2482 mw->mbox_wq = alloc_workqueue("%s", in rvu_mbox_init()
2485 if (!mw->mbox_wq) { in rvu_mbox_init()
2490 mw->mbox_wrk = devm_kcalloc(rvu->dev, num, in rvu_mbox_init()
2492 if (!mw->mbox_wrk) { in rvu_mbox_init()
2497 mw->mbox_wrk_up = devm_kcalloc(rvu->dev, num, in rvu_mbox_init()
2499 if (!mw->mbox_wrk_up) { in rvu_mbox_init()
2504 err = otx2_mbox_regions_init(&mw->mbox, mbox_regions, rvu->pdev, in rvu_mbox_init()
2509 err = otx2_mbox_regions_init(&mw->mbox_up, mbox_regions, rvu->pdev, in rvu_mbox_init()
2518 mwork = &mw->mbox_wrk[i]; in rvu_mbox_init()
2522 mwork = &mw->mbox_wrk_up[i]; in rvu_mbox_init()
2529 destroy_workqueue(mw->mbox_wq); in rvu_mbox_init()
2540 static void rvu_mbox_destroy(struct mbox_wq_info *mw) in rvu_mbox_destroy() argument
2542 struct otx2_mbox *mbox = &mw->mbox; in rvu_mbox_destroy()
2546 if (mw->mbox_wq) { in rvu_mbox_destroy()
2547 destroy_workqueue(mw->mbox_wq); in rvu_mbox_destroy()
2548 mw->mbox_wq = NULL; in rvu_mbox_destroy()
2557 otx2_mbox_destroy(&mw->mbox); in rvu_mbox_destroy()
2558 otx2_mbox_destroy(&mw->mbox_up); in rvu_mbox_destroy()
2561 static void rvu_queue_work(struct mbox_wq_info *mw, int first, in rvu_queue_work() argument
2574 mbox = &mw->mbox; in rvu_queue_work()
2587 mw->mbox_wrk[i].num_msgs = hdr->num_msgs; in rvu_queue_work()
2589 queue_work(mw->mbox_wq, &mw->mbox_wrk[i].work); in rvu_queue_work()
2591 mbox = &mw->mbox_up; in rvu_queue_work()
2595 mw->mbox_wrk_up[i].up_num_msgs = hdr->num_msgs; in rvu_queue_work()
2597 queue_work(mw->mbox_wq, &mw->mbox_wrk_up[i].work); in rvu_queue_work()