From: Ralf Baechle <ralf@linux-mips.org>
Date: Tue, 11 Sep 2007 07:50:40 +0000 (+0100)
Subject: [MIPS] Fix CONFIG_BUILD_ELF64 kernels with symbols in CKSEG0.
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7d809ba3f98b8aa8f9ba0dcdf6349958a0b77b7b;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git

[MIPS] Fix CONFIG_BUILD_ELF64 kernels with symbols in CKSEG0.

The __pa() for those did assume that all symbols have XKPHYS values and
the math fails for any other address range.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
---

diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h
index b92dd8c760da..e3301e54d559 100644
--- a/include/asm-mips/page.h
+++ b/include/asm-mips/page.h
@@ -142,7 +142,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)
+#ifdef CONFIG_64BIT
 #define __pa(x)								\
 ({									\
     unsigned long __x = (unsigned long)(x);				\