Hi Jarkko,
On 12/11/2021 12:15 AM, Jarkko Sakkinen wrote:
On Tue, 2021-12-07 at 11:40 -0800, Reinette Chatre wrote:
Commit f0ff2447b861 ("selftests/sgx: Add a new kselftest:
Unclobbered_vdso_oversubscribed") depends on __cpuid() without
providing the dependency and thus introduces a build error:
$ make
gcc -Wall -Werror -g -I../../../../tools/include -fPIC -z noexecstack -c main.c -o /path/linux/tools/testing/selftests/sgx/main.o
main.c: In function ‘get_total_epc_mem’:
main.c:296:3: error: implicit declaration of function ‘__cpuid’ [-Werror=implicit-function-declaration]
296 | __cpuid(&eax, &ebx, &ecx, &edx);
| ^~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:33: /path/linux/tools/testing/selftests/sgx/main.o] Error 1
$
Make the kernel's __cpuid() available locally in support of the
test's usage.
It's too abstract, rather
"Clone kernel's __cpuid() implementation to the self-test in order
to make it available for the EPC enumeration code."
Will do. Thank you.
Fixes: f0ff2447b861 ("selftests/sgx: Add a new kselftest: Unclobbered_vdso_oversubscribed")
Reported-by: Jarkko Sakkinen <jarkko@xxxxxxxxxx>
Signed-off-by: Reinette Chatre <reinette.chatre@xxxxxxxxx>
The code change is acceptable.
Thank you.
Reinette