From: Daniel Jacobowitz <dan@codesourcery.com>
Always support CKSEG0 for 64-bit kernels.
This prevents an early exception when used without a ramdisk.
Signed-off-by: Daniel Jacobowitz <dan@codesourcery.com>
---
Here's a crude patch that lets my Sentosa boot using GIT HEAD.
The problem is __pa_symbol(&_end); the kernel is linked at
0xffffffff80xxxxxx, so subtracting a PAGE_OFFSET of 0xa800000000000000
does not do anything useful to this address at all.
This may be the wrong fix, but if so, I don't understand what's going
on. What does CKSEG0 have to do with !CONFIG_BUILD_ELF64?
diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h
index 2f9e1a9..81dc8a6 100644
--- a/include/asm-mips/page.h
+++ b/include/asm-mips/page.h
@@ -132,7 +132,7 @@ typedef struct { unsigned long pgprot; } pgprot_t;
/* to align the pointer to the (next) page boundary */
#define PAGE_ALIGN(addr) (((addr) + PAGE_SIZE - 1) & PAGE_MASK)
-#if defined(CONFIG_64BIT) && !defined(CONFIG_BUILD_ELF64)
+#if defined(CONFIG_64BIT)
#define __pa_page_offset(x) ((unsigned long)(x) < CKSEG0 ? PAGE_OFFSET :
CKSEG0)
#else
#define __pa_page_offset(x) PAGE_OFFSET
--
Daniel Jacobowitz
CodeSourcery
|