Patchwork [6/6] book3e/kexec/kdump: redefine VIRT_PHYS_OFFSET

login
register
mail settings
Submitter Tiejun Chen
Date Nov. 15, 2012, 9:39 a.m.
Message ID <1352972396-13489-7-git-send-email-tiejun.chen@windriver.com>
Download mbox | patch
Permalink /patch/199243/
State Superseded
Delegated to: Benjamin Herrenschmidt
Headers show

Comments

Tiejun Chen - Nov. 15, 2012, 9:39 a.m.
Book3e is always aligned 1GB to create TLB so we should
use (KERNELBASE - MEMORY_START) as VIRT_PHYS_OFFSET to
get __pa/__va properly while boot kdump.

Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com>
---
 arch/powerpc/include/asm/page.h |    2 ++
 1 file changed, 2 insertions(+)

Patch

diff --git a/arch/powerpc/include/asm/page.h b/arch/powerpc/include/asm/page.h
index f072e97..2cba08a 100644
--- a/arch/powerpc/include/asm/page.h
+++ b/arch/powerpc/include/asm/page.h
@@ -112,6 +112,8 @@  extern long long virt_phys_offset;
 /* See Description below for VIRT_PHYS_OFFSET */
 #ifdef CONFIG_RELOCATABLE_PPC32
 #define VIRT_PHYS_OFFSET virt_phys_offset
+#elif defined(CONFIG_PPC_BOOK3E_64)
+#define VIRT_PHYS_OFFSET (KERNELBASE - MEMORY_START)
 #else
 #define VIRT_PHYS_OFFSET (KERNELBASE - PHYSICAL_START)
 #endif