Add support for deferred RAS errors in API
The API will support the deferred errors Change-Id: I221a146f09fefde1fc31e5f746d0870e07c93561
Этот коммит содержится в:
коммит произвёл
Maisam Arif
родитель
c8c03dfab0
Коммит
c489cb8f3f
@@ -1429,9 +1429,10 @@ typedef struct {
|
||||
* @brief This structure holds error counts.
|
||||
*/
|
||||
typedef struct {
|
||||
uint64_t correctable_count; //!< Accumulated correctable errors
|
||||
uint64_t uncorrectable_count; //!< Accumulated uncorrectable errors
|
||||
uint64_t reserved[2];
|
||||
uint64_t correctable_count; //!< Accumulated correctable errors
|
||||
uint64_t uncorrectable_count; //!< Accumulated uncorrectable errors
|
||||
uint64_t deferred_count; //!< Accumulated deferred errors
|
||||
uint64_t reserved[5];
|
||||
} amdsmi_error_count_t;
|
||||
|
||||
/**
|
||||
@@ -4662,8 +4663,8 @@ amdsmi_get_gpu_process_info(amdsmi_processor_handle processor_handle, amdsmi_pro
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief Returns the total number of ECC errors (correctable and
|
||||
* uncorrectable) in the given GPU. It is not supported on
|
||||
* @brief Returns the total number of ECC errors (correctable,
|
||||
* uncorrectable and deferred) in the given GPU. It is not supported on
|
||||
* virtual machine guest
|
||||
*
|
||||
* @platform{gpu_bm_linux} @platform{host}
|
||||
|
||||
@@ -1194,8 +1194,10 @@ typedef enum {
|
||||
* @brief This structure holds error counts.
|
||||
*/
|
||||
typedef struct {
|
||||
uint64_t correctable_err; //!< Accumulated correctable errors
|
||||
uint64_t uncorrectable_err; //!< Accumulated uncorrectable errors
|
||||
uint64_t correctable_err; //!< Accumulated correctable errors
|
||||
uint64_t uncorrectable_err; //!< Accumulated uncorrectable errors
|
||||
uint64_t deferred_err; //!< Accumulated deferred errors
|
||||
uint64_t reserved[5];
|
||||
} rsmi_error_count_t;
|
||||
|
||||
/**
|
||||
|
||||
@@ -766,6 +766,20 @@ rsmi_dev_ecc_count_get(uint32_t dv_ind, rsmi_gpu_block_t block,
|
||||
assert(junk == "ce:");
|
||||
fs2 >> ec->correctable_err;
|
||||
|
||||
ec->deferred_err = 0;
|
||||
if (val_vec.size() > 2) {
|
||||
std::istringstream fs3(val_vec[2]);
|
||||
fs3 >> junk;
|
||||
if (junk == "de:") {
|
||||
fs3 >> ec->deferred_err;
|
||||
} else {
|
||||
ss << __PRETTY_FUNCTION__
|
||||
<< "Trying to get the de count, but got " << junk
|
||||
<< " ignore the defer count";
|
||||
LOG_ERROR(ss);
|
||||
}
|
||||
}
|
||||
|
||||
ss << __PRETTY_FUNCTION__ << " | ======= end ======="
|
||||
<< ", reporting " << amd::smi::getRSMIStatusString(ret);;
|
||||
LOG_TRACE(ss);
|
||||
|
||||
@@ -1733,6 +1733,7 @@ amdsmi_get_gpu_total_ecc_count(amdsmi_processor_handle processor_handle, amdsmi_
|
||||
// Increase the total ecc counts
|
||||
ec->correctable_count += block_ec.correctable_count;
|
||||
ec->uncorrectable_count += block_ec.uncorrectable_count;
|
||||
ec->deferred_count += block_ec.deferred_count;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user