Lines Matching refs:hw_context

454 		       u32 *hw_context)  in sc_hw_alloc()  argument
468 *hw_context = context; in sc_hw_alloc()
481 static void sc_hw_free(struct hfi1_devdata *dd, u32 sw_index, u32 hw_context) in sc_hw_free() argument
488 __func__, sw_index, hw_context); in sc_hw_free()
491 dd->hw_to_sw[hw_context] = INVALID_SCI; in sc_hw_free()
521 u32 gc = group_context(sc->hw_context, sc->group); in cr_group_addresses()
522 u32 index = sc->hw_context & 0x7; in cr_group_addresses()
603 write_kctxt_csr(sc->dd, sc->hw_context, in sc_set_cr_threshold()
624 u32 hw_context = sc->hw_context; in set_pio_integrity() local
627 write_kctxt_csr(dd, hw_context, in set_pio_integrity()
664 u32 hw_context; in sc_alloc() local
686 ret = sc_hw_alloc(dd, type, &sw_index, &hw_context); in sc_alloc()
712 sc->hw_context = hw_context; in sc_alloc()
720 sc->base_addr = dd->piobase + ((hw_context & PIO_ADDR_CONTEXT_MASK) in sc_alloc()
728 write_kctxt_csr(dd, hw_context, SC(CTRL), reg); in sc_alloc()
733 write_kctxt_csr(dd, hw_context, SC(ERR_MASK), (u64)-1); in sc_alloc()
736 write_kctxt_csr(dd, hw_context, SC(CHECK_PARTITION_KEY), in sc_alloc()
751 write_kctxt_csr(dd, hw_context, SC(CHECK_OPCODE), in sc_alloc()
757 write_kctxt_csr(dd, hw_context, SC(CREDIT_RETURN_ADDR), reg); in sc_alloc()
789 write_kctxt_csr(dd, hw_context, SC(CREDIT_CTRL), reg); in sc_alloc()
794 write_kctxt_csr(dd, hw_context, SC(CHECK_VL), reg); in sc_alloc()
825 hw_context, in sc_alloc()
841 u32 hw_context; in sc_free() local
851 hw_context = sc->hw_context; in sc_free()
859 write_kctxt_csr(dd, hw_context, SC(CTRL), 0); in sc_free()
860 write_kctxt_csr(dd, hw_context, SC(CHECK_ENABLE), 0); in sc_free()
861 write_kctxt_csr(dd, hw_context, SC(ERR_MASK), 0); in sc_free()
862 write_kctxt_csr(dd, hw_context, SC(CHECK_PARTITION_KEY), 0); in sc_free()
863 write_kctxt_csr(dd, hw_context, SC(CHECK_OPCODE), 0); in sc_free()
864 write_kctxt_csr(dd, hw_context, SC(CREDIT_RETURN_ADDR), 0); in sc_free()
865 write_kctxt_csr(dd, hw_context, SC(CREDIT_CTRL), 0); in sc_free()
868 sc_hw_free(dd, sw_index, hw_context); in sc_free()
888 reg = read_kctxt_csr(sc->dd, sc->hw_context, SC(CTRL)); in sc_disable()
892 write_kctxt_csr(sc->dd, sc->hw_context, SC(CTRL), reg); in sc_disable()
949 static bool is_sc_halted(struct hfi1_devdata *dd, u32 hw_context) in is_sc_halted() argument
951 return !!(read_kctxt_csr(dd, hw_context, SC(STATUS)) & in is_sc_halted()
978 reg = read_csr(dd, sc->hw_context * 8 + in sc_wait_for_packet_egress()
982 is_sc_halted(dd, sc->hw_context) || egress_halted(reg)) in sc_wait_for_packet_egress()
995 sc->hw_context, (u32)reg); in sc_wait_for_packet_egress()
1043 sc->hw_context); in sc_restart()
1053 reg = read_kctxt_csr(dd, sc->hw_context, SC(STATUS)); in sc_restart()
1058 __func__, sc->sw_index, sc->hw_context); in sc_restart()
1086 sc->hw_context, count); in sc_restart()
1262 sc_ctrl = read_kctxt_csr(dd, sc->hw_context, SC(CTRL)); in sc_enable()
1285 reg = read_kctxt_csr(dd, sc->hw_context, SC(ERR_STATUS)); in sc_enable()
1287 write_kctxt_csr(dd, sc->hw_context, SC(ERR_CLEAR), reg); in sc_enable()
1301 pio = ((sc->hw_context & SEND_PIO_INIT_CTXT_PIO_CTXT_NUM_MASK) << in sc_enable()
1315 sc->sw_index, sc->hw_context, ret); in sc_enable()
1323 write_kctxt_csr(dd, sc->hw_context, SC(CTRL), sc_ctrl); in sc_enable()
1328 read_kctxt_csr(dd, sc->hw_context, SC(CTRL)); in sc_enable()
1344 write_kctxt_csr(sc->dd, sc->hw_context, SC(CREDIT_FORCE), in sc_return_credits()
1350 read_kctxt_csr(sc->dd, sc->hw_context, SC(CREDIT_FORCE)); in sc_return_credits()
1352 write_kctxt_csr(sc->dd, sc->hw_context, SC(CREDIT_FORCE), 0); in sc_return_credits()
1371 __func__, sc->sw_index, sc->hw_context); in sc_drop()
1518 write_kctxt_csr(sc->dd, sc->hw_context, in sc_add_credit_return_intr()
1540 write_kctxt_csr(sc->dd, sc->hw_context, in sc_del_credit_return_intr()
1718 void sc_group_release_update(struct hfi1_devdata *dd, u32 hw_context) in sc_group_release_update() argument
1725 sw_index = dd->hw_to_sw[hw_context]; in sc_group_release_update()
1728 __func__, hw_context, sw_index); in sc_group_release_update()
1735 gc = group_context(hw_context, sc->group); in sc_group_release_update()
1742 __func__, hw_context, sw_index); in sc_group_release_update()
2024 ctxt = dd->vld[15].sc->hw_context; in init_pervl_scs()
2033 ctxt = dd->vld[i].sc->hw_context; in init_pervl_scs()
2039 ctxt = dd->kernel_send_context[i + 1]->hw_context; in init_pervl_scs()
2130 sc->flags, sc->sw_index, sc->hw_context, sc->group); in seqfile_dump_sci()
2137 reg = read_kctxt_csr(sc->dd, sc->hw_context, SC(CREDIT_STATUS)); in seqfile_dump_sci()