lkml.org 
[lkml]   [2015]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 1/2] x86: use already defined KEEP_SEGMENTS macro from bootparam.h
Date
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@gmail.com>
---
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


\
 
 \ /
  Last update: 2015-01-31 07:41    [W:0.054 / U:2.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site