]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
x86/fpu: Clarify FPU context cacheline alignment
authorIngo Molnar <mingo@kernel.org>
Thu, 10 Apr 2025 10:52:16 +0000 (12:52 +0200)
committerIngo Molnar <mingo@kernel.org>
Mon, 14 Apr 2025 06:18:29 +0000 (08:18 +0200)
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Chang S. Bae <chang.seok.bae@intel.com>
Cc: Fenghua Yu <fenghua.yu@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/Z_ejggklB5-IWB5W@gmail.com
arch/x86/kernel/fpu/core.c

index d0a45f6492cb792c9e5eeb69213d5ecf590905f7..3a19877a314e3e7a5ca4884310714ffacae1fe2d 100644 (file)
@@ -607,7 +607,8 @@ int fpu_clone(struct task_struct *dst, unsigned long clone_flags, bool minimal,
         * We allocate the new FPU structure right after the end of the task struct.
         * task allocation size already took this into account.
         *
-        * This is safe because task_struct size is a multiple of cacheline size.
+        * This is safe because task_struct size is a multiple of cacheline size,
+        * thus x86_task_fpu() will always be cacheline aligned as well.
         */
        struct fpu *dst_fpu = (void *)dst + sizeof(*dst);