Skip to content

Commit e9d14f3

Browse files
Dongxu Sunwilldeacon
authored andcommitted
arm64/signal: Use system_supports_tpidr2() to check TPIDR2
Since commit a9d6915("arm64/sme: Implement support for TPIDR2"), We introduced system_supports_tpidr2() for TPIDR2 handling. Let's use the specific check instead. No functional changes. 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 73e6898 commit e9d14f3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/arm64/kernel/signal.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ static int parse_user_sigframe(struct user_ctxs *user,
651651
break;
652652

653653
case TPIDR2_MAGIC:
654-
if (!system_supports_sme())
654+
if (!system_supports_tpidr2())
655655
goto invalid;
656656

657657
if (user->tpidr2)
@@ -802,7 +802,7 @@ static int restore_sigframe(struct pt_regs *regs,
802802
err = restore_fpsimd_context(&user);
803803
}
804804

805-
if (err == 0 && system_supports_sme() && user.tpidr2)
805+
if (err == 0 && system_supports_tpidr2() && user.tpidr2)
806806
err = restore_tpidr2_context(&user);
807807

808808
if (err == 0 && system_supports_sme() && user.za)
@@ -974,7 +974,7 @@ static int setup_sigframe(struct rt_sigframe_user_layout *user,
974974
}
975975

976976
/* TPIDR2 if supported */
977-
if (system_supports_sme() && err == 0) {
977+
if (system_supports_tpidr2() && err == 0) {
978978
struct tpidr2_context __user *tpidr2_ctx =
979979
apply_user_offset(user, user->tpidr2_offset);
980980
err |= preserve_tpidr2_context(tpidr2_ctx);

0 commit comments

Comments
 (0)