next-20250909: selftests/arm64/gcs/basic-gcs.c:390:30: error: use of undeclared identifier 'HWCAP_GCS'

Thomas Weißschuh linux at weissschuh.net
Fri Sep 12 03:57:12 PDT 2025


Sep 12, 2025 12:49:58 Mark Brown <broonie at kernel.org>:

> On Fri, Sep 12, 2025 at 08:30:08AM +0200, Thomas Weißschuh wrote:
>> On 2025-09-12 00:48:47+0530, Naresh Kamboju wrote:
>
>> index c99a6b39ac14..816b497634d6 100644
>> --- a/tools/testing/selftests/arm64/gcs/gcs-util.h
>> +++ b/tools/testing/selftests/arm64/gcs/gcs-util.h
>> @@ -26,6 +26,10 @@ struct user_gcs {
>> };
>> #endif
>>
>> +#ifndef HWCAP_GCS
>> +#define HWCAP_GCS (1UL << 32)
>> +#endif
>> +
>
> We're doing that for glibc using tests because there's some unfortunate
> interaction between including the relevant kernel header and glibc's
> headers (I forget the details) which means that including the kernel
> header directly conflicts with something glibc is doing.  For nolibc I
> would expect us to using the kernel's hwcap definitions?

nolibc doesn't even have its own asm/hwcap.h (or any asm/ header for that matter).
So a kernel header has to be used,
maybe an old one is pulled from somewhere?

(I won't have access to a development machine today anymore)

Thomas



More information about the linux-arm-kernel mailing list