Lines Matching refs:hw_context

454 		       u32 *hw_context)
468 *hw_context = context;
481 static void sc_hw_free(struct hfi1_devdata *dd, u32 sw_index, u32 hw_context)
487 dd_dev_err(dd, "%s: sw_index %u not allocated? hw_context %u\n",
488 __func__, sw_index, hw_context);
491 dd->hw_to_sw[hw_context] = INVALID_SCI;
521 u32 gc = group_context(sc->hw_context, sc->group);
522 u32 index = sc->hw_context & 0x7;
603 write_kctxt_csr(sc->dd, sc->hw_context,
624 u32 hw_context = sc->hw_context;
627 write_kctxt_csr(dd, hw_context,
664 u32 hw_context;
686 ret = sc_hw_alloc(dd, type, &sw_index, &hw_context);
712 sc->hw_context = hw_context;
720 sc->base_addr = dd->piobase + ((hw_context & PIO_ADDR_CONTEXT_MASK)
728 write_kctxt_csr(dd, hw_context, SC(CTRL), reg);
733 write_kctxt_csr(dd, hw_context, SC(ERR_MASK), (u64)-1);
736 write_kctxt_csr(dd, hw_context, SC(CHECK_PARTITION_KEY),
751 write_kctxt_csr(dd, hw_context, SC(CHECK_OPCODE),
757 write_kctxt_csr(dd, hw_context, SC(CREDIT_RETURN_ADDR), reg);
789 write_kctxt_csr(dd, hw_context, SC(CREDIT_CTRL), reg);
794 write_kctxt_csr(dd, hw_context, SC(CHECK_VL), reg);
825 hw_context,
841 u32 hw_context;
851 hw_context = sc->hw_context;
859 write_kctxt_csr(dd, hw_context, SC(CTRL), 0);
860 write_kctxt_csr(dd, hw_context, SC(CHECK_ENABLE), 0);
861 write_kctxt_csr(dd, hw_context, SC(ERR_MASK), 0);
862 write_kctxt_csr(dd, hw_context, SC(CHECK_PARTITION_KEY), 0);
863 write_kctxt_csr(dd, hw_context, SC(CHECK_OPCODE), 0);
864 write_kctxt_csr(dd, hw_context, SC(CREDIT_RETURN_ADDR), 0);
865 write_kctxt_csr(dd, hw_context, SC(CREDIT_CTRL), 0);
868 sc_hw_free(dd, sw_index, hw_context);
888 reg = read_kctxt_csr(sc->dd, sc->hw_context, SC(CTRL));
892 write_kctxt_csr(sc->dd, sc->hw_context, SC(CTRL), reg);
949 static bool is_sc_halted(struct hfi1_devdata *dd, u32 hw_context)
951 return !!(read_kctxt_csr(dd, hw_context, SC(STATUS)) &
978 reg = read_csr(dd, sc->hw_context * 8 +
982 is_sc_halted(dd, sc->hw_context) || egress_halted(reg))
995 sc->hw_context, (u32)reg);
1043 sc->hw_context);
1053 reg = read_kctxt_csr(dd, sc->hw_context, SC(STATUS));
1058 __func__, sc->sw_index, sc->hw_context);
1086 sc->hw_context, count);
1262 sc_ctrl = read_kctxt_csr(dd, sc->hw_context, SC(CTRL));
1285 reg = read_kctxt_csr(dd, sc->hw_context, SC(ERR_STATUS));
1287 write_kctxt_csr(dd, sc->hw_context, SC(ERR_CLEAR), reg);
1301 pio = ((sc->hw_context & SEND_PIO_INIT_CTXT_PIO_CTXT_NUM_MASK) <<
1315 sc->sw_index, sc->hw_context, ret);
1323 write_kctxt_csr(dd, sc->hw_context, SC(CTRL), sc_ctrl);
1328 read_kctxt_csr(dd, sc->hw_context, SC(CTRL));
1344 write_kctxt_csr(sc->dd, sc->hw_context, SC(CREDIT_FORCE),
1350 read_kctxt_csr(sc->dd, sc->hw_context, SC(CREDIT_FORCE));
1352 write_kctxt_csr(sc->dd, sc->hw_context, SC(CREDIT_FORCE), 0);
1371 __func__, sc->sw_index, sc->hw_context);
1518 write_kctxt_csr(sc->dd, sc->hw_context,
1540 write_kctxt_csr(sc->dd, sc->hw_context,
1718 void sc_group_release_update(struct hfi1_devdata *dd, u32 hw_context)
1725 sw_index = dd->hw_to_sw[hw_context];
1728 __func__, hw_context, sw_index);
1735 gc = group_context(hw_context, sc->group);
1742 __func__, hw_context, sw_index);
2021 ctxt = dd->vld[15].sc->hw_context;
2030 ctxt = dd->vld[i].sc->hw_context;
2036 ctxt = dd->kernel_send_context[i + 1]->hw_context;
2131 sc->flags, sc->sw_index, sc->hw_context, sc->group);
2138 reg = read_kctxt_csr(sc->dd, sc->hw_context, SC(CREDIT_STATUS));