Lines Matching refs:hw_context

496 		       u32 *hw_context)  in sc_hw_alloc()  argument
510 *hw_context = context; in sc_hw_alloc()
523 static void sc_hw_free(struct hfi1_devdata *dd, u32 sw_index, u32 hw_context) in sc_hw_free() argument
530 __func__, sw_index, hw_context); in sc_hw_free()
533 dd->hw_to_sw[hw_context] = INVALID_SCI; in sc_hw_free()
563 u32 gc = group_context(sc->hw_context, sc->group); in cr_group_addresses()
564 u32 index = sc->hw_context & 0x7; in cr_group_addresses()
645 write_kctxt_csr(sc->dd, sc->hw_context, in sc_set_cr_threshold()
666 u32 hw_context = sc->hw_context; in set_pio_integrity() local
669 write_kctxt_csr(dd, hw_context, in set_pio_integrity()
706 u32 hw_context; in sc_alloc() local
728 ret = sc_hw_alloc(dd, type, &sw_index, &hw_context); in sc_alloc()
754 sc->hw_context = hw_context; in sc_alloc()
762 sc->base_addr = dd->piobase + ((hw_context & PIO_ADDR_CONTEXT_MASK) in sc_alloc()
770 write_kctxt_csr(dd, hw_context, SC(CTRL), reg); in sc_alloc()
775 write_kctxt_csr(dd, hw_context, SC(ERR_MASK), (u64)-1); in sc_alloc()
778 write_kctxt_csr(dd, hw_context, SC(CHECK_PARTITION_KEY), in sc_alloc()
793 write_kctxt_csr(dd, hw_context, SC(CHECK_OPCODE), in sc_alloc()
799 write_kctxt_csr(dd, hw_context, SC(CREDIT_RETURN_ADDR), reg); in sc_alloc()
831 write_kctxt_csr(dd, hw_context, SC(CREDIT_CTRL), reg); in sc_alloc()
836 write_kctxt_csr(dd, hw_context, SC(CHECK_VL), reg); in sc_alloc()
867 hw_context, in sc_alloc()
883 u32 hw_context; in sc_free() local
893 hw_context = sc->hw_context; in sc_free()
901 write_kctxt_csr(dd, hw_context, SC(CTRL), 0); in sc_free()
902 write_kctxt_csr(dd, hw_context, SC(CHECK_ENABLE), 0); in sc_free()
903 write_kctxt_csr(dd, hw_context, SC(ERR_MASK), 0); in sc_free()
904 write_kctxt_csr(dd, hw_context, SC(CHECK_PARTITION_KEY), 0); in sc_free()
905 write_kctxt_csr(dd, hw_context, SC(CHECK_OPCODE), 0); in sc_free()
906 write_kctxt_csr(dd, hw_context, SC(CREDIT_RETURN_ADDR), 0); in sc_free()
907 write_kctxt_csr(dd, hw_context, SC(CREDIT_CTRL), 0); in sc_free()
910 sc_hw_free(dd, sw_index, hw_context); in sc_free()
929 reg = read_kctxt_csr(sc->dd, sc->hw_context, SC(CTRL)); in sc_disable()
933 write_kctxt_csr(sc->dd, sc->hw_context, SC(CTRL), reg); in sc_disable()
989 static bool is_sc_halted(struct hfi1_devdata *dd, u32 hw_context) in is_sc_halted() argument
991 return !!(read_kctxt_csr(dd, hw_context, SC(STATUS)) & in is_sc_halted()
1018 reg = read_csr(dd, sc->hw_context * 8 + in sc_wait_for_packet_egress()
1022 is_sc_halted(dd, sc->hw_context) || egress_halted(reg)) in sc_wait_for_packet_egress()
1035 sc->hw_context, (u32)reg); in sc_wait_for_packet_egress()
1083 sc->hw_context); in sc_restart()
1093 reg = read_kctxt_csr(dd, sc->hw_context, SC(STATUS)); in sc_restart()
1098 __func__, sc->sw_index, sc->hw_context); in sc_restart()
1126 sc->hw_context, count); in sc_restart()
1302 sc_ctrl = read_kctxt_csr(dd, sc->hw_context, SC(CTRL)); in sc_enable()
1325 reg = read_kctxt_csr(dd, sc->hw_context, SC(ERR_STATUS)); in sc_enable()
1327 write_kctxt_csr(dd, sc->hw_context, SC(ERR_CLEAR), reg); in sc_enable()
1341 pio = ((sc->hw_context & SEND_PIO_INIT_CTXT_PIO_CTXT_NUM_MASK) << in sc_enable()
1355 sc->sw_index, sc->hw_context, ret); in sc_enable()
1363 write_kctxt_csr(dd, sc->hw_context, SC(CTRL), sc_ctrl); in sc_enable()
1368 read_kctxt_csr(dd, sc->hw_context, SC(CTRL)); in sc_enable()
1384 write_kctxt_csr(sc->dd, sc->hw_context, SC(CREDIT_FORCE), in sc_return_credits()
1390 read_kctxt_csr(sc->dd, sc->hw_context, SC(CREDIT_FORCE)); in sc_return_credits()
1392 write_kctxt_csr(sc->dd, sc->hw_context, SC(CREDIT_FORCE), 0); in sc_return_credits()
1411 __func__, sc->sw_index, sc->hw_context); in sc_drop()
1558 write_kctxt_csr(sc->dd, sc->hw_context, in sc_add_credit_return_intr()
1580 write_kctxt_csr(sc->dd, sc->hw_context, in sc_del_credit_return_intr()
1758 void sc_group_release_update(struct hfi1_devdata *dd, u32 hw_context) in sc_group_release_update() argument
1765 sw_index = dd->hw_to_sw[hw_context]; in sc_group_release_update()
1768 __func__, hw_context, sw_index); in sc_group_release_update()
1775 gc = group_context(hw_context, sc->group); in sc_group_release_update()
1782 __func__, hw_context, sw_index); in sc_group_release_update()
2064 ctxt = dd->vld[15].sc->hw_context; in init_pervl_scs()
2073 ctxt = dd->vld[i].sc->hw_context; in init_pervl_scs()
2079 ctxt = dd->kernel_send_context[i + 1]->hw_context; in init_pervl_scs()
2170 sc->flags, sc->sw_index, sc->hw_context, sc->group); in seqfile_dump_sci()
2177 reg = read_kctxt_csr(sc->dd, sc->hw_context, SC(CREDIT_STATUS)); in seqfile_dump_sci()