summaryrefslogtreecommitdiff
path: root/arch/s390/include/asm/fpu.h
diff options
context:
space:
mode:
authorHeiko Carstens <hca@linux.ibm.com>2024-02-03 13:45:09 +0300
committerHeiko Carstens <hca@linux.ibm.com>2024-02-16 16:30:15 +0300
commit419abc4d3828813b58d047da146f519eedaa395b (patch)
treeb358423efb377ffd2c050aab1ab2e41740ba44ab /arch/s390/include/asm/fpu.h
parent918c7cad66509c2170e38a088550fb4a525e0878 (diff)
downloadlinux-419abc4d3828813b58d047da146f519eedaa395b.tar.xz
s390/fpu: convert FPU CIF flag to regular TIF flag
The FPU state, as represented by the CIF_FPU flag reflects the FPU state of a task, not the CPU it is running on. Therefore convert the flag to a regular TIF flag. This removes the magic in switch_to() where a save_fpu_regs() call for the currently (previous) running task sets the per-cpu CIF_FPU flag, which is required to restore FPU register contents of the next task, when it returns to user space. Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/fpu.h')
-rw-r--r--arch/s390/include/asm/fpu.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/include/asm/fpu.h b/arch/s390/include/asm/fpu.h
index be85c28cdcde..3f076172a283 100644
--- a/arch/s390/include/asm/fpu.h
+++ b/arch/s390/include/asm/fpu.h
@@ -148,7 +148,7 @@ static inline void kernel_fpu_begin(struct kernel_fpu *state, u32 flags)
{
preempt_disable();
state->mask = S390_lowcore.fpu_flags;
- if (!test_cpu_flag(CIF_FPU)) {
+ if (!test_thread_flag(TIF_FPU)) {
/* Save user space FPU state and register contents */
save_fpu_regs();
} else if (state->mask & flags) {