Lines Matching refs:rxwin

566 static void put_rx_win(struct pnv_vas_window *rxwin)  in put_rx_win()  argument
569 WARN_ON_ONCE(rxwin->tx_win); in put_rx_win()
571 atomic_dec(&rxwin->num_txwins); in put_rx_win()
586 struct pnv_vas_window *rxwin; in get_user_rxwin() local
593 rxwin = vinst->windows[winid]; in get_user_rxwin()
595 if (!rxwin || rxwin->tx_win || rxwin->vas_win.cop != VAS_COP_TYPE_FTW) in get_user_rxwin()
598 return rxwin; in get_user_rxwin()
610 struct pnv_vas_window *rxwin; in get_vinst_rxwin() local
615 rxwin = get_user_rxwin(vinst, pswid); in get_vinst_rxwin()
617 rxwin = vinst->rxwin[cop] ?: ERR_PTR(-EINVAL); in get_vinst_rxwin()
619 if (!IS_ERR(rxwin)) in get_vinst_rxwin()
620 atomic_inc(&rxwin->num_txwins); in get_vinst_rxwin()
624 return rxwin; in get_vinst_rxwin()
654 WARN_ON_ONCE(vinst->rxwin[window->vas_win.cop]); in set_vinst_win()
655 vinst->rxwin[window->vas_win.cop] = window; in set_vinst_win()
676 WARN_ON_ONCE(!vinst->rxwin[window->vas_win.cop]); in clear_vinst_win()
677 vinst->rxwin[window->vas_win.cop] = NULL; in clear_vinst_win()
686 static void init_winctx_for_rxwin(struct pnv_vas_window *rxwin, in init_winctx_for_rxwin() argument
707 winctx->wcreds_max = rxwin->vas_win.wcreds_max; in init_winctx_for_rxwin()
754 if (rxwin->vinst->virq) in init_winctx_for_rxwin()
755 winctx->irq_port = rxwin->vinst->irq_port; in init_winctx_for_rxwin()
856 struct pnv_vas_window *rxwin; in vas_rx_win_open() local
872 rxwin = vas_window_alloc(vinst); in vas_rx_win_open()
873 if (IS_ERR(rxwin)) { in vas_rx_win_open()
875 return (struct vas_window *)rxwin; in vas_rx_win_open()
878 rxwin->tx_win = false; in vas_rx_win_open()
879 rxwin->nx_win = rxattr->nx_win; in vas_rx_win_open()
880 rxwin->user_win = rxattr->user_win; in vas_rx_win_open()
881 rxwin->vas_win.cop = cop; in vas_rx_win_open()
882 rxwin->vas_win.wcreds_max = rxattr->wcreds_max; in vas_rx_win_open()
884 init_winctx_for_rxwin(rxwin, rxattr, &winctx); in vas_rx_win_open()
885 init_winctx_regs(rxwin, &winctx); in vas_rx_win_open()
887 set_vinst_win(vinst, rxwin); in vas_rx_win_open()
889 return &rxwin->vas_win; in vas_rx_win_open()
934 winctx->nx_win = txwin->rxwin->nx_win; in init_winctx_for_txwin()
951 winctx->rx_win_id = txwin->rxwin->vas_win.winid; in init_winctx_for_txwin()
1000 struct pnv_vas_window *rxwin; in vas_tx_win_open() local
1023 rxwin = get_vinst_rxwin(vinst, cop, attr->pswid); in vas_tx_win_open()
1024 if (IS_ERR(rxwin)) { in vas_tx_win_open()
1026 return (struct vas_window *)rxwin; in vas_tx_win_open()
1037 txwin->rxwin = rxwin; in vas_tx_win_open()
1038 txwin->nx_win = txwin->rxwin->nx_win; in vas_tx_win_open()
1085 put_rx_win(rxwin); in vas_tx_win_open()
1316 put_rx_win(window->rxwin); in vas_win_close()