]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/x86/corrupt_xstate_header: Use provided __cpuid_count() macro
authorReinette Chatre <reinette.chatre@intel.com>
Mon, 25 Apr 2022 21:01:14 +0000 (14:01 -0700)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 25 Apr 2022 21:13:03 +0000 (15:13 -0600)
commit941938d69cdebca6c7e70ed4acb02f2d084faddb
tree26e690f352e3a391745d9b4e0a517600ed2799a9
parent25ae62b043fcc7e009f37ddf6d7245fd48c33224
selftests/x86/corrupt_xstate_header: Use provided __cpuid_count() macro

kselftest.h makes the __cpuid_count() macro available
to conveniently call the CPUID instruction.

Remove the local CPUID wrapper and use __cpuid_count()
from kselftest.h instead.

__cpuid_count() from kselftest.h is used instead of the
macro provided by the compiler since gcc v4.4 (via cpuid.h)
because the selftest needs to be supported with gcc v3.2,
the minimal required version for stable kernels.

Cc: Andy Lutomirski <luto@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: x86@kernel.org
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/selftests/x86/corrupt_xstate_header.c