x86/fpu: Rename 'xsave_hdr' to 'header'
authorIngo Molnar <mingo@kernel.org>
Fri, 24 Apr 2015 08:14:36 +0000 (10:14 +0200)
committerIngo Molnar <mingo@kernel.org>
Tue, 19 May 2015 13:47:34 +0000 (15:47 +0200)
Code like:

           fpu->state->xsave.xsave_hdr.xstate_bv |= XSTATE_FP;

is an eyesore, because not only is the words 'xsave' and 'state'
are repeated twice times (!), but also because of the 'hdr' and 'bv'
abbreviations that are pretty meaningless at a first glance.

Start cleaning this up by renaming 'xsave_hdr' to 'header'.

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>
arch/x86/include/asm/fpu/internal.h
arch/x86/include/asm/fpu/types.h
arch/x86/include/asm/fpu/xsave.h
arch/x86/include/asm/user.h
arch/x86/include/uapi/asm/sigcontext.h
arch/x86/kernel/fpu/core.c
arch/x86/kernel/fpu/xsave.c
arch/x86/kvm/x86.c

index 0e9a7a3..3007df9 100644 (file)
@@ -261,7 +261,7 @@ static inline int fpu_save_init(struct fpu *fpu)
                /*
                 * xsave header may indicate the init state of the FP.
                 */
-               if (!(fpu->state->xsave.xsave_hdr.xstate_bv & XSTATE_FP))
+               if (!(fpu->state->xsave.header.xstate_bv & XSTATE_FP))
                        return 1;
        } else if (use_fxsr()) {
                fpu_fxsave(fpu);
index 917d2e5..33c0c7b 100644 (file)
@@ -99,7 +99,7 @@ struct bndcsr {
        u64                             bndstatus;
 } __packed;
 
-struct xsave_hdr_struct {
+struct xstate_header {
        u64                             xstate_bv;
        u64                             xcomp_bv;
        u64                             reserved[6];
@@ -107,7 +107,7 @@ struct xsave_hdr_struct {
 
 struct xsave_struct {
        struct i387_fxsave_struct       i387;
-       struct xsave_hdr_struct         xsave_hdr;
+       struct xstate_header            header;
        struct ymmh_struct              ymmh;
        struct lwp_struct               lwp;
        struct bndreg                   bndreg[4];
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge