x86/asm/boot: Use already defined KEEP_SEGMENTS macro in head_{32,64}.S
There is already defined macro KEEP_SEGMENTS in <asm/bootparam.h>, let's use it instead of hardcoded constants. Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/1424331298-7456-1-git-send-email-kuleshovmail@gmail.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
committed by
Ingo Molnar
parent
0cdb81bef2
commit
fb148d83ec
@@ -29,6 +29,7 @@
|
|||||||
#include <asm/page_types.h>
|
#include <asm/page_types.h>
|
||||||
#include <asm/boot.h>
|
#include <asm/boot.h>
|
||||||
#include <asm/asm-offsets.h>
|
#include <asm/asm-offsets.h>
|
||||||
|
#include <asm/bootparam.h>
|
||||||
|
|
||||||
__HEAD
|
__HEAD
|
||||||
ENTRY(startup_32)
|
ENTRY(startup_32)
|
||||||
@@ -102,7 +103,7 @@ preferred_addr:
|
|||||||
* Test KEEP_SEGMENTS flag to see if the bootloader is asking
|
* Test KEEP_SEGMENTS flag to see if the bootloader is asking
|
||||||
* us to not reload segments
|
* us to not reload segments
|
||||||
*/
|
*/
|
||||||
testb $(1<<6), BP_loadflags(%esi)
|
testb $KEEP_SEGMENTS, BP_loadflags(%esi)
|
||||||
jnz 1f
|
jnz 1f
|
||||||
|
|
||||||
cli
|
cli
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
#include <asm/msr.h>
|
#include <asm/msr.h>
|
||||||
#include <asm/processor-flags.h>
|
#include <asm/processor-flags.h>
|
||||||
#include <asm/asm-offsets.h>
|
#include <asm/asm-offsets.h>
|
||||||
|
#include <asm/bootparam.h>
|
||||||
|
|
||||||
__HEAD
|
__HEAD
|
||||||
.code32
|
.code32
|
||||||
@@ -46,7 +47,7 @@ ENTRY(startup_32)
|
|||||||
* Test KEEP_SEGMENTS flag to see if the bootloader is asking
|
* Test KEEP_SEGMENTS flag to see if the bootloader is asking
|
||||||
* us to not reload segments
|
* us to not reload segments
|
||||||
*/
|
*/
|
||||||
testb $(1<<6), BP_loadflags(%esi)
|
testb $KEEP_SEGMENTS, BP_loadflags(%esi)
|
||||||
jnz 1f
|
jnz 1f
|
||||||
|
|
||||||
cli
|
cli
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
#include <asm/cpufeature.h>
|
#include <asm/cpufeature.h>
|
||||||
#include <asm/percpu.h>
|
#include <asm/percpu.h>
|
||||||
#include <asm/nops.h>
|
#include <asm/nops.h>
|
||||||
|
#include <asm/bootparam.h>
|
||||||
|
|
||||||
/* Physical address */
|
/* Physical address */
|
||||||
#define pa(X) ((X) - __PAGE_OFFSET)
|
#define pa(X) ((X) - __PAGE_OFFSET)
|
||||||
@@ -90,7 +91,7 @@ ENTRY(startup_32)
|
|||||||
|
|
||||||
/* test KEEP_SEGMENTS flag to see if the bootloader is asking
|
/* test KEEP_SEGMENTS flag to see if the bootloader is asking
|
||||||
us to not reload segments */
|
us to not reload segments */
|
||||||
testb $(1<<6), BP_loadflags(%esi)
|
testb $KEEP_SEGMENTS, BP_loadflags(%esi)
|
||||||
jnz 2f
|
jnz 2f
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user