Commit 2f27b503 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Borislav Petkov
Browse files

x86/fpu: Remove fpu::state



All users converted. Remove it along with the sanity checks.

Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20211013145322.765063318@linutronix.de
parent 63d6bdf3
Loading
Loading
Loading
Loading
+7 −11
Original line number Diff line number Diff line
@@ -352,20 +352,16 @@ struct fpu {
	struct fpstate			*fpstate;

	/*
	 * @state:
	 * @__fpstate:
	 *
	 * In-memory copy of all FPU registers that we save/restore
	 * over context switches. If the task is using the FPU then
	 * the registers in the FPU are more recent than this state
	 * copy. If the task context-switches away then they get
	 * saved here and represent the FPU state.
	 * Initial in-memory storage for FPU registers which are saved in
	 * context switch and when the kernel uses the FPU. The registers
	 * are restored from this storage on return to user space if they
	 * are not longer containing the tasks FPU register state.
	 */
	union {
	struct fpstate			__fpstate;
		union fpregs_state		state;
	};
	/*
	 * WARNING: 'state' is dynamically-sized.  Do not put
	 * WARNING: '__fpstate' is dynamically-sized.  Do not put
	 * anything after it here.
	 */
};
+0 −4
Original line number Diff line number Diff line
@@ -184,10 +184,6 @@ static void __init fpu__init_task_struct_size(void)
	CHECK_MEMBER_AT_END_OF(struct thread_struct, fpu);
	CHECK_MEMBER_AT_END_OF(struct task_struct, thread);

	BUILD_BUG_ON(sizeof(struct fpstate) != sizeof(union fpregs_state));
	BUILD_BUG_ON(offsetof(struct thread_struct, fpu.state) !=
		     offsetof(struct thread_struct, fpu.__fpstate));

	arch_task_struct_size = task_size;
}