All of lore.kernel.org
 help / color / mirror / Atom feed
From: Will Deacon <will@kernel.org>
To: Mark Brown <broonie@kernel.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] arm64/signal: Clean up SVE/SME feature checking inconsistency
Date: Thu, 23 Jun 2022 18:47:38 +0100	[thread overview]
Message-ID: <20220623174737.GA17439@willie-the-truck> (raw)
In-Reply-To: <20220613210133.1327091-1-broonie@kernel.org>

On Mon, Jun 13, 2022 at 10:01:33PM +0100, Mark Brown wrote:
> Currently when restoring signal state we check to see if SVE is supported
> in restore_sigframe() but check to see if SVE is supported inside
> restore_sve_fpsimd_context(). This makes no real difference since SVE is
> always supported in systems with SME but looks a bit untidy and makes
> things slightly harder to follow, move the SVE check next to the SME one
> in restore_sve_fpsimd_context().
> 
> Signed-off-by: Mark Brown <broonie@kernel.org>
> ---
>  arch/arm64/kernel/signal.c | 11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm64/kernel/signal.c b/arch/arm64/kernel/signal.c
> index 23dd4c3bcfed..0d5a9eb43085 100644
> --- a/arch/arm64/kernel/signal.c
> +++ b/arch/arm64/kernel/signal.c
> @@ -281,6 +281,9 @@ static int restore_sve_fpsimd_context(struct user_ctxs *user)
>  
>  		vl = task_get_sme_vl(current);
>  	} else {
> +		if (!system_supports_sve())
> +			return -EINVAL;
> +
>  		vl = task_get_sve_vl(current);
>  	}
>  
> @@ -652,14 +655,10 @@ static int restore_sigframe(struct pt_regs *regs,
>  		if (!user.fpsimd)
>  			return -EINVAL;
>  
> -		if (user.sve) {
> -			if (!system_supports_sve())
> -				return -EINVAL;
> -
> +		if (user.sve)
>  			err = restore_sve_fpsimd_context(&user);

This breaks the allnoconfig build for me:

ld.lld: error: undefined symbol: restore_sve_fpsimd_context
>>> referenced by signal.c
>>>               kernel/signal.o:(__arm64_sys_rt_sigreturn) in archive arch/arm64/built-in.a
make: *** [Makefile:1164: vmlinux] Error 1

Will

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-06-23 17:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-13 21:01 [PATCH] arm64/signal: Clean up SVE/SME feature checking inconsistency Mark Brown
2022-06-23 17:47 ` Will Deacon [this message]
2022-06-24 13:28   ` Mark Brown
2022-06-24 14:10     ` Will Deacon
2022-06-24 14:19       ` Mark Brown

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=20220623174737.GA17439@willie-the-truck \
    --to=will@kernel.org \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.