Skip to contentSkip to conversation

__pa_page_offset(): fix physical offset for kernel linked in CKSEG0

PATCH New Franck Bui-Huu 1 participant 1 message Mar 19, 2007 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 __pa_page_offset(): fix physical offset for kernel linked in CKSEG0

From: peter fuerst <[email protected]>

This patch fixes commit 6f284a2ce7b8bc49cb8455b1763357897a899abb for 64 bits kernel linked in CKSEG0.

---
 include/asm-mips/page.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/asm-mips/page.h +1 -1
index d3fbd83..76cb88c 100644
@@ -150,7 +150,7 @@ typedef struct { unsigned long pgprot; } pgprot_t;
  * __pa()/__va() should be used only during mem init.
  */
 #if defined(CONFIG_64BIT) && !defined(CONFIG_BUILD_ELF64)
-#define __pa_page_offset(x)	((unsigned long)(x) < CKSEG0 ? PAGE_OFFSET : CKSEG0)
+#define __pa_page_offset(x)	((unsigned long)(x) < CKSEG0 ? PAGE_OFFSET : CKSEG0 + PHYS_OFFSET)
 #else
 #define __pa_page_offset(x)	PAGE_OFFSET
 #endif
Signature · 1 line
1.4.4.3.ge6d4