Commit 47bc5106 authored by Ingo Molnar's avatar Ingo Molnar

x86/fpu: Clean up asm/fpu/types.h

 - add header guards

 - standardize vertical alignment

 - add comments about MPX

No code changed.
Reviewed-by: default avatarBorislav Petkov <bp@alien8.de>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Dave Hansen <dave.hansen@linux.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>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 14b9675a
/*
* FPU data structures:
*/
#ifndef _ASM_X86_FPU_H
#define _ASM_X86_FPU_H
#define MXCSR_DEFAULT 0x1f80 #define MXCSR_DEFAULT 0x1f80
...@@ -52,6 +57,9 @@ struct i387_fxsave_struct { ...@@ -52,6 +57,9 @@ struct i387_fxsave_struct {
} __attribute__((aligned(16))); } __attribute__((aligned(16)));
/*
* Software based FPU emulation state:
*/
struct i387_soft_struct { struct i387_soft_struct {
u32 cwd; u32 cwd;
u32 swd; u32 swd;
...@@ -82,6 +90,7 @@ struct lwp_struct { ...@@ -82,6 +90,7 @@ struct lwp_struct {
u8 reserved[128]; u8 reserved[128];
}; };
/* Intel MPX support: */
struct bndreg { struct bndreg {
u64 lower_bound; u64 lower_bound;
u64 upper_bound; u64 upper_bound;
...@@ -105,7 +114,7 @@ struct xsave_struct { ...@@ -105,7 +114,7 @@ struct xsave_struct {
struct lwp_struct lwp; struct lwp_struct lwp;
struct bndreg bndreg[4]; struct bndreg bndreg[4];
struct bndcsr bndcsr; struct bndcsr bndcsr;
/* new processor state extensions will go here */ /* New processor state extensions will go here. */
} __attribute__ ((packed, aligned (64))); } __attribute__ ((packed, aligned (64)));
union thread_xstate { union thread_xstate {
...@@ -130,3 +139,4 @@ struct fpu { ...@@ -130,3 +139,4 @@ struct fpu {
unsigned char counter; unsigned char counter;
}; };
#endif /* _ASM_X86_FPU_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment