[PATCH 13/33] x86_64: Remove assumptions about the kernel start address from e820/bad_addr()

Eric W. Biederman
2006-08-01T11:15:37Z

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
---
arch/x86_64/kernel/e820.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/arch/x86_64/kernel/e820.c b/arch/x86_64/kernel/e820.c
index 61f029f..56dd525 100644
--- a/arch/x86_64/kernel/e820.c
+++ b/arch/x86_64/kernel/e820.c
@@ -69,9 +69,14 @@ #ifdef CONFIG_BLK_DEV_INITRD
return 1;
}
#endif
- /* kernel code + 640k memory hole (later should not be needed, but
+ /* 640k memory hole (later should not be needed, but
be paranoid for now) */
- if (last >= 640*1024 && addr < __pa_symbol(&_end)) {
+ if (last >= 640*1024 && addr < HIGH_MEMORY) {
+ *addrp = HIGH_MEMORY;
+ }
+
+ /* kernel code */
+ if (last >= __pa_symbol(&_text) && addr < __pa_symbol(&_end)) {
*addrp = __pa_symbol(&_end);
return 1;
}
--
1.4.2.rc2.g5209e