diff options
author | Dongxu Sun <sundongxu3@huawei.com> | 2023-03-17 20:49:13 +0800 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2023-04-12 09:41:48 +0100 |
commit | 19e99e7d59bc421373e82af818197576b1a3940f (patch) | |
tree | d8d936e0e74f758bd5553c830336628815f9974a /arch/arm64/kernel | |
parent | e9d14f3f3fb76c1e89f1648c0a2bc890de58bf11 (diff) | |
download | linux-stable-19e99e7d59bc421373e82af818197576b1a3940f.tar.gz linux-stable-19e99e7d59bc421373e82af818197576b1a3940f.tar.bz2 linux-stable-19e99e7d59bc421373e82af818197576b1a3940f.zip |
arm64/signal: Alloc tpidr2 sigframe after checking system_supports_tpidr2()
Move tpidr2 sigframe allocation from under the checking of
system_supports_sme() to the checking of system_supports_tpidr2().
Signed-off-by: Dongxu Sun <sundongxu3@huawei.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230317124915.1263-3-sundongxu3@huawei.com
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'arch/arm64/kernel')
-rw-r--r-- | arch/arm64/kernel/signal.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/arm64/kernel/signal.c b/arch/arm64/kernel/signal.c index 032e97f8cae0..2cfc810d0a5b 100644 --- a/arch/arm64/kernel/signal.c +++ b/arch/arm64/kernel/signal.c @@ -893,6 +893,13 @@ static int setup_sigframe_layout(struct rt_sigframe_user_layout *user, return err; } + if (system_supports_tpidr2()) { + err = sigframe_alloc(user, &user->tpidr2_offset, + sizeof(struct tpidr2_context)); + if (err) + return err; + } + if (system_supports_sme()) { unsigned int vl; unsigned int vq = 0; @@ -902,11 +909,6 @@ static int setup_sigframe_layout(struct rt_sigframe_user_layout *user, else vl = task_get_sme_vl(current); - err = sigframe_alloc(user, &user->tpidr2_offset, - sizeof(struct tpidr2_context)); - if (err) - return err; - if (thread_za_enabled(¤t->thread)) vq = sve_vq_from_vl(vl); |