summaryrefslogtreecommitdiff
path: root/arch/x86/include/asm/xsave.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2015-04-22 15:08:34 +0200
committerIngo Molnar <mingo@kernel.org>2015-05-19 15:47:18 +0200
commit3e261c14e41b3a3cc1da54190d56b8609bedd873 (patch)
tree18dec7cbabffcd94616bb47f5af4ef1afe999056 /arch/x86/include/asm/xsave.h
parent4d1640927bd54aa118f91c2bcfe6c2de0e2ba2a3 (diff)
x86/fpu: Simplify the xsave_state*() methods
These functions (xsave_state() and xsave_state_booting()) have a 'mask' argument that is always -1. Propagate this into the functions instead and eliminate the extra argument. Does not change the generated code, because these were inlined functions. Reviewed-by: Borislav 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: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/include/asm/xsave.h')
-rw-r--r--arch/x86/include/asm/xsave.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/x86/include/asm/xsave.h b/arch/x86/include/asm/xsave.h
index 58ed0ca5a11e..61c951ce77fe 100644
--- a/arch/x86/include/asm/xsave.h
+++ b/arch/x86/include/asm/xsave.h
@@ -70,8 +70,9 @@ extern void update_regset_xstate_info(unsigned int size, u64 xstate_mask);
* This function is called only during boot time when x86 caps are not set
* up and alternative can not be used yet.
*/
-static inline int xsave_state_booting(struct xsave_struct *fx, u64 mask)
+static inline int xsave_state_booting(struct xsave_struct *fx)
{
+ u64 mask = -1;
u32 lmask = mask;
u32 hmask = mask >> 32;
int err = 0;
@@ -123,8 +124,9 @@ static inline int xrstor_state_booting(struct xsave_struct *fx, u64 mask)
/*
* Save processor xstate to xsave area.
*/
-static inline int xsave_state(struct xsave_struct *fx, u64 mask)
+static inline int xsave_state(struct xsave_struct *fx)
{
+ u64 mask = -1;
u32 lmask = mask;
u32 hmask = mask >> 32;
int err = 0;
@@ -189,7 +191,7 @@ static inline int xrstor_state(struct xsave_struct *fx, u64 mask)
*/
static inline void fpu_xsave(struct fpu *fpu)
{
- xsave_state(&fpu->state->xsave, -1);
+ xsave_state(&fpu->state->xsave);
}
/*