Lines Matching defs:tag

53  * - Requesting a POW operation with an active tag switch in
55 * - Waiting for a tag switch to complete for an excessively
58 * - Illegal tag switches from NULL_NULL.
59 * - Illegal tag switches from NULL.
112 * POW tag operations. These are used in the data stored to the POW.
116 CVMX_POW_TAG_OP_SWTAG = 0L, /**< switch the tag (only) for this PP
117 - the previous tag should be non-NULL in this case
118 - tag switch response required
119 - fields used: op, type, tag */
120 CVMX_POW_TAG_OP_SWTAG_FULL = 1L, /**< switch the tag for this PP, with full information
121 - this should be used when the previous tag is NULL
122 - tag switch response required
123 - fields used: address, op, grp, type, tag */
124 CVMX_POW_TAG_OP_SWTAG_DESCH = 2L, /**< switch the tag (and/or group) for this PP and de-schedule
125 - OK to keep the tag the same and only change the group
126 - fields used: op, no_sched, grp, type, tag */
130 - fields used: address, op, qos, grp, type, tag */
172 cvmx_pow_tag_type_t type : 3; /**< the type of the tag. type is used for everything except CVMX_POW_TAG_OP_DESCH, CVMX_POW_TAG_OP_UPDATE_WQP_GRP, and CVMX_POW_TAG_OP_*_NSCHED */
173 uint64_t tag :32; /**< the actual tag. tag is used for everything except CVMX_POW_TAG_OP_DESCH, CVMX_POW_TAG_OP_UPDATE_WQP_GRP, and CVMX_POW_TAG_OP_*_NSCHED */
175 uint64_t tag :32;
195 cvmx_pow_tag_type_t type : 2; /**< the type of the tag. type is used for everything except CVMX_POW_TAG_OP_DESCH, CVMX_POW_TAG_OP_UPDATE_WQP_GRP, and CVMX_POW_TAG_OP_*_NSCHED */
196 uint64_t tag :32; /**< the actual tag. tag is used for everything except CVMX_POW_TAG_OP_DESCH, CVMX_POW_TAG_OP_UPDATE_WQP_GRP, and CVMX_POW_TAG_OP_*_NSCHED */
198 uint64_t tag :32;
218 cvmx_pow_tag_type_t type : 2; /**< the type of the tag. type is used for everything except CVMX_POW_TAG_OP_DESCH, CVMX_POW_TAG_OP_UPDATE_WQP_GRP, and CVMX_POW_TAG_OP_*_NSCHED */
219 uint64_t tag :32; /**< the actual tag. tag is used for everything except CVMX_POW_TAG_OP_DESCH, CVMX_POW_TAG_OP_UPDATE_WQP_GRP, and CVMX_POW_TAG_OP_*_NSCHED */
221 uint64_t tag :32;
239 cvmx_pow_tag_type_t type : 2; /**< the type of the tag. type is used for everything except CVMX_POW_TAG_OP_DESCH, CVMX_POW_TAG_OP_UPDATE_WQP_GRP, and CVMX_POW_TAG_OP_*_NSCHED */
240 uint64_t tag :32; /**< the actual tag. tag is used for everything except CVMX_POW_TAG_OP_DESCH, CVMX_POW_TAG_OP_UPDATE_WQP_GRP, and CVMX_POW_TAG_OP_*_NSCHED */
242 uint64_t tag :32;
255 uint32_t tag;
304 uint64_t get_rev : 1; /**< If set and get_cur is set, return reverse tag-list pointer rather than forward tag-list pointer */
306 uint64_t get_wqp : 1; /**< If set, get the work-queue pointer rather than tag/type */
365 uint64_t get_wqp : 1; /**< If set, get the work-queue pointer rather than tag/type (no effect when get_des set). */
393 uint64_t opcode : 3; /**< Read TAG/WQ pointer/pending tag/next potr */
467 uint64_t opcode : 3; /**< Read TAG/WQ pointer/pending tag/next potr */
546 SWTAG_FULL, and the POW entry has not left the list for the original tag. */
560 uint64_t pend_type : 2; /**< This is the tag type when pend_switch or (pend_desched AND pend_desched_switch) are set. */
561 uint64_t pend_tag : 32; /**< - this is the tag when pend_switch or (pend_desched AND pend_desched_switch) are set. */
590 SWTAG_FULL, and the SSO entry has not left the list for the original tag. */
601 uint64_t pend_type : 2; /**< This is the tag type when pend_switch is set. */
602 uint64_t pend_tag : 32; /**< This is the tag when pend_switch is set. */
627 SWTAG_FULL, and the POW entry has not left the list for the original tag. */
667 SWTAG_FULL, and the SSO entry has not left the list for the original tag. */
701 uint64_t link_index : 11; /**< Points to the next POW entry in the tag list when tail == 0 (and
704 uint64_t grp : 4; /**< The group attached to the core (updated when new tag list entered on SWTAG_FULL). */
705 uint64_t head : 1; /**< Set when this POW entry is at the head of its tag list (also set when in
707 uint64_t tail : 1; /**< Set when this POW entry is at the tail of its tag list (also set when in the
709 uint64_t tag_type : 2; /**< The tag type attached to the core (updated when new tag list
711 uint64_t tag : 32; /**< The tag attached to the core (updated when new tag list entered on
714 uint64_t tag : 32;
734 uint64_t grp : 6; /**< The group attached to the core (updated when new tag list entered on
736 uint64_t head : 1; /**< Set when this SSO entry is at the head of its tag list (also set when in the
738 uint64_t tail : 1; /**< Set when this SSO entry is at the tail of its tag list (also set when in the
741 uint64_t tag_type : 2; /**< The tag type attached to the core (updated when new tag list entered
743 uint64_t tag : 32; /**< The tag attached to the core (updated when new tag list entered on SWTAG,
746 uint64_t tag : 32;
765 uint64_t revlink_index : 11; /**< Points to the prior POW entry in the tag list when head == 0
769 uint64_t grp : 4; /**< The group attached to the core (updated when new tag list entered on SWTAG_FULL). */
770 uint64_t head : 1; /**< Set when this POW entry is at the head of its tag list (also set when in
772 uint64_t tail : 1; /**< Set when this POW entry is at the tail of its tag list (also set when in the
774 uint64_t tag_type : 2; /**< The tag type attached to the core (updated when new tag list
776 uint64_t tag : 32; /**< The tag attached to the core (updated when new tag list entered on
779 uint64_t tag : 32;
799 uint64_t grp : 6; /**< The group attached to the core (updated when new tag list entered on
802 uint64_t wqp : 38; /**< The wqp attached to the core (updated when new tag list entered on SWTAG_FULL). */
820 uint64_t link_index : 11; /**< Points to the next POW entry in the tag list when tail == 0 (and
823 uint64_t grp : 4; /**< The group attached to the core (updated when new tag list entered on SWTAG_FULL). */
824 uint64_t wqp : 36; /**< The wqp attached to the core (updated when new tag list entered on SWTAG_FULL). */
843 uint64_t grp : 6; /**< The group attached to the core (updated when new tag list entered on
845 uint64_t head : 1; /**< Set when this SSO entry is at the head of its tag list (also set when in the
847 uint64_t tail : 1; /**< Set when this SSO entry is at the tail of its tag list (also set when in the
850 uint64_t revlink_index : 11; /**< Points to the prior SSO entry in the tag list when head==0 (and tag_type is not UNSCHEDULED or EMPTY). */
852 uint64_t link_index : 11; /**< Points to the next SSO entry in the tag list when tail==0 (and tag_type is not UNSCHEDULDED or EMPTY). */
874 uint64_t revlink_index : 11; /**< Points to the prior POW entry in the tag list when head == 0
878 uint64_t grp : 4; /**< The group attached to the core (updated when new tag list entered on SWTAG_FULL). */
879 uint64_t wqp : 36; /**< The wqp attached to the core (updated when new tag list entered on SWTAG_FULL). */
900 uint64_t tail : 1; /**< Set when this POW entry is at the tail of its tag list (also set when in the
902 uint64_t tag_type : 2; /**< The tag type of the POW entry. */
903 uint64_t tag : 32; /**< The tag of the POW entry. */
905 uint64_t tag : 32;
922 uint64_t tail : 1; /**< Set when this SSO entry is at the tail of its tag list (also set when in the
925 uint64_t tag_type : 2; /**< The tag type of the SSO entry. */
926 uint64_t tag : 32; /**< The tag of the SSO entry. */
928 uint64_t tag : 32;
984 uint64_t fwd_index : 11; /**< The next entry in the tag list connected to the descheduled head. */
987 uint64_t pend_switch : 1; /**< There is a pending tag switch */
988 uint64_t pend_type : 2; /**< The next tag type for the new tag list when pend_switch is set. */
989 uint64_t pend_tag : 32; /**< The next tag for the new tag list when pend_switch is set. */
1009 SWTAG_FULL, and the SSO entry has not left the list for the original tag. */
1011 uint64_t pend_type : 2; /**< The next tag type for the new tag list when pend_switch is set. */
1012 uint64_t pend_tag : 32; /**< The next tag for the new tag list when pend_switch is set. */
1029 uint64_t fwd_index : 11; /**< The next entry in the tag list connected to the descheduled head. */
1251 uint64_t tag : 32;
1253 uint64_t tag : 32;
1346 * Get the POW tag for this core. This returns the current
1347 * tag type, tag, group, and POW entry index associated with
1348 * this core. Index is only valid if the tag type isn't NULL_NULL.
1349 * If a tag switch is pending this routine returns the tag before
1350 * the tag switch, not after.
1352 * @return Current tag
1371 result.tag = load_resp.s.tag;
1384 result.tag = load_resp.s_sstatus2.tag;
1428 * Print a warning if a tag switch is pending for this core
1430 * @param function Function name checking for a pending tag switch
1436 cvmx_warn_if(!switch_complete, "%s called with tag switch in progress\n", function);
1441 * Waits for a tag switch to complete by polling the completion bit.
1466 * This function does NOT wait for previous tag switches to complete,
1467 * so the caller must ensure that there is not a pending tag switch.
1499 * This function waits for any previous tag switch to complete before
1521 * This function waits for any previous tag switch to complete before
1551 * This function does NOT wait for previous tag switches to complete,
1552 * so the caller must ensure that there is not a pending tag switch.
1578 * This function waits for any previous tag switch to complete before
1638 * Starts a tag switch to the provided tag value and tag type. Completion for
1639 * the tag switch must be checked for separately.
1641 * work queue entry in dram to match tag value and type, so the application must
1643 * This tag switch command must not be used for switches to NULL, as the tag
1647 * NOTE: This should not be used when switching from a NULL tag. Use
1650 * This function does no checks, so the caller must ensure that any previous tag
1653 * @param tag new tag value
1654 * @param tag_type new tag type (ordered or atomic)
1656 static inline void cvmx_pow_tag_sw_nocheck(uint32_t tag, cvmx_pow_tag_type_t tag_type)
1666 cvmx_warn_if(current_tag.tag_type == CVMX_POW_TAG_TYPE_NULL_NULL, "%s called with NULL_NULL tag\n", __FUNCTION__);
1667 cvmx_warn_if(current_tag.tag_type == CVMX_POW_TAG_TYPE_NULL, "%s called with NULL tag\n", __FUNCTION__);
1668 cvmx_warn_if((current_tag.tag_type == tag_type) && (current_tag.tag == tag), "%s called to perform a tag switch to the same tag\n", __FUNCTION__);
1669 cvmx_warn_if(tag_type == CVMX_POW_TAG_TYPE_NULL, "%s called to perform a tag switch to NULL. Use cvmx_pow_tag_sw_null() instead\n", __FUNCTION__);
1674 ** It is the application's responsibility to keep track of the current tag
1681 tag_req.s_cn68xx_other.tag = tag;
1685 tag_req.s_cn38xx.tag = tag;
1701 * Starts a tag switch to the provided tag value and tag type. Completion for
1702 * the tag switch must be checked for separately.
1704 * work queue entry in dram to match tag value and type, so the application must
1706 * This tag switch command must not be used for switches to NULL, as the tag
1710 * NOTE: This should not be used when switching from a NULL tag. Use
1713 * This function waits for any previous tag switch to complete, and also
1714 * displays an error on tag switches to NULL.
1716 * @param tag new tag value
1717 * @param tag_type new tag type (ordered or atomic)
1719 static inline void cvmx_pow_tag_sw(uint32_t tag, cvmx_pow_tag_type_t tag_type)
1726 ** It is the application's responsibility to keep track of the current tag
1730 /* Ensure that there is not a pending tag switch, as a tag switch cannot be started
1733 cvmx_pow_tag_sw_nocheck(tag, tag_type);
1738 * Starts a tag switch to the provided tag value and tag type. Completion for
1739 * the tag switch must be checked for separately.
1741 * work queue entry in dram to match tag value and type, so the application must
1743 * This tag switch command must not be used for switches to NULL, as the tag
1747 * This function must be used for tag switches from NULL.
1749 * This function does no checks, so the caller must ensure that any previous tag
1753 * @param tag tag value to be assigned to work queue entry
1754 * @param tag_type type of tag
1757 static inline void cvmx_pow_tag_sw_full_nocheck(cvmx_wqe_t *wqp, uint32_t tag, cvmx_pow_tag_type_t tag_type, uint64_t group)
1767 cvmx_warn_if(current_tag.tag_type == CVMX_POW_TAG_TYPE_NULL_NULL, "%s called with NULL_NULL tag\n", __FUNCTION__);
1768 cvmx_warn_if((current_tag.tag_type == tag_type) && (current_tag.tag == tag), "%s called to perform a tag switch to the same tag\n", __FUNCTION__);
1769 cvmx_warn_if(tag_type == CVMX_POW_TAG_TYPE_NULL, "%s called to perform a tag switch to NULL. Use cvmx_pow_tag_sw_null() instead\n", __FUNCTION__);
1776 ** It is the application's responsibility to keep track of the current tag
1783 tag_req.s_cn68xx_other.tag = tag;
1788 tag_req.s_cn38xx.tag = tag;
1806 * Starts a tag switch to the provided tag value and tag type. Completion for
1807 * the tag switch must be checked for separately.
1809 * work queue entry in dram to match tag value and type, so the application must
1811 * This tag switch command must not be used for switches to NULL, as the tag
1815 * This function must be used for tag switches from NULL.
1817 * This function waits for any pending tag switches to complete
1818 * before requesting the tag switch.
1821 * @param tag tag value to be assigned to work queue entry
1822 * @param tag_type type of tag
1825 static inline void cvmx_pow_tag_sw_full(cvmx_wqe_t *wqp, uint32_t tag, cvmx_pow_tag_type_t tag_type, uint64_t group)
1830 /* Ensure that there is not a pending tag switch, as a tag switch cannot be started
1833 cvmx_pow_tag_sw_full_nocheck(wqp, tag, tag_type, group);
1838 * Switch to a NULL tag, which ends any ordering or
1842 * This function does NOT wait for previous tag switches to complete,
1843 * so the caller must ensure that any previous tag switches have completed.
1855 cvmx_warn_if(current_tag.tag_type == CVMX_POW_TAG_TYPE_NULL_NULL, "%s called with NULL_NULL tag\n", __FUNCTION__);
1856 cvmx_warn_if(current_tag.tag_type == CVMX_POW_TAG_TYPE_NULL, "%s called when we already have a NULL tag\n", __FUNCTION__);
1881 * Switch to a NULL tag, which ends any ordering or
1885 * This function waits for any pending tag switches to complete
1893 /* Ensure that there is not a pending tag switch, as a tag switch cannot be started
1906 * Note that the tag provided is for the work queue entry submitted, and is unrelated to the tag that
1910 * @param tag tag value to be assigned to work queue entry
1911 * @param tag_type type of tag
1915 static inline void cvmx_pow_work_submit(cvmx_wqe_t *wqp, uint32_t tag, cvmx_pow_tag_type_t tag_type, uint64_t qos, uint64_t grp)
1922 wqp->word1.s.tag = tag;
1935 tag_req.s_cn68xx_add.tag = tag;
1946 tag_req.s_cn38xx.tag = tag;
2063 * Performs a tag switch and then an immediate deschedule. This completes
2067 * This function does NOT wait for any prior tag switches to complete, so the
2075 * the head of the FIFO associated with the given tag. This
2077 * tag as an ATOMIC tag. Note that in the SWTAG_DESCH
2078 * case (to an ORDERED tag), the HW will do the switch
2086 * same tag.
2089 * DE-SCHEDULE. If an ORDERED tag is what was really desired,
2090 * SW can choose to immediately switch to an ORDERED tag
2091 * after the work (that has an ATOMIC tag) is re-scheduled.
2092 * Note that since there are never any tag switches pending
2096 * @param tag New tag value
2097 * @param tag_type New tag type
2103 static inline void cvmx_pow_tag_sw_desched_nocheck(uint32_t tag, cvmx_pow_tag_type_t tag_type, uint64_t group, uint64_t no_sched)
2113 cvmx_warn_if(current_tag.tag_type == CVMX_POW_TAG_TYPE_NULL_NULL, "%s called with NULL_NULL tag\n", __FUNCTION__);
2114 cvmx_warn_if(current_tag.tag_type == CVMX_POW_TAG_TYPE_NULL, "%s called with NULL tag. Deschedule not allowed from NULL state\n", __FUNCTION__);
2115 cvmx_warn_if((current_tag.tag_type != CVMX_POW_TAG_TYPE_ATOMIC) && (tag_type != CVMX_POW_TAG_TYPE_ATOMIC), "%s called where neither the before or after tag is ATOMIC\n", __FUNCTION__);
2121 tag_req.s_cn68xx_other.tag = tag;
2127 tag_req.s_cn38xx.tag = tag;
2141 * Performs a tag switch and then an immediate deschedule. This completes
2145 * This function waits for any prior tag switches to complete, so the
2146 * calling code may call this function with a pending tag switch.
2153 * the head of the FIFO associated with the given tag. This
2155 * tag as an ATOMIC tag. Note that in the SWTAG_DESCH
2156 * case (to an ORDERED tag), the HW will do the switch
2164 * same tag.
2167 * DE-SCHEDULE. If an ORDERED tag is what was really desired,
2168 * SW can choose to immediately switch to an ORDERED tag
2169 * after the work (that has an ATOMIC tag) is re-scheduled.
2170 * Note that since there are never any tag switches pending
2174 * @param tag New tag value
2175 * @param tag_type New tag type
2181 static inline void cvmx_pow_tag_sw_desched(uint32_t tag, cvmx_pow_tag_type_t tag_type, uint64_t group, uint64_t no_sched)
2188 /* Ensure that there is not a pending tag switch, as a tag switch cannot be started
2191 cvmx_pow_tag_sw_desched_nocheck(tag, tag_type, group, no_sched);
2214 cvmx_warn_if(current_tag.tag_type == CVMX_POW_TAG_TYPE_NULL_NULL, "%s called with NULL_NULL tag\n", __FUNCTION__);
2215 cvmx_warn_if(current_tag.tag_type == CVMX_POW_TAG_TYPE_NULL, "%s called with NULL tag. Deschedule not expected from NULL state\n", __FUNCTION__);
2245 ** Define usage of bits within the 32 bit tag values.
2249 * Number of bits of the tag used by software. The SW bits
2252 * of the tag are reserved for software, and the low 24 are set by the IPD unit.
2257 /* Below is the list of values for the top 8 bits of the tag. */
2260 ** * the upper 8 bits (bits 23 - 16 of the tag) define a subgroup
2261 ** * the lower 16 bits (bits 15 - 0 of the tag) define are the value with the subgroup
2266 #define CVMX_TAG_SUBGROUP_MASK 0xFFFF /* Mask for the value portion of the tag */
2271 /* End of executive tag subgroup definitions */
2278 * This function creates a 32 bit tag value from the two values provided.
2292 * Extracts the bits allocated for software use from the tag
2294 * @param tag 32 bit tag value
2296 * @return N bit software tag value, where N is configurable with the CVMX_TAG_SW_BITS define
2298 static inline uint32_t cvmx_pow_tag_get_sw_bits(uint64_t tag)
2300 return((tag >> (32 - CVMX_TAG_SW_BITS)) & cvmx_build_mask(CVMX_TAG_SW_BITS));
2304 * Extracts the bits allocated for hardware use from the tag
2306 * @param tag 32 bit tag value
2308 * @return (32 - N) bit software tag value, where N is configurable with the CVMX_TAG_SW_BITS define
2310 static inline uint32_t cvmx_pow_tag_get_hw_bits(uint64_t tag)
2312 return(tag & cvmx_build_mask(32 - CVMX_TAG_SW_BITS));