+ i386-reserve-kernel-memory-starting-from-_text.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     i386: reserve kernel memory starting from _text
has been added to the -mm tree.  Its filename is
     i386-reserve-kernel-memory-starting-from-_text.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: i386: reserve kernel memory starting from _text
From: Vivek Goyal <vgoyal@xxxxxxxxxx>

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 <ebiederm@xxxxxxxxxxxx>
Signed-off-by: Vivek Goyal <vgoyal@xxxxxxxxxx>
Cc: Andi Kleen <ak@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 arch/i386/kernel/setup.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff -puN arch/i386/kernel/setup.c~i386-reserve-kernel-memory-starting-from-_text arch/i386/kernel/setup.c
--- a/arch/i386/kernel/setup.c~i386-reserve-kernel-memory-starting-from-_text
+++ a/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,
_

Patches currently in -mm which might be from vgoyal@xxxxxxxxxx are

i386-distinguish-absolute-symbols.patch
i386-remove-unnecessary-align-in-vmlinuxldss.patch
i386-force-data-segment-to-be-4k-aligned.patch
i386-define-__pa_symbol.patch
i386-reserve-kernel-memory-starting-from-_text.patch
i386-config_physical_start-cleanup.patch
i386-kallsyms-generate-relocatable-symbols.patch
i386-relocatable-kernel-support.patch
i386-warn-upon-absolute-relocations-being-present.patch
i386-implement-config_physical_align.patch
i386-extend-bzimage-protocol-for-relocatable-protected-mode-kernel.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux