[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 08/15] linux-user/s390x: Tidy save_sigregs
From: |
Richard Henderson |
Subject: |
[PATCH v2 08/15] linux-user/s390x: Tidy save_sigregs |
Date: |
Wed, 28 Apr 2021 12:34:01 -0700 |
The "save" routines copied from the kernel, which are currently
commented out, are unnecessary in qemu. We can copy from env
where the kernel needs special instructions. Fix comment style.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
linux-user/s390x/signal.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/linux-user/s390x/signal.c b/linux-user/s390x/signal.c
index 4dde55d4d5..eabfe4293f 100644
--- a/linux-user/s390x/signal.c
+++ b/linux-user/s390x/signal.c
@@ -104,23 +104,25 @@ get_sigframe(struct target_sigaction *ka, CPUS390XState
*env, size_t frame_size)
static void save_sigregs(CPUS390XState *env, target_sigregs *sregs)
{
int i;
- //save_access_regs(current->thread.acrs); FIXME
- /* Copy a 'clean' PSW mask to the user to avoid leaking
- information about whether PER is currently on. */
+ /*
+ * Copy a 'clean' PSW mask to the user to avoid leaking
+ * information about whether PER is currently on.
+ */
__put_user(env->psw.mask, &sregs->regs.psw.mask);
__put_user(env->psw.addr, &sregs->regs.psw.addr);
+
for (i = 0; i < 16; i++) {
__put_user(env->regs[i], &sregs->regs.gprs[i]);
}
for (i = 0; i < 16; i++) {
__put_user(env->aregs[i], &sregs->regs.acrs[i]);
}
+
/*
* We have to store the fp registers to current->thread.fp_regs
* to merge them with the emulated registers.
*/
- //save_fp_regs(¤t->thread.fp_regs); FIXME
for (i = 0; i < 16; i++) {
__put_user(*get_freg(env, i), &sregs->fpregs.fprs[i]);
}
--
2.25.1
- [PATCH v2 04/15] linux-user/s390x: Remove restore_sigregs return value, (continued)
- [PATCH v2 04/15] linux-user/s390x: Remove restore_sigregs return value, Richard Henderson, 2021/04/28
- [PATCH v2 05/15] linux-user/s390x: Fix trace in restore_regs, Richard Henderson, 2021/04/28
- [PATCH v2 06/15] linux-user/s390x: Fix sigcontext sregs value, Richard Henderson, 2021/04/28
- [PATCH v2 07/15] linux-user/s390x: Use tswap_sigset in setup_rt_frame, Richard Henderson, 2021/04/28
- [PATCH v2 10/15] linux-user/s390x: Set psw.mask properly for the signal handler, Richard Henderson, 2021/04/28
- [PATCH v2 08/15] linux-user/s390x: Tidy save_sigregs,
Richard Henderson <=
- [PATCH v2 09/15] linux-user/s390x: Clean up single-use gotos in signal.c, Richard Henderson, 2021/04/28
- [PATCH v2 11/15] linux-user/s390x: Add stub sigframe argument for last_break, Richard Henderson, 2021/04/28
- [PATCH v2 12/15] linux-user/s390x: Fix frame_addr corruption in setup_frame, Richard Henderson, 2021/04/28
- [PATCH v2 13/15] linux-user/s390x: Add build asserts for sigset sizes, Richard Henderson, 2021/04/28
- [PATCH v2 14/15] linux-user/s390x: Clean up signal.c, Richard Henderson, 2021/04/28