Lines Matching refs:hw_context

504 		       u32 *hw_context)  in sc_hw_alloc()  argument
518 *hw_context = context; in sc_hw_alloc()
531 static void sc_hw_free(struct hfi1_devdata *dd, u32 sw_index, u32 hw_context) in sc_hw_free() argument
538 __func__, sw_index, hw_context); in sc_hw_free()
541 dd->hw_to_sw[hw_context] = INVALID_SCI; in sc_hw_free()
571 u32 gc = group_context(sc->hw_context, sc->group); in cr_group_addresses()
572 u32 index = sc->hw_context & 0x7; in cr_group_addresses()
653 write_kctxt_csr(sc->dd, sc->hw_context, in sc_set_cr_threshold()
674 u32 hw_context = sc->hw_context; in set_pio_integrity() local
677 write_kctxt_csr(dd, hw_context, in set_pio_integrity()
714 u32 hw_context; in sc_alloc() local
736 ret = sc_hw_alloc(dd, type, &sw_index, &hw_context); in sc_alloc()
761 sc->hw_context = hw_context; in sc_alloc()
769 sc->base_addr = dd->piobase + ((hw_context & PIO_ADDR_CONTEXT_MASK) in sc_alloc()
777 write_kctxt_csr(dd, hw_context, SC(CTRL), reg); in sc_alloc()
782 write_kctxt_csr(dd, hw_context, SC(ERR_MASK), (u64)-1); in sc_alloc()
785 write_kctxt_csr(dd, hw_context, SC(CHECK_PARTITION_KEY), in sc_alloc()
800 write_kctxt_csr(dd, hw_context, SC(CHECK_OPCODE), in sc_alloc()
806 write_kctxt_csr(dd, hw_context, SC(CREDIT_RETURN_ADDR), reg); in sc_alloc()
838 write_kctxt_csr(dd, hw_context, SC(CREDIT_CTRL), reg); in sc_alloc()
843 write_kctxt_csr(dd, hw_context, SC(CHECK_VL), reg); in sc_alloc()
874 hw_context, in sc_alloc()
890 u32 hw_context; in sc_free() local
900 hw_context = sc->hw_context; in sc_free()
908 write_kctxt_csr(dd, hw_context, SC(CTRL), 0); in sc_free()
909 write_kctxt_csr(dd, hw_context, SC(CHECK_ENABLE), 0); in sc_free()
910 write_kctxt_csr(dd, hw_context, SC(ERR_MASK), 0); in sc_free()
911 write_kctxt_csr(dd, hw_context, SC(CHECK_PARTITION_KEY), 0); in sc_free()
912 write_kctxt_csr(dd, hw_context, SC(CHECK_OPCODE), 0); in sc_free()
913 write_kctxt_csr(dd, hw_context, SC(CREDIT_RETURN_ADDR), 0); in sc_free()
914 write_kctxt_csr(dd, hw_context, SC(CREDIT_CTRL), 0); in sc_free()
917 sc_hw_free(dd, sw_index, hw_context); in sc_free()
936 reg = read_kctxt_csr(sc->dd, sc->hw_context, SC(CTRL)); in sc_disable()
940 write_kctxt_csr(sc->dd, sc->hw_context, SC(CTRL), reg); in sc_disable()
980 static bool is_sc_halted(struct hfi1_devdata *dd, u32 hw_context) in is_sc_halted() argument
982 return !!(read_kctxt_csr(dd, hw_context, SC(STATUS)) & in is_sc_halted()
1009 reg = read_csr(dd, sc->hw_context * 8 + in sc_wait_for_packet_egress()
1013 is_sc_halted(dd, sc->hw_context) || egress_halted(reg)) in sc_wait_for_packet_egress()
1026 sc->hw_context, (u32)reg); in sc_wait_for_packet_egress()
1074 sc->hw_context); in sc_restart()
1084 reg = read_kctxt_csr(dd, sc->hw_context, SC(STATUS)); in sc_restart()
1089 __func__, sc->sw_index, sc->hw_context); in sc_restart()
1117 sc->hw_context, count); in sc_restart()
1293 sc_ctrl = read_kctxt_csr(dd, sc->hw_context, SC(CTRL)); in sc_enable()
1316 reg = read_kctxt_csr(dd, sc->hw_context, SC(ERR_STATUS)); in sc_enable()
1318 write_kctxt_csr(dd, sc->hw_context, SC(ERR_CLEAR), reg); in sc_enable()
1332 pio = ((sc->hw_context & SEND_PIO_INIT_CTXT_PIO_CTXT_NUM_MASK) << in sc_enable()
1346 sc->sw_index, sc->hw_context, ret); in sc_enable()
1354 write_kctxt_csr(dd, sc->hw_context, SC(CTRL), sc_ctrl); in sc_enable()
1359 read_kctxt_csr(dd, sc->hw_context, SC(CTRL)); in sc_enable()
1375 write_kctxt_csr(sc->dd, sc->hw_context, SC(CREDIT_FORCE), in sc_return_credits()
1381 read_kctxt_csr(sc->dd, sc->hw_context, SC(CREDIT_FORCE)); in sc_return_credits()
1383 write_kctxt_csr(sc->dd, sc->hw_context, SC(CREDIT_FORCE), 0); in sc_return_credits()
1402 __func__, sc->sw_index, sc->hw_context); in sc_drop()
1548 write_kctxt_csr(sc->dd, sc->hw_context, in sc_add_credit_return_intr()
1570 write_kctxt_csr(sc->dd, sc->hw_context, in sc_del_credit_return_intr()
1745 void sc_group_release_update(struct hfi1_devdata *dd, u32 hw_context) in sc_group_release_update() argument
1752 sw_index = dd->hw_to_sw[hw_context]; in sc_group_release_update()
1755 __func__, hw_context, sw_index); in sc_group_release_update()
1762 gc = group_context(hw_context, sc->group); in sc_group_release_update()
1769 __func__, hw_context, sw_index); in sc_group_release_update()
2051 ctxt = dd->vld[15].sc->hw_context; in init_pervl_scs()
2060 ctxt = dd->vld[i].sc->hw_context; in init_pervl_scs()
2066 ctxt = dd->kernel_send_context[i + 1]->hw_context; in init_pervl_scs()