Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tool build: Remove __get_cpuid feature test

This feature test is no longer used so remove.

The function tested by the feature test is used in:
tools/power/x86/x86_energy_perf_policy/x86_energy_perf_policy.c
however, the Makefile just assumes the presence of the function and
doesn't perform a build feature test for it.

Signed-off-by: Ian Rogers <irogers@google.com>
Reviewed-by: James Clark <james.clark@linaro.org>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>

authored by

Ian Rogers and committed by
Namhyung Kim
c819bfdc 2566bbfc

-19
-2
tools/build/Makefile.feature
··· 90 90 timerfd \ 91 91 zlib \ 92 92 lzma \ 93 - get_cpuid \ 94 93 bpf \ 95 94 scandirat \ 96 95 sched_getcpu \ ··· 145 146 llvm-perf \ 146 147 zlib \ 147 148 lzma \ 148 - get_cpuid \ 149 149 bpf \ 150 150 libaio \ 151 151 libzstd
-4
tools/build/feature/Makefile
··· 56 56 test-lzma.bin \ 57 57 test-bpf.bin \ 58 58 test-libbpf.bin \ 59 - test-get_cpuid.bin \ 60 59 test-sdt.bin \ 61 60 test-cxx.bin \ 62 61 test-gettid.bin \ ··· 316 317 317 318 $(OUTPUT)test-lzma.bin: 318 319 $(BUILD) -llzma 319 - 320 - $(OUTPUT)test-get_cpuid.bin: 321 - $(BUILD) 322 320 323 321 $(OUTPUT)test-bpf.bin: 324 322 $(BUILD)
-5
tools/build/feature/test-all.c
··· 114 114 # include "test-lzma.c" 115 115 #undef main 116 116 117 - #define main main_test_get_cpuid 118 - # include "test-get_cpuid.c" 119 - #undef main 120 - 121 117 #define main main_test_bpf 122 118 # include "test-bpf.c" 123 119 #undef main ··· 164 168 main_test_pthread_attr_setaffinity_np(); 165 169 main_test_pthread_barrier(); 166 170 main_test_lzma(); 167 - main_test_get_cpuid(); 168 171 main_test_bpf(); 169 172 main_test_scandirat(); 170 173 main_test_sched_getcpu();
-8
tools/build/feature/test-get_cpuid.c
··· 1 - // SPDX-License-Identifier: GPL-2.0 2 - #include <cpuid.h> 3 - 4 - int main(void) 5 - { 6 - unsigned int eax = 0, ebx = 0, ecx = 0, edx = 0; 7 - return __get_cpuid(0x15, &eax, &ebx, &ecx, &edx); 8 - }