summaryrefslogtreecommitdiff
path: root/arch/s390/kernel/fpu.c
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2024-02-03 11:45:14 +0100
committerHeiko Carstens <hca@linux.ibm.com>2024-02-16 14:30:16 +0100
commit9cbff7f2214d16af5c10f1f55ac72d4c1a8bd787 (patch)
treeb2e7bad1200da86e7001dc32a709506f72bd8456 /arch/s390/kernel/fpu.c
parented3a0a011a9c33d81a0d024882ee433c42bfccae (diff)
s390/fpu: remove regs member from struct fpu
KVM was the only user which modified the regs pointer in struct fpu. Remove the pointer and convert the rest of the core fpu code to directly access the save area embedded within struct fpu. Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/s390/kernel/fpu.c')
-rw-r--r--arch/s390/kernel/fpu.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/arch/s390/kernel/fpu.c b/arch/s390/kernel/fpu.c
index b976da5bf71b..a0ef3fc5d90f 100644
--- a/arch/s390/kernel/fpu.c
+++ b/arch/s390/kernel/fpu.c
@@ -110,13 +110,12 @@ EXPORT_SYMBOL(__kernel_fpu_end);
void __load_user_fpu_regs(void)
{
struct fpu *state = &current->thread.ufpu;
- void *regs = current->thread.ufpu.regs;
fpu_lfpc_safe(&state->fpc);
if (likely(cpu_has_vx()))
- load_vx_regs(regs);
+ load_vx_regs(state->vxrs);
else
- load_fp_regs(regs);
+ load_fp_regs(state->fprs);
clear_thread_flag(TIF_FPU);
}
@@ -132,7 +131,6 @@ void save_user_fpu_regs(void)
{
unsigned long flags;
struct fpu *state;
- void *regs;
local_irq_save(flags);
@@ -140,13 +138,12 @@ void save_user_fpu_regs(void)
goto out;
state = &current->thread.ufpu;
- regs = current->thread.ufpu.regs;
fpu_stfpc(&state->fpc);
if (likely(cpu_has_vx()))
- save_vx_regs(regs);
+ save_vx_regs(state->vxrs);
else
- save_fp_regs(regs);
+ save_fp_regs(state->fprs);
set_thread_flag(TIF_FPU);
out:
local_irq_restore(flags);