amd / esmi_ib_library

E-SMI: EPYC™ System management Interface In-band Library
Other
25 stars 8 forks source link

[ISSUE] error: ‘HSMP_GET_METRIC_TABLE_VER’ undeclared #9

Open jdziat opened 10 months ago

jdziat commented 10 months ago

I'm getting the below error when trying to build the library:

error: ‘HSMP_GET_METRIC_TABLE_VER’ undeclared (first use in this function); did you mean ‘HSMP_METRICTABLE_PATH’?
 1598 |         msg.msg_id      = HSMP_GET_METRIC_TABLE_VER;

I've compiled and loaded the amd_hsmp and amd_energy modules as well

modinfo: amd_hsmp

filename:       /lib/modules/6.5.11-4-pve/updates/amd_hsmp.ko
version:        1.0
description:    AMD Host System Management Port driver
license:        GPL v2
srcversion:     2775DF333C61F63ABFB5F6D
depends:        
retpoline:      Y
name:           amd_hsmp
vermagic:       6.5.11-4-pve SMP preempt mod_unload modversions 
parm:           raw_intf:Enable raw HSMP interface (int)
parm:           f17h_support:Support AMD Family 17h (int)

modinfo: amd_energy

filename:       /lib/modules/6.5.11-4-pve/updates/amd_energy.ko
license:        GPL
author:         Naveen Krishna Chatradhi <nchatrad@amd.com>
description:    Driver for AMD Energy reporting from RAPL MSR via HWMON interface
version:        1.0
srcversion:     43DD6EF96371E1A21AA0644
depends:        
retpoline:      Y
name:           amd_energy
vermagic:       6.5.11-4-pve SMP preempt mod_unload modversions 
sumachidanand commented 8 months ago

Hi,

Esmi library needs amd_hsmp.h header file. This header file can be taken from https://github.com/amd/amd_hsmp/ or from https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/x86/include/uapi/asm/amd_hsmp.h?h=v6.8-rc3.

If the header file is old and the esmi library is new, this kind of errors will be seen. Please copy https://github.com/amd/amd_hsmp/blob/master/amd_hsmp.h to /usr/include/asm/ or /usr/include/x86_64-linux-gnu/asm/ path in your system and then compile the esmi library,

Also clone the latest amd_hsmp/ module, compile and insert this module to get the new features(from modinfo above, version is 1.0, latest version is 2.0).