add counter support for RAS.

- added dual handle support for RAS Correctable and Uncorrectable Errors.
- added reset counter for RAS.
- added Os Specific ULT for RAS

Change-Id: Ia10115bf6720ab211f549571e810ec0d6c0801ec
This commit is contained in:
Vilvaraj, T J Vivek
2020-06-15 16:33:11 +05:30
committed by sys_ocldev
parent fa3cb35fde
commit 0c9c55cd17
16 changed files with 423 additions and 31 deletions

View File

@@ -209,7 +209,7 @@ std::string FsAccess::getDirName(const std::string path) {
return path.substr(0, pos);
}
ze_bool_t FsAccess::fileExists(const std::string file) {
bool FsAccess::fileExists(const std::string file) {
struct stat sb;
if (stat(file.c_str(), &sb) == 0) {
return true;
@@ -463,7 +463,7 @@ ze_result_t SysfsAccess::unbindDevice(std::string device) {
return FsAccess::write(intelGpuUnbindEntry, device);
}
ze_bool_t SysfsAccess::fileExists(const std::string file) {
bool SysfsAccess::fileExists(const std::string file) {
// Prepend sysfs directory path and call the base fileExists
return FsAccess::fileExists(fullPath(file).c_str());
}

View File

@@ -32,7 +32,7 @@ class FsAccess {
ze_result_t canWrite(const std::string file);
ze_result_t getFileMode(const std::string file, ::mode_t &mode);
ze_result_t read(const std::string file, uint64_t &val);
virtual ze_result_t read(const std::string file, uint64_t &val);
ze_result_t read(const std::string file, std::string &val);
ze_result_t read(const std::string file, std::vector<std::string> &val);
@@ -43,7 +43,7 @@ class FsAccess {
ze_result_t listDirectory(const std::string path, std::vector<std::string> &list);
std::string getBaseName(const std::string path);
std::string getDirName(const std::string path);
ze_bool_t fileExists(const std::string file);
virtual bool fileExists(const std::string file);
protected:
FsAccess();
@@ -81,7 +81,7 @@ class SysfsAccess : private FsAccess {
MOCKABLE_VIRTUAL ze_result_t read(const std::string file, std::string &val);
MOCKABLE_VIRTUAL ze_result_t read(const std::string file, int &val);
MOCKABLE_VIRTUAL ze_result_t read(const std::string file, uint64_t &val);
ze_result_t read(const std::string file, uint64_t &val) override;
MOCKABLE_VIRTUAL ze_result_t read(const std::string file, double &val);
MOCKABLE_VIRTUAL ze_result_t read(const std::string file, std::vector<std::string> &val);
@@ -96,7 +96,7 @@ class SysfsAccess : private FsAccess {
ze_result_t getRealPath(const std::string path, std::string &buf);
ze_result_t bindDevice(const std::string device);
ze_result_t unbindDevice(const std::string device);
ze_bool_t fileExists(const std::string file);
bool fileExists(const std::string file) override;
ze_bool_t isMyDeviceFile(const std::string dev);
private: