linux/tools/testing
Reinette Chatre 7ab3376703 selftests: Provide local define of __cpuid_count()
commit a23039c730 upstream.

Some selftests depend on information provided by the CPUID instruction.
To support this dependency the selftests implement private wrappers for
CPUID.

Duplication of the CPUID wrappers should be avoided.

Both gcc and clang/LLVM provide __cpuid_count() macros but neither
the macro nor its header file are available in all the compiler
versions that need to be supported by the selftests. __cpuid_count()
as provided by gcc is available starting with gcc v4.4, so it is
not available if the latest tests need to be run in all the
environments required to support kernels v4.9 and v4.14 that
have the minimal required gcc v3.2.

Duplicate gcc's __cpuid_count() macro to provide a centrally defined
macro for __cpuid_count() to help eliminate the duplicate CPUID wrappers
while continuing to compile in older environments.

Suggested-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Cc: Kyle Huey <me@kylehuey.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-02-06 07:59:01 +01:00
..
fault-injection
ktest ktest.pl minconfig: Unset configs instead of just removing them 2023-01-12 11:58:49 +01:00
kunit kunit: tool: Import missing importlib.abc 2022-02-23 12:03:04 +01:00
nvdimm memremap: remove support for external pgmap refcounts 2022-08-17 14:23:43 +02:00
radix-tree idr test suite: Improve reporting from idr_find_test_1 2021-04-01 07:50:42 -04:00
scatterlist Merge branch 'akpm' (patches from Andrew) 2021-09-03 10:08:28 -07:00
selftests selftests: Provide local define of __cpuid_count() 2023-02-06 07:59:01 +01:00
vsock vsock_diag_test: remove free_sock_stat() call in test_no_sockets 2021-10-15 17:21:34 -07:00