From: Eric W. Biederman Date: Thu, 7 Dec 2006 01:14:03 +0000 (+0100) Subject: [PATCH] i386: Reserve kernel memory starting from _text X-Git-Tag: v2.6.20-rc1~145^2^2~8^2~113 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=8621b81c744ff8880a1efe095a4dcd09763ddb5a;p=linux-2.6-omap-h63xx.git [PATCH] i386: Reserve kernel memory starting from _text Currently when we are reserving the memory the kernel text resides in we start at __PHYSICAL_START which happens to be correct but not very obvious. In addition when we start relocating the kernel __PHYSICAL_START is the wrong value, as it is an absolute symbol that does not get relocated. By starting the reservation at __pa_symbol(_text) the code is clearer and will be correct when relocated. Signed-off-by: Eric W. Biederman Signed-off-by: Vivek Goyal Signed-off-by: Andi Kleen --- diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c index 141041dde74..61539afbdf2 100644 --- a/arch/i386/kernel/setup.c +++ b/arch/i386/kernel/setup.c @@ -1118,8 +1118,8 @@ void __init setup_bootmem_allocator(void) * the (very unlikely) case of us accidentally initializing the * bootmem allocator with an invalid RAM area. */ - reserve_bootmem(__PHYSICAL_START, (PFN_PHYS(min_low_pfn) + - bootmap_size + PAGE_SIZE-1) - (__PHYSICAL_START)); + reserve_bootmem(__pa_symbol(_text), (PFN_PHYS(min_low_pfn) + + bootmap_size + PAGE_SIZE-1) - __pa_symbol(_text)); /* * reserve physical page 0 - it's a special BIOS page on many boxes,