diff --git a/level_zero/tools/source/sysman/linux/pmt/pmt.cpp b/level_zero/tools/source/sysman/linux/pmt/pmt.cpp index 2e8c331a19..d2226f042d 100644 --- a/level_zero/tools/source/sysman/linux/pmt/pmt.cpp +++ b/level_zero/tools/source/sysman/linux/pmt/pmt.cpp @@ -16,8 +16,7 @@ #include namespace L0 { -const std::string PlatformMonitoringTech::devfs("/dev/"); -const std::string PlatformMonitoringTech::baseTelemSysFS("/sys/class/pmt_telemetry"); +const std::string PlatformMonitoringTech::baseTelemSysFS("/sys/class/intel_pmt"); const std::string PlatformMonitoringTech::telem("telem"); uint32_t PlatformMonitoringTech::rootDeviceTelemNodeIndex = 0; @@ -35,7 +34,7 @@ ze_result_t PlatformMonitoringTech::enumerateRootTelemIndex(FsAccess *pFsAccess, } // Exmaple: For below directory - // # /sys/class/pmt_telemetry$ ls + // # /sys/class/intel_pmt$ ls // telem1 telem2 telem3 // Then listOfTelemNodes would contain telem1, telem2, telem3 std::sort(listOfTelemNodes.begin(), listOfTelemNodes.end()); // sort listOfTelemNodes, to arange telem nodes in ascending order @@ -49,7 +48,7 @@ ze_result_t PlatformMonitoringTech::enumerateRootTelemIndex(FsAccess *pFsAccess, if (realPathOfTelemNode.compare(0, rootPciPathOfGpuDevice.size(), rootPciPathOfGpuDevice) == 0) { // Example: If // rootPciPathOfGpuDevice = "/sys/devices/pci0000:89/0000:89:02.0/0000:8a:00.0"; - // realPathOfTelemNode = "/sys/devices/pci0000:89/0000:89:02.0/0000:8a:00.0/0000:8b:02.0/0000:8e:00.1/pmt_telemetry/telem1"; + // realPathOfTelemNode = "/sys/devices/pci0000:89/0000:89:02.0/0000:8a:00.0/0000:8b:02.0/0000:8e:00.1/pmt_telemetry.1.auto/intel_pmt/telem1"; // Thus As realPathOfTelemNode consists of rootPciPathOfGpuDevice, hence both telemNode and GPU device share same PCI Root. auto indexString = telemNode.substr(telem.size(), telemNode.size()); rootDeviceTelemNodeIndex = stoi(indexString); // if telemNode is telemN, then rootDeviceTelemNodeIndex = N @@ -80,7 +79,7 @@ void PlatformMonitoringTech::init(FsAccess *pFsAccess) { telemNode = telem + std::to_string(telemNodeIndex); } std::string baseTelemSysFSNode = baseTelemSysFS + "/" + telemNode; - std::string telemetryDeviceEntry = devfs + telemNode; + std::string telemetryDeviceEntry = baseTelemSysFSNode + "/" + telem; if (!pFsAccess->fileExists(telemetryDeviceEntry)) { NEO::printDebugString(NEO::DebugManager.flags.PrintDebugMessages.get(), stderr, "Telemetry support not available. No file %s\n", telemetryDeviceEntry.c_str()); diff --git a/level_zero/tools/source/sysman/linux/pmt/pmt.h b/level_zero/tools/source/sysman/linux/pmt/pmt.h index 6c3fe8778c..559b5a71df 100644 --- a/level_zero/tools/source/sysman/linux/pmt/pmt.h +++ b/level_zero/tools/source/sysman/linux/pmt/pmt.h @@ -35,7 +35,6 @@ class PlatformMonitoringTech : NEO::NonCopyableOrMovableClass { private: void init(FsAccess *pFsAccess); - static const std::string devfs; static const std::string baseTelemSysFS; static const std::string telem; uint64_t size = 0; diff --git a/level_zero/tools/test/unit_tests/sources/sysman/power/linux/mock_sysfs_power.h b/level_zero/tools/test/unit_tests/sources/sysman/power/linux/mock_sysfs_power.h index dd9752221a..b77dd81d22 100644 --- a/level_zero/tools/test/unit_tests/sources/sysman/power/linux/mock_sysfs_power.h +++ b/level_zero/tools/test/unit_tests/sources/sysman/power/linux/mock_sysfs_power.h @@ -21,7 +21,7 @@ constexpr uint64_t setEnergyCounter = 83456; constexpr uint64_t offset = 0x400; constexpr uint64_t mappedLength = 2048; const std::string deviceName("device"); -const std::string baseTelemSysFS("/sys/class/pmt_telemetry"); +const std::string baseTelemSysFS("/sys/class/intel_pmt"); class PowerPmt : public PlatformMonitoringTech { public: @@ -76,16 +76,16 @@ struct Mock : public PowerFsAccess { } ze_result_t getRealPathSuccess(const std::string path, std::string &buf) { - if (path.compare("/sys/class/pmt_telemetry/telem1") == 0) { - buf = "/sys/devices/pci0000:89/0000:89:02.0/0000:86:00.0/0000:8b:02.0/0000:8e:00.1/pmt_telemetry/telem1"; - } else if (path.compare("/sys/class/pmt_telemetry/telem2") == 0) { - buf = "/sys/devices/pci0000:89/0000:89:02.0/0000:86:00.0/0000:8b:02.0/0000:8e:00.1/pmt_telemetry/telem2"; - } else if (path.compare("/sys/class/pmt_telemetry/telem3") == 0) { - buf = "/sys/devices/pci0000:89/0000:89:02.0/0000:8a:00.0/0000:8b:02.0/0000:8e:00.1/pmt_telemetry/telem3"; - } else if (path.compare("/sys/class/pmt_telemetry/telem4") == 0) { - buf = "/sys/devices/pci0000:89/0000:89:02.0/0000:8a:00.0/0000:8b:02.0/0000:8e:00.1/pmt_telemetry/telem4"; - } else if (path.compare("/sys/class/pmt_telemetry/telem5") == 0) { - buf = "/sys/devices/pci0000:89/0000:89:02.0/0000:8a:00.0/0000:8b:02.0/0000:8e:00.1/pmt_telemetry/telem5"; + if (path.compare("/sys/class/intel_pmt/telem1") == 0) { + buf = "/sys/devices/pci0000:89/0000:89:02.0/0000:86:00.0/0000:8b:02.0/0000:8e:00.1/pmt_telemetry.1.auto/intel_pmt/telem1"; + } else if (path.compare("/sys/class/intel_pmt/telem2") == 0) { + buf = "/sys/devices/pci0000:89/0000:89:02.0/0000:86:00.0/0000:8b:02.0/0000:8e:00.1/pmt_telemetry.1.auto/intel_pmt/telem2"; + } else if (path.compare("/sys/class/intel_pmt/telem3") == 0) { + buf = "/sys/devices/pci0000:89/0000:89:02.0/0000:8a:00.0/0000:8b:02.0/0000:8e:00.1/pmt_telemetry.1.auto/intel_pmt/telem3"; + } else if (path.compare("/sys/class/intel_pmt/telem4") == 0) { + buf = "/sys/devices/pci0000:89/0000:89:02.0/0000:8a:00.0/0000:8b:02.0/0000:8e:00.1/pmt_telemetry.1.auto/intel_pmt/telem4"; + } else if (path.compare("/sys/class/intel_pmt/telem5") == 0) { + buf = "/sys/devices/pci0000:89/0000:89:02.0/0000:8a:00.0/0000:8b:02.0/0000:8e:00.1/pmt_telemetry.1.auto/intel_pmt/telem5"; } else { return ZE_RESULT_ERROR_NOT_AVAILABLE; } diff --git a/level_zero/tools/test/unit_tests/sources/sysman/temperature/linux/mock_sysfs_temperature.h b/level_zero/tools/test/unit_tests/sources/sysman/temperature/linux/mock_sysfs_temperature.h index 7323a8b95c..a3af35c39d 100644 --- a/level_zero/tools/test/unit_tests/sources/sysman/temperature/linux/mock_sysfs_temperature.h +++ b/level_zero/tools/test/unit_tests/sources/sysman/temperature/linux/mock_sysfs_temperature.h @@ -29,7 +29,7 @@ constexpr uint8_t computeIndexForNoSubDevices = 9; constexpr uint8_t globalIndexForNoSubDevices = 3; constexpr uint64_t mappedLength = 256; -const std::string baseTelemSysFS("/sys/class/pmt_telemetry"); +const std::string baseTelemSysFS("/sys/class/intel_pmt"); class TemperaturePmt : public PlatformMonitoringTech { public: TemperaturePmt(FsAccess *pFsAccess, ze_bool_t onSubdevice, uint32_t subdeviceId) : PlatformMonitoringTech(pFsAccess, onSubdevice, subdeviceId) {} @@ -92,16 +92,16 @@ struct Mock : public TemperatureFsAccess { return ZE_RESULT_ERROR_NOT_AVAILABLE; } ze_result_t getRealPathSuccess(const std::string path, std::string &buf) { - if (path.compare("/sys/class/pmt_telemetry/telem1") == 0) { - buf = "/sys/devices/pci0000:89/0000:89:02.0/0000:86:00.0/0000:8b:02.0/0000:8e:00.1/pmt_telemetry/telem1"; - } else if (path.compare("/sys/class/pmt_telemetry/telem2") == 0) { - buf = "/sys/devices/pci0000:89/0000:89:02.0/0000:86:00.0/0000:8b:02.0/0000:8e:00.1/pmt_telemetry/telem2"; - } else if (path.compare("/sys/class/pmt_telemetry/telem3") == 0) { - buf = "/sys/devices/pci0000:89/0000:89:02.0/0000:8a:00.0/0000:8b:02.0/0000:8e:00.1/pmt_telemetry/telem3"; - } else if (path.compare("/sys/class/pmt_telemetry/telem4") == 0) { - buf = "/sys/devices/pci0000:89/0000:89:02.0/0000:8a:00.0/0000:8b:02.0/0000:8e:00.1/pmt_telemetry/telem4"; - } else if (path.compare("/sys/class/pmt_telemetry/telem5") == 0) { - buf = "/sys/devices/pci0000:89/0000:89:02.0/0000:8a:00.0/0000:8b:02.0/0000:8e:00.1/pmt_telemetry/telem5"; + if (path.compare("/sys/class/intel_pmt/telem1") == 0) { + buf = "/sys/devices/pci0000:89/0000:89:02.0/0000:86:00.0/0000:8b:02.0/0000:8e:00.1/pmt_telemetry.1.auto/intel_pmt/telem1"; + } else if (path.compare("/sys/class/intel_pmt/telem2") == 0) { + buf = "/sys/devices/pci0000:89/0000:89:02.0/0000:86:00.0/0000:8b:02.0/0000:8e:00.1/pmt_telemetry.1.auto/intel_pmt/telem2"; + } else if (path.compare("/sys/class/intel_pmt/telem3") == 0) { + buf = "/sys/devices/pci0000:89/0000:89:02.0/0000:8a:00.0/0000:8b:02.0/0000:8e:00.1/pmt_telemetry.1.auto/intel_pmt/telem3"; + } else if (path.compare("/sys/class/intel_pmt/telem4") == 0) { + buf = "/sys/devices/pci0000:89/0000:89:02.0/0000:8a:00.0/0000:8b:02.0/0000:8e:00.1/pmt_telemetry.1.auto/intel_pmt/telem4"; + } else if (path.compare("/sys/class/intel_pmt/telem5") == 0) { + buf = "/sys/devices/pci0000:89/0000:89:02.0/0000:8a:00.0/0000:8b:02.0/0000:8e:00.1/pmt_telemetry.1.auto/intel_pmt/telem5"; } else { return ZE_RESULT_ERROR_NOT_AVAILABLE; }