[PATCH 2/4] Make PAGE_OFFSET aware of PHYS_OFFSET

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

 



From: Franck Bui-Huu <fbuihuu@xxxxxxxxx>

For platforms that use PHYS_OFFSET and do not use a mapped kernel,
this patch automatically adds PHYS_OFFSET into PAGE_OFFSET.
Therefore there are no more needs for them to redefine PAGE_OFFSET.

For mapped kernel, they need to redefine PAGE_OFFSET anyways.

Signed-off-by: Franck Bui-Huu <fbuihuu@xxxxxxxxx>
---
 include/asm-mips/mach-generic/spaces.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/asm-mips/mach-generic/spaces.h b/include/asm-mips/mach-generic/spaces.h
index 9a3c521..512bca5 100644
--- a/include/asm-mips/mach-generic/spaces.h
+++ b/include/asm-mips/mach-generic/spaces.h
@@ -26,7 +26,7 @@
  * We handle pages at KSEG0 for kernels with 32 bit address space.
  */
 #ifndef PAGE_OFFSET
-#define PAGE_OFFSET		0x80000000UL
+#define PAGE_OFFSET		(0x80000000UL + PHYS_OFFSET)
 #endif
 
 /*
@@ -45,9 +45,9 @@
  */
 #ifndef PAGE_OFFSET
 #ifdef CONFIG_DMA_NONCOHERENT
-#define PAGE_OFFSET	0x9800000000000000UL
+#define PAGE_OFFSET		(0x9800000000000000UL + PHYS_OFFSET)
 #else
-#define PAGE_OFFSET	0xa800000000000000UL
+#define PAGE_OFFSET		(0xa800000000000000UL + PHYS_OFFSET)
 #endif
 #endif
 
-- 
1.5.1.rc1.27.g1d848



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

  Powered by Linux