mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 22:26:55 +00:00
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>
This commit is contained in:
parent
e9d14f3f3f
commit
19e99e7d59
1 changed files with 7 additions and 5 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue