Skip to content

Commit 19e99e7

Browse files
Dongxu Sunwilldeacon
authored andcommitted
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 <[email protected]> Reviewed-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent e9d14f3 commit 19e99e7

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

arch/arm64/kernel/signal.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -893,6 +893,13 @@ static int setup_sigframe_layout(struct rt_sigframe_user_layout *user,
893893
return err;
894894
}
895895

896+
if (system_supports_tpidr2()) {
897+
err = sigframe_alloc(user, &user->tpidr2_offset,
898+
sizeof(struct tpidr2_context));
899+
if (err)
900+
return err;
901+
}
902+
896903
if (system_supports_sme()) {
897904
unsigned int vl;
898905
unsigned int vq = 0;
@@ -902,11 +909,6 @@ static int setup_sigframe_layout(struct rt_sigframe_user_layout *user,
902909
else
903910
vl = task_get_sme_vl(current);
904911

905-
err = sigframe_alloc(user, &user->tpidr2_offset,
906-
sizeof(struct tpidr2_context));
907-
if (err)
908-
return err;
909-
910912
if (thread_za_enabled(&current->thread))
911913
vq = sve_vq_from_vl(vl);
912914

0 commit comments

Comments
 (0)