Commit e9d14f3f authored by Dongxu Sun's avatar Dongxu Sun Committed by Will Deacon

arm64/signal: Use system_supports_tpidr2() to check TPIDR2

Since commit a9d69158("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: default avatarDongxu Sun <sundongxu3@huawei.com>
Reviewed-by: default avatarMark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230317124915.1263-2-sundongxu3@huawei.comSigned-off-by: default avatarWill Deacon <will@kernel.org>
parent 73e68984
...@@ -651,7 +651,7 @@ static int parse_user_sigframe(struct user_ctxs *user, ...@@ -651,7 +651,7 @@ static int parse_user_sigframe(struct user_ctxs *user,
break; break;
case TPIDR2_MAGIC: case TPIDR2_MAGIC:
if (!system_supports_sme()) if (!system_supports_tpidr2())
goto invalid; goto invalid;
if (user->tpidr2) if (user->tpidr2)
...@@ -802,7 +802,7 @@ static int restore_sigframe(struct pt_regs *regs, ...@@ -802,7 +802,7 @@ static int restore_sigframe(struct pt_regs *regs,
err = restore_fpsimd_context(&user); err = restore_fpsimd_context(&user);
} }
if (err == 0 && system_supports_sme() && user.tpidr2) if (err == 0 && system_supports_tpidr2() && user.tpidr2)
err = restore_tpidr2_context(&user); err = restore_tpidr2_context(&user);
if (err == 0 && system_supports_sme() && user.za) if (err == 0 && system_supports_sme() && user.za)
...@@ -974,7 +974,7 @@ static int setup_sigframe(struct rt_sigframe_user_layout *user, ...@@ -974,7 +974,7 @@ static int setup_sigframe(struct rt_sigframe_user_layout *user,
} }
/* TPIDR2 if supported */ /* TPIDR2 if supported */
if (system_supports_sme() && err == 0) { if (system_supports_tpidr2() && err == 0) {
struct tpidr2_context __user *tpidr2_ctx = struct tpidr2_context __user *tpidr2_ctx =
apply_user_offset(user, user->tpidr2_offset); apply_user_offset(user, user->tpidr2_offset);
err |= preserve_tpidr2_context(tpidr2_ctx); err |= preserve_tpidr2_context(tpidr2_ctx);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment