Lines Matching refs:txwin
71 static void *map_paste_region(struct pnv_vas_window *txwin) in map_paste_region() argument
78 name = kasprintf(GFP_KERNEL, "window-v%d-w%d", txwin->vinst->vas_id, in map_paste_region()
79 txwin->vas_win.winid); in map_paste_region()
83 txwin->paste_addr_name = name; in map_paste_region()
84 vas_win_paste_addr(txwin, &start, &len); in map_paste_region()
339 static void init_rsvd_tx_buf_count(struct pnv_vas_window *txwin, in init_rsvd_tx_buf_count() argument
342 write_hvwc_reg(txwin, VREG(TX_RSVD_BUF_COUNT), 0ULL); in init_rsvd_tx_buf_count()
910 static void init_winctx_for_txwin(struct pnv_vas_window *txwin, in init_winctx_for_txwin() argument
931 winctx->wcreds_max = txwin->vas_win.wcreds_max; in init_winctx_for_txwin()
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()
956 if (txwin->vinst->virq) in init_winctx_for_txwin()
957 winctx->fault_win_id = txwin->vinst->fault_win->vas_win.winid; in init_winctx_for_txwin()
963 if (txwin->vinst->virq) in init_winctx_for_txwin()
964 winctx->irq_port = txwin->vinst->irq_port; in init_winctx_for_txwin()
967 encode_pswid(txwin->vinst->vas_id, in init_winctx_for_txwin()
968 txwin->vas_win.winid); in init_winctx_for_txwin()
999 struct pnv_vas_window *txwin; in vas_tx_win_open() local
1029 txwin = vas_window_alloc(vinst); in vas_tx_win_open()
1030 if (IS_ERR(txwin)) { in vas_tx_win_open()
1031 rc = PTR_ERR(txwin); in vas_tx_win_open()
1035 txwin->vas_win.cop = cop; in vas_tx_win_open()
1036 txwin->tx_win = 1; 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()
1039 txwin->user_win = attr->user_win; in vas_tx_win_open()
1040 txwin->vas_win.wcreds_max = attr->wcreds_max ?: VAS_WCREDS_DEFAULT; in vas_tx_win_open()
1042 init_winctx_for_txwin(txwin, attr, &winctx); in vas_tx_win_open()
1044 init_winctx_regs(txwin, &winctx); in vas_tx_win_open()
1054 if (!txwin->user_win) { in vas_tx_win_open()
1055 txwin->paste_kaddr = map_paste_region(txwin); in vas_tx_win_open()
1056 if (IS_ERR(txwin->paste_kaddr)) { in vas_tx_win_open()
1057 rc = PTR_ERR(txwin->paste_kaddr); in vas_tx_win_open()
1070 rc = get_vas_user_win_ref(&txwin->vas_win.task_ref); in vas_tx_win_open()
1074 vas_user_win_add_mm_context(&txwin->vas_win.task_ref); in vas_tx_win_open()
1077 set_vinst_win(vinst, txwin); in vas_tx_win_open()
1079 return &txwin->vas_win; in vas_tx_win_open()
1082 vas_window_free(txwin); in vas_tx_win_open()
1100 struct pnv_vas_window *txwin; in vas_paste_crb() local
1105 txwin = container_of(vwin, struct pnv_vas_window, vas_win); in vas_paste_crb()
1106 trace_vas_paste_crb(current, txwin); in vas_paste_crb()
1113 WARN_ON_ONCE(txwin->nx_win && !re); in vas_paste_crb()
1115 addr = txwin->paste_kaddr; in vas_paste_crb()
1135 pr_debug("Txwin #%d: Msg count %llu\n", txwin->vas_win.winid, in vas_paste_crb()
1136 read_hvwc_reg(txwin, VREG(LRFIFO_PUSH))); in vas_paste_crb()
1431 static u64 vas_user_win_paste_addr(struct vas_window *txwin) in vas_user_win_paste_addr() argument
1436 win = container_of(txwin, struct pnv_vas_window, vas_win); in vas_user_win_paste_addr()
1442 static int vas_user_win_close(struct vas_window *txwin) in vas_user_win_close() argument
1444 vas_win_close(txwin); in vas_user_win_close()