[PATCH v2 1/2] x86: use already defined KEEP_SEGMENTS macro from bootparam.h

From: Alexander Kuleshov
Date: Sat Jan 31 2015 - 01:30:24 EST


There is already defined macro KEEP_SEGMENTS in the
bootparam.h, let's use it instead of shifting bits

Signed-off-by: Alexander Kuleshov <kuleshovmail@xxxxxxxxx>
---
arch/x86/kernel/head_32.S | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S
index f36bd42..fba3990 100644
--- a/arch/x86/kernel/head_32.S
+++ b/arch/x86/kernel/head_32.S
@@ -22,7 +22,8 @@
#include <asm/cpufeature.h>
#include <asm/percpu.h>
#include <asm/nops.h>
-
+#include <asm/bootmparam.h>
+
/* Physical address */
#define pa(X) ((X) - __PAGE_OFFSET)

@@ -89,8 +90,8 @@ ENTRY(startup_32)
movl pa(stack_start),%ecx

/* test KEEP_SEGMENTS flag to see if the bootloader is asking
- us to not reload segments */
- testb $(1<<6), BP_loadflags(%esi)
+ us to not reload segments */
+ testb $KEEP_SEGMENTS, BP_loadflags(%esi)
jnz 2f

/*
--
2.3.0-rc1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/