mirror of
https://github.com/torvalds/linux.git
synced 2026-05-29 17:43:52 +02:00
selftests/resctrl: Add CPU vendor detection for Hygon
The resctrl selftest currently fails on Hygon CPUs that support Platform QoS features, printing the error: "# Can not get vendor info..." This occurs because vendor detection is missing for Hygon CPUs. Fix this by extending the CPU vendor detection logic to include Hygon's vendor ID. Link: https://lore.kernel.org/r/20251217030456.3834956-4-shenxiaochen@open-hieco.net Signed-off-by: Xiaochen Shen <shenxiaochen@open-hieco.net> Reviewed-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
This commit is contained in:
parent
4f4f01cc33
commit
367f931e64
|
|
@ -39,6 +39,7 @@
|
|||
*/
|
||||
#define ARCH_INTEL BIT(0)
|
||||
#define ARCH_AMD BIT(1)
|
||||
#define ARCH_HYGON BIT(2)
|
||||
|
||||
#define END_OF_TESTS 1
|
||||
|
||||
|
|
|
|||
|
|
@ -50,6 +50,8 @@ static unsigned int detect_vendor(void)
|
|||
vendor_id = ARCH_INTEL;
|
||||
else if (s && !strcmp(s, ": AuthenticAMD\n"))
|
||||
vendor_id = ARCH_AMD;
|
||||
else if (s && !strcmp(s, ": HygonGenuine\n"))
|
||||
vendor_id = ARCH_HYGON;
|
||||
|
||||
fclose(inf);
|
||||
free(res);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user