From: Catalin Marinas <catalin.marinas@arm.com>
To: Mark Brown <broonie@kernel.org>
Cc: Will Deacon <will@kernel.org>,
linux-arm-kernel@lists.infradead.org,
kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] arm64/sme: Fix EFI save/restore
Date: Thu, 2 Jun 2022 13:17:38 +0100 [thread overview]
Message-ID: <YpiqYlKmcvRo7diV@arm.com> (raw)
In-Reply-To: <20220602094544.3303367-1-broonie@kernel.org>
On Thu, Jun 02, 2022 at 11:45:44AM +0200, Mark Brown wrote:
> diff --git a/arch/arm64/kernel/fpsimd.c b/arch/arm64/kernel/fpsimd.c
> index 819979398127..3c66a061ff6f 100644
> --- a/arch/arm64/kernel/fpsimd.c
> +++ b/arch/arm64/kernel/fpsimd.c
> @@ -1916,10 +1916,11 @@ void __efi_fpsimd_begin(void)
> if (system_supports_sme()) {
> svcr = read_sysreg_s(SYS_SVCR);
>
> - if (!system_supports_fa64())
> - ffr = svcr & SVCR_SM_MASK;
> + __this_cpu_write(efi_sm_state,
> + svcr & SVCR_SM_MASK);
>
> - __this_cpu_write(efi_sm_state, ffr);
> + if (!system_supports_fa64())
> + ffr = !(svcr & SVCR_SM_MASK);
> }
>
> sve_save_state(sve_state + sve_ffr_offset(sve_max_vl()),
> @@ -1965,7 +1966,7 @@ void __efi_fpsimd_end(void)
> 0,
> SVCR_SM_MASK);
> if (!system_supports_fa64())
> - ffr = efi_sm_state;
> + ffr = false;
> }
> }
This looks fine to me:
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Please add some comments to the code for when we need to save/restore
the FFR state and let me know when you got a chance to test it so that I
can send it upstream.
Thanks.
--
Catalin
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2022-06-02 12:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-02 9:45 [PATCH] arm64/sme: Fix EFI save/restore Mark Brown
2022-06-02 12:17 ` Catalin Marinas [this message]
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=YpiqYlKmcvRo7diV@arm.com \
--to=catalin.marinas@arm.com \
--cc=broonie@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=lkp@intel.com \
--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 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.