Add support to retrieve XGMI hive id

Change-Id: I1eee05dd85ecb856889d1cfe0565454d2f538856
Signed-off-by: Mike Li <Tianxinmike.Li@amd.com>
This commit is contained in:
Mike Li
2020-06-18 08:43:29 -07:00
parent 9e0ebb250c
commit 488bbb668a
5 ha cambiato i file con 68 aggiunte e 1 eliminazioni
+21
Vedi File
@@ -2785,6 +2785,27 @@ rsmi_dev_xgmi_error_status(uint32_t dv_ind, rsmi_xgmi_status_t *status);
rsmi_status_t
rsmi_dev_xgmi_error_reset(uint32_t dv_ind);
/**
* @brief Retrieve the XGMI hive id for a device
*
* @details Given a device index @p dv_ind, and a pointer to an
* uint64_t @p hive_id, this function will write the current XGMI
* hive id for the device @p dv_ind to the memory pointed to by @p hive_id.
*
* @param[in] dv_ind a device index
*
* @param[inout] hive_id A pointer to an uint64_t to which the XGMI hive id
* should be written
*
* @retval ::RSMI_STATUS_SUCCESS call was successful
* @retval ::RSMI_STATUS_NOT_SUPPORTED installed software or hardware does not
* support this function with the given arguments
* @retval ::RSMI_STATUS_INVALID_ARGS the provided arguments are not valid
*
*/
rsmi_status_t
rsmi_dev_xgmi_hive_id_get(uint32_t dv_ind, uint64_t *hive_id);
/** @} */ // end of SysInfo
/*****************************************************************************/
+2
Vedi File
@@ -69,6 +69,7 @@ class KFDNode {
uint32_t node_index(void) const {return node_indx_;}
uint32_t numa_node_number(void) const {return numa_node_number_;}
uint64_t numa_node_weight(void) const {return numa_node_weight_;}
uint64_t xgmi_hive_id(void) const {return xgmi_hive_id_;}
IO_LINK_TYPE numa_node_type(void) const {return numa_node_type_;}
int get_io_link_type(uint32_t node_to, IO_LINK_TYPE *type);
int get_io_link_weight(uint32_t node_to, uint64_t *weight);
@@ -84,6 +85,7 @@ class KFDNode {
uint32_t numa_node_number_;
uint64_t numa_node_weight_;
IO_LINK_TYPE numa_node_type_;
uint64_t xgmi_hive_id_;
std::map<uint32_t, IO_LINK_TYPE> io_link_type_;
std::map<uint32_t, uint64_t> io_link_weight_;
std::map<uint32_t, std::shared_ptr<IOLink>> io_link_map_;