Lines Matching refs:rxwin
564 static void put_rx_win(struct vas_window *rxwin) in put_rx_win() argument
567 WARN_ON_ONCE(rxwin->tx_win); in put_rx_win()
569 atomic_dec(&rxwin->num_txwins); in put_rx_win()
583 struct vas_window *rxwin; in get_user_rxwin() local
590 rxwin = vinst->windows[winid]; in get_user_rxwin()
592 if (!rxwin || rxwin->tx_win || rxwin->cop != VAS_COP_TYPE_FTW) in get_user_rxwin()
595 return rxwin; in get_user_rxwin()
607 struct vas_window *rxwin; in get_vinst_rxwin() local
612 rxwin = get_user_rxwin(vinst, pswid); in get_vinst_rxwin()
614 rxwin = vinst->rxwin[cop] ?: ERR_PTR(-EINVAL); in get_vinst_rxwin()
616 if (!IS_ERR(rxwin)) in get_vinst_rxwin()
617 atomic_inc(&rxwin->num_txwins); in get_vinst_rxwin()
621 return rxwin; in get_vinst_rxwin()
651 WARN_ON_ONCE(vinst->rxwin[window->cop]); in set_vinst_win()
652 vinst->rxwin[window->cop] = window; in set_vinst_win()
673 WARN_ON_ONCE(!vinst->rxwin[window->cop]); in clear_vinst_win()
674 vinst->rxwin[window->cop] = NULL; in clear_vinst_win()
683 static void init_winctx_for_rxwin(struct vas_window *rxwin, in init_winctx_for_rxwin() argument
704 winctx->wcreds_max = rxwin->wcreds_max; in init_winctx_for_rxwin()
850 struct vas_window *rxwin; in vas_rx_win_open() local
866 rxwin = vas_window_alloc(vinst); in vas_rx_win_open()
867 if (IS_ERR(rxwin)) { in vas_rx_win_open()
869 return rxwin; in vas_rx_win_open()
872 rxwin->tx_win = false; in vas_rx_win_open()
873 rxwin->nx_win = rxattr->nx_win; in vas_rx_win_open()
874 rxwin->user_win = rxattr->user_win; in vas_rx_win_open()
875 rxwin->cop = cop; in vas_rx_win_open()
876 rxwin->wcreds_max = rxattr->wcreds_max ?: VAS_WCREDS_DEFAULT; in vas_rx_win_open()
878 rxwin->pid = task_pid_vnr(current); in vas_rx_win_open()
880 init_winctx_for_rxwin(rxwin, rxattr, &winctx); in vas_rx_win_open()
881 init_winctx_regs(rxwin, &winctx); in vas_rx_win_open()
883 set_vinst_win(vinst, rxwin); in vas_rx_win_open()
885 return rxwin; in vas_rx_win_open()
929 winctx->nx_win = txwin->rxwin->nx_win; in init_winctx_for_txwin()
946 winctx->rx_win_id = txwin->rxwin->winid; in init_winctx_for_txwin()
980 struct vas_window *rxwin; in vas_tx_win_open() local
1003 rxwin = get_vinst_rxwin(vinst, cop, attr->pswid); in vas_tx_win_open()
1004 if (IS_ERR(rxwin)) { in vas_tx_win_open()
1006 return rxwin; in vas_tx_win_open()
1017 txwin->rxwin = rxwin; in vas_tx_win_open()
1018 txwin->nx_win = txwin->rxwin->nx_win; in vas_tx_win_open()
1059 put_rx_win(rxwin); in vas_tx_win_open()
1250 put_rx_win(window->rxwin); in vas_win_close()