From 16ee4861a00360bb7ec54ea19c7d4350ab157d86 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Tue, 12 May 2009 11:37:34 -0700 Subject: [PATCH] --- yaml --- r: 145699 b: refs/heads/master c: c4f68236e41641494f9c8a418ccc0678c335bbb5 h: refs/heads/master i: 145697: f96ab2114089bb0968f3986a8ebca61ae2640679 145695: e41295569e3c4257fa9c71edcb2acbf93d7970b1 v: v3 --- [refs] | 2 +- trunk/arch/x86/include/asm/page_64_types.h | 14 +++----------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/[refs] b/[refs] index 389ca93a5693..99fea7ab8ceb 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7ed42a28b269f8682eefae27f5c11187eb56e63b +refs/heads/master: c4f68236e41641494f9c8a418ccc0678c335bbb5 diff --git a/trunk/arch/x86/include/asm/page_64_types.h b/trunk/arch/x86/include/asm/page_64_types.h index d38c91b70248..e11900f2500e 100644 --- a/trunk/arch/x86/include/asm/page_64_types.h +++ b/trunk/arch/x86/include/asm/page_64_types.h @@ -32,17 +32,9 @@ */ #define __PAGE_OFFSET _AC(0xffff880000000000, UL) -#define __PHYSICAL_START CONFIG_PHYSICAL_START -#define __KERNEL_ALIGN 0x200000 - -/* - * Make sure kernel is aligned to 2MB address. Catching it at compile - * time is better. Change your config file and compile the kernel - * for a 2MB aligned address (CONFIG_PHYSICAL_START) - */ -#if (CONFIG_PHYSICAL_START % __KERNEL_ALIGN) != 0 -#error "CONFIG_PHYSICAL_START must be a multiple of 2MB" -#endif +#define __PHYSICAL_START ((CONFIG_PHYSICAL_START + \ + (CONFIG_PHYSICAL_ALIGN - 1)) & \ + ~(CONFIG_PHYSICAL_ALIGN - 1)) #define __START_KERNEL (__START_KERNEL_map + __PHYSICAL_START) #define __START_KERNEL_map _AC(0xffffffff80000000, UL)