Lines Matching refs:winctx

340 				struct vas_winctx *winctx)  in init_rsvd_tx_buf_count()  argument
362 struct vas_winctx *winctx) in init_winctx_regs() argument
370 val = SET_FIELD(VAS_LPID, val, winctx->lpid); in init_winctx_regs()
374 val = SET_FIELD(VAS_PID_ID, val, winctx->pidr); in init_winctx_regs()
377 init_xlate_regs(window, winctx->user_win); in init_winctx_regs()
380 val = SET_FIELD(VAS_FAULT_TX_WIN, val, winctx->fault_win_id); in init_winctx_regs()
387 val = SET_FIELD(VAS_HV_INTR_SRC_RA, val, winctx->irq_port); in init_winctx_regs()
391 val = SET_FIELD(VAS_PSWID_EA_HANDLE, val, winctx->pswid); in init_winctx_regs()
407 val = winctx->rx_fifo; in init_winctx_regs()
412 val = SET_FIELD(VAS_LDATA_STAMP, val, winctx->data_stamp); in init_winctx_regs()
416 val = SET_FIELD(VAS_LDMA_TYPE, val, winctx->dma_type); in init_winctx_regs()
417 val = SET_FIELD(VAS_LDMA_FIFO_DISABLE, val, winctx->fifo_disable); in init_winctx_regs()
425 val = SET_FIELD(VAS_LRX_WCRED, val, winctx->wcreds_max); in init_winctx_regs()
429 val = SET_FIELD(VAS_TX_WCRED, val, winctx->wcreds_max); in init_winctx_regs()
435 fifo_size = winctx->rx_fifo_size / 1024; in init_winctx_regs()
448 init_rsvd_tx_buf_count(window, winctx); in init_winctx_regs()
452 val = SET_FIELD(VAS_LRX_WIN_ID, val, winctx->rx_win_id); in init_winctx_regs()
458 val = SET_FIELD(VAS_NOTIFY_DISABLE, val, winctx->notify_disable); in init_winctx_regs()
459 val = SET_FIELD(VAS_INTR_DISABLE, val, winctx->intr_disable); in init_winctx_regs()
460 val = SET_FIELD(VAS_NOTIFY_EARLY, val, winctx->notify_early); in init_winctx_regs()
461 val = SET_FIELD(VAS_NOTIFY_OSU_INTR, val, winctx->notify_os_intr_reg); in init_winctx_regs()
465 val = SET_FIELD(VAS_LNOTIFY_PID, val, winctx->lnotify_pid); in init_winctx_regs()
469 val = SET_FIELD(VAS_LNOTIFY_LPID, val, winctx->lnotify_lpid); in init_winctx_regs()
473 val = SET_FIELD(VAS_LNOTIFY_TID, val, winctx->lnotify_tid); in init_winctx_regs()
477 val = SET_FIELD(VAS_LNOTIFY_MIN_SCOPE, val, winctx->min_scope); in init_winctx_regs()
478 val = SET_FIELD(VAS_LNOTIFY_MAX_SCOPE, val, winctx->max_scope); in init_winctx_regs()
494 val = SET_FIELD(VAS_WINCTL_REJ_NO_CREDIT, val, winctx->rej_no_credit); in init_winctx_regs()
495 val = SET_FIELD(VAS_WINCTL_PIN, val, winctx->pin_win); in init_winctx_regs()
496 val = SET_FIELD(VAS_WINCTL_TX_WCRED_MODE, val, winctx->tx_wcred_mode); in init_winctx_regs()
497 val = SET_FIELD(VAS_WINCTL_RX_WCRED_MODE, val, winctx->rx_wcred_mode); in init_winctx_regs()
498 val = SET_FIELD(VAS_WINCTL_TX_WORD_MODE, val, winctx->tx_word_mode); in init_winctx_regs()
499 val = SET_FIELD(VAS_WINCTL_RX_WORD_MODE, val, winctx->rx_word_mode); in init_winctx_regs()
500 val = SET_FIELD(VAS_WINCTL_FAULT_WIN, val, winctx->fault_win); in init_winctx_regs()
501 val = SET_FIELD(VAS_WINCTL_NX_WIN, val, winctx->nx_win); in init_winctx_regs()
688 struct vas_winctx *winctx) in init_winctx_for_rxwin() argument
703 memset(winctx, 0, sizeof(struct vas_winctx)); in init_winctx_for_rxwin()
705 winctx->rx_fifo = rxattr->rx_fifo; in init_winctx_for_rxwin()
706 winctx->rx_fifo_size = rxattr->rx_fifo_size; in init_winctx_for_rxwin()
707 winctx->wcreds_max = rxwin->vas_win.wcreds_max; in init_winctx_for_rxwin()
708 winctx->pin_win = rxattr->pin_win; in init_winctx_for_rxwin()
710 winctx->nx_win = rxattr->nx_win; in init_winctx_for_rxwin()
711 winctx->fault_win = rxattr->fault_win; in init_winctx_for_rxwin()
712 winctx->user_win = rxattr->user_win; in init_winctx_for_rxwin()
713 winctx->rej_no_credit = rxattr->rej_no_credit; in init_winctx_for_rxwin()
714 winctx->rx_word_mode = rxattr->rx_win_ord_mode; in init_winctx_for_rxwin()
715 winctx->tx_word_mode = rxattr->tx_win_ord_mode; in init_winctx_for_rxwin()
716 winctx->rx_wcred_mode = rxattr->rx_wcred_mode; in init_winctx_for_rxwin()
717 winctx->tx_wcred_mode = rxattr->tx_wcred_mode; in init_winctx_for_rxwin()
718 winctx->notify_early = rxattr->notify_early; in init_winctx_for_rxwin()
720 if (winctx->nx_win) { in init_winctx_for_rxwin()
721 winctx->data_stamp = true; in init_winctx_for_rxwin()
722 winctx->intr_disable = true; in init_winctx_for_rxwin()
723 winctx->pin_win = true; in init_winctx_for_rxwin()
725 WARN_ON_ONCE(winctx->fault_win); in init_winctx_for_rxwin()
726 WARN_ON_ONCE(!winctx->rx_word_mode); in init_winctx_for_rxwin()
727 WARN_ON_ONCE(!winctx->tx_word_mode); in init_winctx_for_rxwin()
728 WARN_ON_ONCE(winctx->notify_after_count); in init_winctx_for_rxwin()
729 } else if (winctx->fault_win) { in init_winctx_for_rxwin()
730 winctx->notify_disable = true; in init_winctx_for_rxwin()
731 } else if (winctx->user_win) { in init_winctx_for_rxwin()
740 winctx->fifo_disable = true; in init_winctx_for_rxwin()
741 winctx->intr_disable = true; in init_winctx_for_rxwin()
742 winctx->rx_fifo = 0; in init_winctx_for_rxwin()
745 winctx->lnotify_lpid = rxattr->lnotify_lpid; in init_winctx_for_rxwin()
746 winctx->lnotify_pid = rxattr->lnotify_pid; in init_winctx_for_rxwin()
747 winctx->lnotify_tid = rxattr->lnotify_tid; in init_winctx_for_rxwin()
748 winctx->pswid = rxattr->pswid; in init_winctx_for_rxwin()
749 winctx->dma_type = VAS_DMA_TYPE_INJECT; in init_winctx_for_rxwin()
750 winctx->tc_mode = rxattr->tc_mode; in init_winctx_for_rxwin()
752 winctx->min_scope = VAS_SCOPE_LOCAL; in init_winctx_for_rxwin()
753 winctx->max_scope = VAS_SCOPE_VECTORED_GROUP; in init_winctx_for_rxwin()
755 winctx->irq_port = rxwin->vinst->irq_port; in init_winctx_for_rxwin()
857 struct vas_winctx winctx; in vas_rx_win_open() local
884 init_winctx_for_rxwin(rxwin, rxattr, &winctx); in vas_rx_win_open()
885 init_winctx_regs(rxwin, &winctx); in vas_rx_win_open()
912 struct vas_winctx *winctx) in init_winctx_for_txwin() argument
929 memset(winctx, 0, sizeof(struct vas_winctx)); in init_winctx_for_txwin()
931 winctx->wcreds_max = txwin->vas_win.wcreds_max; in init_winctx_for_txwin()
933 winctx->user_win = txattr->user_win; in init_winctx_for_txwin()
934 winctx->nx_win = txwin->rxwin->nx_win; in init_winctx_for_txwin()
935 winctx->pin_win = txattr->pin_win; in init_winctx_for_txwin()
936 winctx->rej_no_credit = txattr->rej_no_credit; in init_winctx_for_txwin()
937 winctx->rsvd_txbuf_enable = txattr->rsvd_txbuf_enable; in init_winctx_for_txwin()
939 winctx->rx_wcred_mode = txattr->rx_wcred_mode; in init_winctx_for_txwin()
940 winctx->tx_wcred_mode = txattr->tx_wcred_mode; in init_winctx_for_txwin()
941 winctx->rx_word_mode = txattr->rx_win_ord_mode; in init_winctx_for_txwin()
942 winctx->tx_word_mode = txattr->tx_win_ord_mode; in init_winctx_for_txwin()
943 winctx->rsvd_txbuf_count = txattr->rsvd_txbuf_count; in init_winctx_for_txwin()
945 winctx->intr_disable = true; in init_winctx_for_txwin()
946 if (winctx->nx_win) in init_winctx_for_txwin()
947 winctx->data_stamp = true; in init_winctx_for_txwin()
949 winctx->lpid = txattr->lpid; in init_winctx_for_txwin()
950 winctx->pidr = txattr->pidr; in init_winctx_for_txwin()
951 winctx->rx_win_id = txwin->rxwin->vas_win.winid; in init_winctx_for_txwin()
957 winctx->fault_win_id = txwin->vinst->fault_win->vas_win.winid; in init_winctx_for_txwin()
959 winctx->dma_type = VAS_DMA_TYPE_INJECT; in init_winctx_for_txwin()
960 winctx->tc_mode = txattr->tc_mode; in init_winctx_for_txwin()
961 winctx->min_scope = VAS_SCOPE_LOCAL; in init_winctx_for_txwin()
962 winctx->max_scope = VAS_SCOPE_VECTORED_GROUP; in init_winctx_for_txwin()
964 winctx->irq_port = txwin->vinst->irq_port; in init_winctx_for_txwin()
966 winctx->pswid = txattr->pswid ? txattr->pswid : in init_winctx_for_txwin()
1001 struct vas_winctx winctx; in vas_tx_win_open() local
1042 init_winctx_for_txwin(txwin, attr, &winctx); in vas_tx_win_open()
1044 init_winctx_regs(txwin, &winctx); in vas_tx_win_open()