diff options
author | 2025-04-09 23:11:21 +0200 | |
---|---|---|
committer | 2025-04-14 08:18:29 +0200 | |
commit | e3bfa3859936da3edd1e16d0b74fdaaa19bb5087 (patch) | |
tree | ae51c0a0d3498575d4cf337cc8e061f3370b1a8b /arch/x86/kernel/process.c | |
parent | x86/fpu: Introduce the x86_task_fpu() helper method (diff) | |
download | linux-rng-e3bfa3859936da3edd1e16d0b74fdaaa19bb5087.tar.xz linux-rng-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/kernel/process.c')
-rw-r--r-- | arch/x86/kernel/process.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index 962c3ce39323..47694e391506 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c @@ -103,7 +103,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src) dst->thread.vm86 = NULL; #endif /* Drop the copied pointer to current's fpstate */ - dst->thread.fpu.fpstate = NULL; + x86_task_fpu(dst)->fpstate = NULL; return 0; } @@ -112,7 +112,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src) void arch_release_task_struct(struct task_struct *tsk) { if (fpu_state_size_dynamic()) - fpstate_free(&tsk->thread.fpu); + fpstate_free(x86_task_fpu(tsk)); } #endif @@ -122,7 +122,7 @@ void arch_release_task_struct(struct task_struct *tsk) void exit_thread(struct task_struct *tsk) { struct thread_struct *t = &tsk->thread; - struct fpu *fpu = &t->fpu; + struct fpu *fpu = x86_task_fpu(tsk); if (test_thread_flag(TIF_IO_BITMAP)) io_bitmap_exit(tsk); |