public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Mark Brown <broonie@kernel.org>
Cc: Will Deacon <will@kernel.org>, Shuah Khan <shuah@kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kselftest/arm64: Check that SVCR is 0 in signal handlers
Date: Tue, 12 Nov 2024 11:30:14 +0000	[thread overview]
Message-ID: <ZzM8RrD248eSW5bG@arm.com> (raw)
In-Reply-To: <20241106-arm64-fpmr-signal-test-v1-1-31fa34ce58fe@kernel.org>

On Wed, Nov 06, 2024 at 05:07:51PM +0000, Mark Brown wrote:
> diff --git a/tools/testing/selftests/arm64/signal/testcases/ssve_regs.c b/tools/testing/selftests/arm64/signal/testcases/ssve_regs.c
> index 6dbe48cf8b09ed8b7a5ab47690bd87e39e18e1e6..3dee68fa36d1cf2716f54d5f328b3f4077493c3b 100644
> --- a/tools/testing/selftests/arm64/signal/testcases/ssve_regs.c
> +++ b/tools/testing/selftests/arm64/signal/testcases/ssve_regs.c
> @@ -85,6 +85,11 @@ static int do_one_sme_vl(struct tdescr *td, siginfo_t *si, ucontext_t *uc,
>  	fprintf(stderr, "Got expected size %u and VL %d\n",
>  		head->size, ssve->vl);
>  
> +	if (get_svcr() != 0) {
> +		fprintf(stderr, "Unexpected SVCR %llx\n", get_svcr());
> +		return 1;
> +	}
> +
>  	return 0;
>  }
>  
> diff --git a/tools/testing/selftests/arm64/signal/testcases/za_regs.c b/tools/testing/selftests/arm64/signal/testcases/za_regs.c
> index b9e13f27f1f9aaf55db2a5e391f360993561d0b7..9fff4c50030414d06157e0da0c29fd794f707309 100644
> --- a/tools/testing/selftests/arm64/signal/testcases/za_regs.c
> +++ b/tools/testing/selftests/arm64/signal/testcases/za_regs.c
> @@ -91,6 +91,11 @@ static int do_one_sme_vl(struct tdescr *td, siginfo_t *si, ucontext_t *uc,
>  		return 1;
>  	}
>  
> +	if (get_svcr() != 0) {
> +		fprintf(stderr, "Unexpected SVCR %llx\n", get_svcr());
> +		return 1;
> +	}

I think I'll change both printf specifiers to %lx here since in the libc
I have installed, uin64_t is an unsigned long (the kernel defines it as
unsigned long long). Both gcc and clang complain but the compiler
shouldn't matter since the headers come with glibc.

-- 
Catalin

  reply	other threads:[~2024-11-12 11:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-06 17:07 [PATCH] kselftest/arm64: Check that SVCR is 0 in signal handlers Mark Brown
2024-11-12 11:30 ` Catalin Marinas [this message]
2024-11-12 13:25   ` Mark Brown
2024-11-12 16:07 ` Catalin Marinas

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=ZzM8RrD248eSW5bG@arm.com \
    --to=catalin.marinas@arm.com \
    --cc=broonie@kernel.org \
    --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