aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/fpu/types.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-10-05 17:57:03 -0700
committerDavid S. Miller <davem@davemloft.net>2017-10-05 18:19:22 -0700
commit53954cf8c5d205624167a2bfd117cc0c1a5f3c6d (patch)
treea287f0c80eb616758bb5212523c8fb3d8fc350a4 /arch/x86/include/asm/fpu/types.h
parentMerge branch 'bpftool' (diff)
parentMerge tag 'pm-4.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm (diff)
downloadlinux-dev-53954cf8c5d205624167a2bfd117cc0c1a5f3c6d.tar.xz
linux-dev-53954cf8c5d205624167a2bfd117cc0c1a5f3c6d.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Just simple overlapping changes. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/x86/include/asm/fpu/types.h')
-rw-r--r--arch/x86/include/asm/fpu/types.h32
1 files changed, 6 insertions, 26 deletions
diff --git a/arch/x86/include/asm/fpu/types.h b/arch/x86/include/asm/fpu/types.h
index 3c80f5b9c09d..a1520575d86b 100644
--- a/arch/x86/include/asm/fpu/types.h
+++ b/arch/x86/include/asm/fpu/types.h
@@ -68,6 +68,9 @@ struct fxregs_state {
/* Default value for fxregs_state.mxcsr: */
#define MXCSR_DEFAULT 0x1f80
+/* Copy both mxcsr & mxcsr_flags with a single u64 memcpy: */
+#define MXCSR_AND_FLAGS_SIZE sizeof(u64)
+
/*
* Software based FPU emulation state. This is arbitrary really,
* it matches the x87 format to make it easier to understand:
@@ -290,36 +293,13 @@ struct fpu {
unsigned int last_cpu;
/*
- * @fpstate_active:
+ * @initialized:
*
- * This flag indicates whether this context is active: if the task
+ * This flag indicates whether this context is initialized: if the task
* is not running then we can restore from this context, if the task
* is running then we should save into this context.
*/
- unsigned char fpstate_active;
-
- /*
- * @fpregs_active:
- *
- * This flag determines whether a given context is actively
- * loaded into the FPU's registers and that those registers
- * represent the task's current FPU state.
- *
- * Note the interaction with fpstate_active:
- *
- * # task does not use the FPU:
- * fpstate_active == 0
- *
- * # task uses the FPU and regs are active:
- * fpstate_active == 1 && fpregs_active == 1
- *
- * # the regs are inactive but still match fpstate:
- * fpstate_active == 1 && fpregs_active == 0 && fpregs_owner == fpu
- *
- * The third state is what we use for the lazy restore optimization
- * on lazy-switching CPUs.
- */
- unsigned char fpregs_active;
+ unsigned char initialized;
/*
* @state: