Skip to contentSkip to conversation

x86, flags: Rename X86_EFLAGS_BIT1 to X86_EFLAGS_FIXED

tip:x86/asm tip-bot for H. Peter Anvin 1 participant 1 message Jun 25, 2013 x86

lore
Share & tools
lore
#0 lore raw
Commit-ID:  1037acf062a3af5467bf6bcfdcf93ef989e5319b
Gitweb:     http://git.kernel.org/tip/1037acf062a3af5467bf6bcfdcf93ef989e5319b
Author:     H. Peter Anvin <[email protected]>
AuthorDate: Sat, 27 Apr 2013 16:10:11 -0700
Committer:  H. Peter Anvin <[email protected]>
CommitDate: Tue, 25 Jun 2013 15:50:04 -0700

x86, flags: Rename X86_EFLAGS_BIT1 to X86_EFLAGS_FIXED

Bit 1 in the x86 EFLAGS is always set. Name the macro something that actually tries to explain what it is all about, rather than being a tautology.

---
 arch/x86/include/uapi/asm/processor-flags.h | 2 +-
 arch/x86/kernel/entry_64.S                  | 2 +-
 arch/x86/kernel/process_32.c                | 2 +-
 arch/x86/kernel/process_64.c                | 2 +-
 drivers/lguest/x86/core.c                   | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
arch/x86/include/uapi/asm/processor-flags.h +1 -1
index 54991a7..b16e6d2 100644
@@ -6,7 +6,7 @@
  * EFLAGS bits
  */
 #define X86_EFLAGS_CF	0x00000001 /* Carry Flag */
-#define X86_EFLAGS_BIT1	0x00000002 /* Bit 1 - always on */
+#define X86_EFLAGS_FIXED 0x00000002 /* Bit 1 - always on */
 #define X86_EFLAGS_PF	0x00000004 /* Parity Flag */
 #define X86_EFLAGS_AF	0x00000010 /* Auxiliary carry Flag */
 #define X86_EFLAGS_ZF	0x00000040 /* Zero Flag */
arch/x86/kernel/entry_64.S +1 -1
index 7272089..5fe1fb2 100644
@@ -365,7 +365,7 @@ ENDPROC(native_usergs_sysret64)
 	/*CFI_REL_OFFSET	ss,0*/
 	pushq_cfi %rax /* rsp */
 	CFI_REL_OFFSET	rsp,0
-	pushq_cfi $(X86_EFLAGS_IF|X86_EFLAGS_BIT1) /* eflags - interrupts on */
+	pushq_cfi $(X86_EFLAGS_IF|X86_EFLAGS_FIXED) /* eflags - interrupts on */
 	/*CFI_REL_OFFSET	rflags,0*/
 	pushq_cfi $__KERNEL_CS /* cs */
 	/*CFI_REL_OFFSET	cs,0*/
arch/x86/kernel/process_32.c +1 -1
index 7305f7d..0339f5c 100644
@@ -147,7 +147,7 @@ int copy_thread(unsigned long clone_flags, unsigned long sp,
 		childregs->bp = arg;
 		childregs->orig_ax = -1;
 		childregs->cs = __KERNEL_CS | get_kernel_rpl();
-		childregs->flags = X86_EFLAGS_IF | X86_EFLAGS_BIT1;
+		childregs->flags = X86_EFLAGS_IF | X86_EFLAGS_FIXED;
 		p->fpu_counter = 0;
 		p->thread.io_bitmap_ptr = NULL;
 		memset(p->thread.ptrace_bps, 0, sizeof(p->thread.ptrace_bps));
arch/x86/kernel/process_64.c +1 -1
index 355ae06..f99a242 100644
@@ -176,7 +176,7 @@ int copy_thread(unsigned long clone_flags, unsigned long sp,
 		childregs->bp = arg;
 		childregs->orig_ax = -1;
 		childregs->cs = __KERNEL_CS | get_kernel_rpl();
-		childregs->flags = X86_EFLAGS_IF | X86_EFLAGS_BIT1;
+		childregs->flags = X86_EFLAGS_IF | X86_EFLAGS_FIXED;
 		return 0;
 	}
 	*childregs = *current_pt_regs();
drivers/lguest/x86/core.c +1 -1
index f0a3347..5169239 100644
@@ -700,7 +700,7 @@ void lguest_arch_setup_regs(struct lg_cpu *cpu, unsigned long start)
 	 * interrupts are enabled.  We always leave interrupts enabled while
 	 * running the Guest.
 	 */
-	regs->eflags = X86_EFLAGS_IF | X86_EFLAGS_BIT1;
+	regs->eflags = X86_EFLAGS_IF | X86_EFLAGS_FIXED;
 
 	/*
 	 * The "Extended Instruction Pointer" register says where the Guest is