Previously, the function was iterating through all enum
values(0-250). This fix reduces the number of hwmon operations
by calling add_temp_sensor_entry only for temperature types
that fall within the defined enum ranges.
Signed-off-by: Bindhiya Kanangot Balakrishnan <Bindhiya.KanangotBalakrishnan@amd.com>
Added bad_page_threshold_exceeded field to ras, which
compares retired pages count against bad page threshold.
This field displays True if retired pages exceed the
threshold, False if within threshold, or N/A if
threshold data is unavailable.
---------
Signed-off-by: Bindhiya Kanangot Balakrishnan <Bindhiya.KanangotBalakrishnan@amd.com>
Signed-off-by: Arif, Maisam <Maisam.Arif@amd.com>
Co-authored-by: Arif, Maisam <Maisam.Arif@amd.com>
Decrement padding to keep struct size the same
Change-Id: I4bea5d4b4d5c908423c7cc55a7e8c404b4a6b5e8
Signed-off-by: Galantsev, Dmitrii <dmitrii.galantsev@amd.com>
amdsmi/tests/amd_smi_test/functional/memorypartition_read_write.cc:453:32: warning: the address of ‘orig_memory_partition’ will never be NULL [-Waddress]
453 | if ((orig_memory_partition == nullptr) ||
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
When running on a system that doesn't support HSMP (such as an APU)
then the following is observed:
```
/usr/include/c++/15.1.1/bits/stl_vector.h:1263: std::vector<_Tp, _Alloc>::reference std::vector<_Tp, _Alloc>::operator[](size_type) [with _Tp = void*; _Alloc = std::allocator<void*>; reference = void*&; size_type = long unsigned int]: Assertion '__n < this->size()' failed.
```
This is because no "CPU" are detected on the SOC, which really means
no CPUs that support HSMP. Catch this case so that a clean return
can be passed up.
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
- Regenerate Rust wrapper against latest amdsmi.h header
- Add libc dependency for proper C memory management
- Fix compilation errors caused by types removed from amdsmi.h
- Add FFI bindings regeneration documentation in README
This update ensures the Rust bindings are synchronized with the latest
C API and provides guidance for developers on regenerating
Bindings.
Signed-off-by: Tim Huang <tim.huang@amd.com>
- **Fixed gpuboard and baseboard temperatures enums in amdsmi Python Library**.
- AmdSmiTemperatureType had issues with referencing the right attribute, so we removed the following duplicate enums:
- `AmdSmiTemperatureType.GPUBOARD_NODE_FIRST`
- `AmdSmiTemperatureType.GPUBOARD_VR_FIRST`
- `AmdSmiTemperatureType.BASEBOARD_FIRST`
Change-Id: Ia61446b593bd9182d597c4b4c2ac3c5ffdae7493
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
* Cmake fix updates
* Next fix will be addressing libdrm further
---------
Signed-off-by: adapryor <Adam.pryor@amd.com>
Signed-off-by: Justin Williams <juwillia@amd.com>
* Added gpu-board and base-board temperatures to amd-smi metric
* Updated Changelog and adjusted the metric base-board/gpu-board output
* Adjusted output of metric to hide base/gpu-board when not relevant
---------
Signed-off-by: gabrpham_amdeng <Gabriel.Pham@amd.com>
* Remove vm checks in rocm-smi
* Move virtualization checks up the stack into amd-smi
---------
Signed-off-by: adapryor <Adam.pryor@amd.com>
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Co-authored-by: Maisam Arif <Maisam.Arif@amd.com>
* Filter out amd-smi from process detection
* Fixed N/A stripping N/ incorrectly from running elevated processes
Signed-off-by: adapryor <Adam.pryor@amd.com>
* Update amd-smi doc with examples of CPER and AFID API usage.
---------
Signed-off-by: Oosman Saeed <oossaeed@amd.com>
Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Changes:
- Fixes amd-smi monitor such as:
amd-smi monitor -Vqt, amd-smi monitor -g 0 -Vqt -w 1
amd-smi monitor -Vqt --file /tmp/test1, ...
- Required moving around when process is called, since xcp
information is gathered in right format expected by monitor
- Requires process to be appended first with the gpu data -> xcp
info to be gathered + added after 1st device
Change-Id: I76356a4610944f633a9530970fac66556d65bf11
Signed-off-by: Charis Poag <Charis.Poag@amd.com>
Impacts only Guest systems
Fixes following error:
$ amd-smi monitor
AttributeError: 'Namespace' object has no attribute 'violation'
Change-Id: If501819be3f8e2d2dfd75775dc776873a92465a3
Signed-off-by: Charis Poag <Charis.Poag@amd.com>