Lines Matching refs:hw_context

496 		       u32 *hw_context)
510 *hw_context = context;
523 static void sc_hw_free(struct hfi1_devdata *dd, u32 sw_index, u32 hw_context)
529 dd_dev_err(dd, "%s: sw_index %u not allocated? hw_context %u\n",
530 __func__, sw_index, hw_context);
533 dd->hw_to_sw[hw_context] = INVALID_SCI;
563 u32 gc = group_context(sc->hw_context, sc->group);
564 u32 index = sc->hw_context & 0x7;
645 write_kctxt_csr(sc->dd, sc->hw_context,
666 u32 hw_context = sc->hw_context;
669 write_kctxt_csr(dd, hw_context,
706 u32 hw_context;
728 ret = sc_hw_alloc(dd, type, &sw_index, &hw_context);
754 sc->hw_context = hw_context;
762 sc->base_addr = dd->piobase + ((hw_context & PIO_ADDR_CONTEXT_MASK)
770 write_kctxt_csr(dd, hw_context, SC(CTRL), reg);
775 write_kctxt_csr(dd, hw_context, SC(ERR_MASK), (u64)-1);
778 write_kctxt_csr(dd, hw_context, SC(CHECK_PARTITION_KEY),
793 write_kctxt_csr(dd, hw_context, SC(CHECK_OPCODE),
799 write_kctxt_csr(dd, hw_context, SC(CREDIT_RETURN_ADDR), reg);
831 write_kctxt_csr(dd, hw_context, SC(CREDIT_CTRL), reg);
836 write_kctxt_csr(dd, hw_context, SC(CHECK_VL), reg);
867 hw_context,
883 u32 hw_context;
893 hw_context = sc->hw_context;
901 write_kctxt_csr(dd, hw_context, SC(CTRL), 0);
902 write_kctxt_csr(dd, hw_context, SC(CHECK_ENABLE), 0);
903 write_kctxt_csr(dd, hw_context, SC(ERR_MASK), 0);
904 write_kctxt_csr(dd, hw_context, SC(CHECK_PARTITION_KEY), 0);
905 write_kctxt_csr(dd, hw_context, SC(CHECK_OPCODE), 0);
906 write_kctxt_csr(dd, hw_context, SC(CREDIT_RETURN_ADDR), 0);
907 write_kctxt_csr(dd, hw_context, SC(CREDIT_CTRL), 0);
910 sc_hw_free(dd, sw_index, hw_context);
930 reg = read_kctxt_csr(sc->dd, sc->hw_context, SC(CTRL));
934 write_kctxt_csr(sc->dd, sc->hw_context, SC(CTRL), reg);
991 static bool is_sc_halted(struct hfi1_devdata *dd, u32 hw_context)
993 return !!(read_kctxt_csr(dd, hw_context, SC(STATUS)) &
1020 reg = read_csr(dd, sc->hw_context * 8 +
1024 is_sc_halted(dd, sc->hw_context) || egress_halted(reg))
1037 sc->hw_context, (u32)reg);
1085 sc->hw_context);
1095 reg = read_kctxt_csr(dd, sc->hw_context, SC(STATUS));
1100 __func__, sc->sw_index, sc->hw_context);
1128 sc->hw_context, count);
1304 sc_ctrl = read_kctxt_csr(dd, sc->hw_context, SC(CTRL));
1327 reg = read_kctxt_csr(dd, sc->hw_context, SC(ERR_STATUS));
1329 write_kctxt_csr(dd, sc->hw_context, SC(ERR_CLEAR), reg);
1343 pio = ((sc->hw_context & SEND_PIO_INIT_CTXT_PIO_CTXT_NUM_MASK) <<
1357 sc->sw_index, sc->hw_context, ret);
1365 write_kctxt_csr(dd, sc->hw_context, SC(CTRL), sc_ctrl);
1370 read_kctxt_csr(dd, sc->hw_context, SC(CTRL));
1386 write_kctxt_csr(sc->dd, sc->hw_context, SC(CREDIT_FORCE),
1392 read_kctxt_csr(sc->dd, sc->hw_context, SC(CREDIT_FORCE));
1394 write_kctxt_csr(sc->dd, sc->hw_context, SC(CREDIT_FORCE), 0);
1413 __func__, sc->sw_index, sc->hw_context);
1560 write_kctxt_csr(sc->dd, sc->hw_context,
1582 write_kctxt_csr(sc->dd, sc->hw_context,
1760 void sc_group_release_update(struct hfi1_devdata *dd, u32 hw_context)
1767 sw_index = dd->hw_to_sw[hw_context];
1770 __func__, hw_context, sw_index);
1777 gc = group_context(hw_context, sc->group);
1784 __func__, hw_context, sw_index);
2066 ctxt = dd->vld[15].sc->hw_context;
2075 ctxt = dd->vld[i].sc->hw_context;
2081 ctxt = dd->kernel_send_context[i + 1]->hw_context;
2172 sc->flags, sc->sw_index, sc->hw_context, sc->group);
2179 reg = read_kctxt_csr(sc->dd, sc->hw_context, SC(CREDIT_STATUS));