RFC: Sentosa boot fix

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

 



From: Daniel Jacobowitz <dan@xxxxxxxxxxxxxxxx>

Always support CKSEG0 for 64-bit kernels.

This prevents an early exception when used without a ramdisk.

Signed-off-by: Daniel Jacobowitz <dan@xxxxxxxxxxxxxxxx>

---

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


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux