x86/fpu: Simplify copy_kernel_to_xregs_booting()
authorIngo Molnar <mingo@kernel.org>
Wed, 27 May 2015 12:04:44 +0000 (14:04 +0200)
committerIngo Molnar <mingo@kernel.org>
Wed, 27 May 2015 12:11:33 +0000 (14:11 +0200)
copy_kernel_to_xregs_booting() has a second parameter that is the mask
of xfeatures that should be copied - but this parameter is always -1.

Simplify the call site of this function, this also makes it more
similar to the function call signature of other copy_kernel_to*regs()
functions.

Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Bobby Powers <bobbypowers@gmail.com>
Cc: Borislav Petkov <bp@alien8.de>
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: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/fpu/internal.h
arch/x86/kernel/fpu/xstate.c

index 12acbb32a5613f641d4c31afd69960d639cc7010..9f38638720073aff6c8dbcda390bdc2a2bb05afa 100644 (file)
@@ -271,8 +271,9 @@ static inline void copy_xregs_to_kernel_booting(struct xregs_state *xstate)
  * This function is called only during boot time when x86 caps are not set
  * up and alternative can not be used yet.
  */
-static inline void copy_kernel_to_xregs_booting(struct xregs_state *xstate, u64 mask)
+static inline void copy_kernel_to_xregs_booting(struct xregs_state *xstate)
 {
+       u64 mask = -1;
        u32 lmask = mask;
        u32 hmask = mask >> 32;
        int err = 0;
index ad4dd26ebd5935a69b717eb2ccd45fb81a330ffe..a580eb5c7e5284c0a687ea21f86fc2efa8c85434 100644 (file)
@@ -281,7 +281,7 @@ static void __init setup_init_fpu_buf(void)
        /*
         * Init all the features state with header_bv being 0x0
         */
-       copy_kernel_to_xregs_booting(&init_fpstate.xsave, -1);
+       copy_kernel_to_xregs_booting(&init_fpstate.xsave);
 
        /*
         * Dump the init state again. This is to identify the init state
This page took 0.026096 seconds and 5 git commands to generate.