diff options
| author | Ingo Molnar <mingo@kernel.org> | 2025-04-09 23:11:21 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2025-04-14 08:18:29 +0200 |
| commit | e3bfa3859936da3edd1e16d0b74fdaaa19bb5087 (patch) | |
| tree | ae51c0a0d3498575d4cf337cc8e061f3370b1a8b /arch/x86/include/asm/fpu/sched.h | |
| parent | x86/fpu: Introduce the x86_task_fpu() helper method (diff) | |
| download | linux-e3bfa3859936da3edd1e16d0b74fdaaa19bb5087.tar.gz linux-e3bfa3859936da3edd1e16d0b74fdaaa19bb5087.zip | |
x86/fpu: Convert task_struct::thread.fpu accesses to use x86_task_fpu()
This will make the removal of the task_struct::thread.fpu array
easier.
No change in functionality - code generated before and after this
commit is identical on x86-defconfig:
kepler:~/tip> diff -up vmlinux.before.asm vmlinux.after.asm
kepler:~/tip>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Chang S. Bae <chang.seok.bae@intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Link: https://lore.kernel.org/r/20250409211127.3544993-3-mingo@kernel.org
Diffstat (limited to 'arch/x86/include/asm/fpu/sched.h')
| -rw-r--r-- | arch/x86/include/asm/fpu/sched.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/include/asm/fpu/sched.h b/arch/x86/include/asm/fpu/sched.h index c485f1944c5f..1feaa68b7567 100644 --- a/arch/x86/include/asm/fpu/sched.h +++ b/arch/x86/include/asm/fpu/sched.h @@ -41,7 +41,7 @@ static inline void switch_fpu_prepare(struct task_struct *old, int cpu) { if (cpu_feature_enabled(X86_FEATURE_FPU) && !(old->flags & (PF_KTHREAD | PF_USER_WORKER))) { - struct fpu *old_fpu = &old->thread.fpu; + struct fpu *old_fpu = x86_task_fpu(old); save_fpregs_to_fpstate(old_fpu); /* |
