[LTP] [PATCH v14] high_freq_hwp_cap_cppc.c: new test
Cyril Hrubis
chrubis@suse.cz
Tue Jun 9 16:35:17 CEST 2026
Hi!
> +static void setup(void)
> +{
> + unsigned int eax, ebx, ecx, edx;
> +
> + __cpuid_count(0, 0, eax, ebx, ecx, edx);
> + if (ebx != CPUID_VENDOR_EBX || edx != CPUID_VENDOR_EDX ||
> + ecx != CPUID_VENDOR_ECX)
> + tst_brk(TCONF, "not a GenuineIntel CPU");
I've send a patch for the tst_test structure that adds .needs_cpu_vendor
field. If that gets merged you can just set it to "GenuineIntel" and the
test should be automatically skipped on anything but Intel CPUs.
> + __cpuid_count(CPUID_LEAF_THERMAL, 0, eax, ebx, ecx, edx);
> + if (!(eax & CPUID_HWP_BIT))
> + tst_brk(TCONF, "HWP not supported (MSR 0x771 unavailable)");
This specific check still needs to be ifdefed around with x86 and x86_64
macros.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list