mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Anshuman Khandual <anshuman.khandual@arm.com>
To: Mark Brown <broonie@kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>, Shuah Khan <shuah@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kselftest/arm4: Provide local defines for AT_HWCAP3
Date: Wed, 16 Jul 2025 08:04:54 +0530	[thread overview]
Message-ID: <a717d6ee-3b24-47de-a1fc-90a4ad0a020d@arm.com> (raw)
In-Reply-To: <20250715-arm64-selftest-bodge-hwcap3-v1-1-541b54bc43bb@kernel.org>



On 16/07/25 2:41 AM, Mark Brown wrote:
> Some build environments for the selftests are not picking up the newly
> added AT_HWCAP3 when using the libc headers, even with headers_install
> (which we require already for the arm64 selftests).  As a quick fix add
> local definitions of the constant to tools use it, while auxvec.h is
> installed with some toolchains it needs some persuasion to get picked up.
> 
> Signed-off-by: Mark Brown <broonie@kernel.org>
> ---
>  tools/testing/selftests/arm64/abi/hwcap.c       | 4 ++++
>  tools/testing/selftests/arm64/mte/check_prctl.c | 4 ++++
>  2 files changed, 8 insertions(+)
> 
> diff --git a/tools/testing/selftests/arm64/abi/hwcap.c b/tools/testing/selftests/arm64/abi/hwcap.c
> index 35f521e5f41c..aa902408facd 100644
> --- a/tools/testing/selftests/arm64/abi/hwcap.c
> +++ b/tools/testing/selftests/arm64/abi/hwcap.c
> @@ -21,6 +21,10 @@
>  
>  #define TESTS_PER_HWCAP 3
>  
> +#ifndef AT_HWCAP3
> +#define AT_HWCAP3 29

Just wondering - would it be better to add a comment that this is a
temporary construct till libc headers pick up AT_HWCAP3 definitions.


> +#endif
> +
>  /*
>   * Function expected to generate exception when the feature is not
>   * supported and return when it is supported. If the specific exception
> diff --git a/tools/testing/selftests/arm64/mte/check_prctl.c b/tools/testing/selftests/arm64/mte/check_prctl.c
> index 4c89e9538ca0..c36c4c49ff95 100644
> --- a/tools/testing/selftests/arm64/mte/check_prctl.c
> +++ b/tools/testing/selftests/arm64/mte/check_prctl.c
> @@ -12,6 +12,10 @@
>  
>  #include "kselftest.h"
>  
> +#ifndef AT_HWCAP3
> +#define AT_HWCAP3 29
> +#endif
> +
>  static int set_tagged_addr_ctrl(int val)
>  {
>  	int ret;
> 
> ---
> base-commit: 86731a2a651e58953fc949573895f2fa6d456841
> change-id: 20250710-arm64-selftest-bodge-hwcap3-b6ab30ab69cd
> 
> Best regards,
> --  
> Mark Brown <broonie@kernel.org>
> 
> 


  reply	other threads:[~2025-07-16  2:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-15 21:11 Mark Brown
2025-07-16  2:34 ` Anshuman Khandual [this message]
2025-07-16 10:37   ` Mark Brown
2025-07-17 10:46 ` Will Deacon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a717d6ee-3b24-47de-a1fc-90a4ad0a020d@arm.com \
    --to=anshuman.khandual@arm.com \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=shuah@kernel.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®