All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC 0/5] runtime P2V translations
@ 2011-01-04 20:20 ` Russell King - ARM Linux
  0 siblings, 0 replies; 72+ messages in thread
From: Russell King - ARM Linux @ 2011-01-04 20:20 UTC (permalink / raw)
  To: Nicolas Pitre
  Cc: Viresh Kumar, linux-sh, Kevin Hilman, Anton Vorontsov,
	Lennert Buytenhek, Kukjin Kim, Vincent Sanders, Hans J. Koch,
	Magnus Damm, Scott Branden, Marc Singer, Tony Lindgren,
	David Brown, Alessandro Rubini, Amit Kucheria, Sascha Hauer,
	Wan ZongShun, linux-arm-msm, STEricsson, Ryan Mallon,
	linux-samsung-soc, Ben Dooks, linux-tegra, linux-omap

Here's my solution to this, which should allow it to be used on almost
all platforms, including MSM, with the exception of Realview when
SPARSEMEM is enabled.

^ permalink raw reply	[flat|nested] 72+ messages in thread

* [RFC 0/5] runtime P2V translations
@ 2011-01-04 20:20 ` Russell King - ARM Linux
  0 siblings, 0 replies; 72+ messages in thread
From: Russell King - ARM Linux @ 2011-01-04 20:20 UTC (permalink / raw)
  To: linux-arm-kernel

Here's my solution to this, which should allow it to be used on almost
all platforms, including MSM, with the exception of Realview when
SPARSEMEM is enabled.

^ permalink raw reply	[flat|nested] 72+ messages in thread

* [RFC 1/5] ARM: P2V: separate PHYS_OFFSET from platform definitions
  2011-01-04 20:20 ` Russell King - ARM Linux
@ 2011-01-04 20:22   ` Russell King - ARM Linux
  -1 siblings, 0 replies; 72+ messages in thread
From: Russell King - ARM Linux @ 2011-01-04 20:22 UTC (permalink / raw)
  To: Nicolas Pitre
  Cc: Viresh Kumar, Srinidhi Kasagar, Kevin Hilman, Anton Vorontsov,
	Lennert Buytenhek, Kukjin Kim, Erik Gilling, linux-sh,
	Vincent Sanders, Hans J. Koch, Magnus Damm, Marc Singer,
	Tony Lindgren, David Brown, Alessandro Rubini, Jiandong Zheng,
	Wan ZongShun, linux-arm-msm, Olof Johansson, Ryan Mallon,
	linux-samsung-soc, Ben Dooks, linux-tegra, linux-omap,
	linux-arm-kernel

This uncouple PHYS_OFFSET from the platform definitions, thereby
facilitating run-time computation of the physical memory offset.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/include/asm/memory.h                  |    2 ++
 arch/arm/kernel/tcm.c                          |    2 +-
 arch/arm/mach-aaec2000/include/mach/memory.h   |    2 +-
 arch/arm/mach-at91/include/mach/memory.h       |    2 +-
 arch/arm/mach-bcmring/include/mach/hardware.h  |    2 +-
 arch/arm/mach-bcmring/include/mach/memory.h    |    2 +-
 arch/arm/mach-clps711x/include/mach/memory.h   |    2 +-
 arch/arm/mach-cns3xxx/include/mach/memory.h    |    2 +-
 arch/arm/mach-davinci/include/mach/memory.h    |    4 ++--
 arch/arm/mach-dove/include/mach/memory.h       |    2 +-
 arch/arm/mach-ebsa110/include/mach/memory.h    |    2 +-
 arch/arm/mach-ep93xx/include/mach/memory.h     |   10 +++++-----
 arch/arm/mach-footbridge/include/mach/memory.h |    2 +-
 arch/arm/mach-h720x/include/mach/memory.h      |    2 +-
 arch/arm/mach-integrator/include/mach/memory.h |    2 +-
 arch/arm/mach-iop13xx/include/mach/memory.h    |    2 +-
 arch/arm/mach-iop32x/include/mach/memory.h     |    2 +-
 arch/arm/mach-iop33x/include/mach/memory.h     |    2 +-
 arch/arm/mach-ixp2000/include/mach/memory.h    |    2 +-
 arch/arm/mach-ixp23xx/include/mach/memory.h    |    2 +-
 arch/arm/mach-ixp4xx/include/mach/memory.h     |    2 +-
 arch/arm/mach-kirkwood/include/mach/memory.h   |    2 +-
 arch/arm/mach-ks8695/include/mach/memory.h     |    2 +-
 arch/arm/mach-lh7a40x/include/mach/memory.h    |    2 +-
 arch/arm/mach-loki/include/mach/memory.h       |    2 +-
 arch/arm/mach-lpc32xx/include/mach/memory.h    |    2 +-
 arch/arm/mach-mmp/include/mach/memory.h        |    2 +-
 arch/arm/mach-msm/board-msm7x30.c              |    2 +-
 arch/arm/mach-msm/include/mach/memory.h        |   10 +++++-----
 arch/arm/mach-mv78xx0/include/mach/memory.h    |    2 +-
 arch/arm/mach-mx3/mach-kzm_arm11_01.c          |    2 +-
 arch/arm/mach-netx/include/mach/memory.h       |    2 +-
 arch/arm/mach-nomadik/include/mach/memory.h    |    2 +-
 arch/arm/mach-ns9xxx/include/mach/memory.h     |    2 +-
 arch/arm/mach-nuc93x/include/mach/memory.h     |    2 +-
 arch/arm/mach-orion5x/include/mach/memory.h    |    2 +-
 arch/arm/mach-pnx4008/include/mach/memory.h    |    2 +-
 arch/arm/mach-pxa/include/mach/memory.h        |    2 +-
 arch/arm/mach-realview/include/mach/memory.h   |    4 ++--
 arch/arm/mach-rpc/include/mach/memory.h        |    2 +-
 arch/arm/mach-s3c2400/include/mach/memory.h    |    2 +-
 arch/arm/mach-s3c2410/include/mach/memory.h    |    2 +-
 arch/arm/mach-s3c24a0/include/mach/memory.h    |    2 +-
 arch/arm/mach-s3c64xx/include/mach/memory.h    |    2 +-
 arch/arm/mach-s5p6442/include/mach/memory.h    |    2 +-
 arch/arm/mach-s5p64x0/include/mach/memory.h    |    2 +-
 arch/arm/mach-s5pc100/include/mach/memory.h    |    2 +-
 arch/arm/mach-s5pv210/include/mach/memory.h    |    2 +-
 arch/arm/mach-s5pv310/include/mach/memory.h    |    2 +-
 arch/arm/mach-sa1100/include/mach/memory.h     |    2 +-
 arch/arm/mach-shark/include/mach/memory.h      |    2 +-
 arch/arm/mach-shmobile/include/mach/memory.h   |    2 +-
 arch/arm/mach-tegra/include/mach/memory.h      |    2 +-
 arch/arm/mach-u300/include/mach/memory.h       |    6 +++---
 arch/arm/mach-u300/u300.c                      |    2 +-
 arch/arm/mach-ux500/include/mach/memory.h      |    2 +-
 arch/arm/mach-versatile/include/mach/memory.h  |    2 +-
 arch/arm/mach-vexpress/include/mach/memory.h   |    2 +-
 arch/arm/mach-w90x900/include/mach/memory.h    |    2 +-
 arch/arm/plat-omap/include/plat/memory.h       |    4 ++--
 arch/arm/plat-spear/include/plat/memory.h      |    2 +-
 arch/arm/plat-stmp3xxx/include/mach/memory.h   |    2 +-
 arch/arm/plat-tcc/include/mach/memory.h        |    2 +-
 63 files changed, 77 insertions(+), 75 deletions(-)

diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
index 23c2e8e..00b04ae 100644
--- a/arch/arm/include/asm/memory.h
+++ b/arch/arm/include/asm/memory.h
@@ -24,6 +24,8 @@
  */
 #define UL(x) _AC(x, UL)
 
+#define PHYS_OFFSET	PLAT_PHYS_OFFSET
+
 #ifdef CONFIG_MMU
 
 /*
diff --git a/arch/arm/kernel/tcm.c b/arch/arm/kernel/tcm.c
index 26685c2..f5cf660 100644
--- a/arch/arm/kernel/tcm.c
+++ b/arch/arm/kernel/tcm.c
@@ -15,7 +15,7 @@
 #include <linux/string.h> /* memcpy */
 #include <asm/cputype.h>
 #include <asm/mach/map.h>
-#include <mach/memory.h>
+#include <asm/memory.h>
 #include "tcm.h"
 
 static struct gen_pool *tcm_pool;
diff --git a/arch/arm/mach-aaec2000/include/mach/memory.h b/arch/arm/mach-aaec2000/include/mach/memory.h
index 4f93c56..4a10bf0 100644
--- a/arch/arm/mach-aaec2000/include/mach/memory.h
+++ b/arch/arm/mach-aaec2000/include/mach/memory.h
@@ -12,6 +12,6 @@
 #define __ASM_ARCH_MEMORY_H
 
 
-#define PHYS_OFFSET	UL(0xf0000000)
+#define PLAT_PHYS_OFFSET	UL(0xf0000000)
 
 #endif /* __ASM_ARCH_MEMORY_H */
diff --git a/arch/arm/mach-at91/include/mach/memory.h b/arch/arm/mach-at91/include/mach/memory.h
index 14f4ef4..c2cfe50 100644
--- a/arch/arm/mach-at91/include/mach/memory.h
+++ b/arch/arm/mach-at91/include/mach/memory.h
@@ -23,6 +23,6 @@
 
 #include <mach/hardware.h>
 
-#define PHYS_OFFSET	(AT91_SDRAM_BASE)
+#define PLAT_PHYS_OFFSET	(AT91_SDRAM_BASE)
 
 #endif
diff --git a/arch/arm/mach-bcmring/include/mach/hardware.h b/arch/arm/mach-bcmring/include/mach/hardware.h
index 447eb34..8bf3564 100644
--- a/arch/arm/mach-bcmring/include/mach/hardware.h
+++ b/arch/arm/mach-bcmring/include/mach/hardware.h
@@ -31,7 +31,7 @@
  *  *_SIZE  is the size of the region
  *  *_BASE  is the virtual address
  */
-#define RAM_START               PHYS_OFFSET
+#define RAM_START               PLAT_PHYS_OFFSET
 
 #define RAM_SIZE                (CFG_GLOBAL_RAM_SIZE-CFG_GLOBAL_RAM_SIZE_RESERVED)
 #define RAM_BASE                PAGE_OFFSET
diff --git a/arch/arm/mach-bcmring/include/mach/memory.h b/arch/arm/mach-bcmring/include/mach/memory.h
index 114f942..15162e4 100644
--- a/arch/arm/mach-bcmring/include/mach/memory.h
+++ b/arch/arm/mach-bcmring/include/mach/memory.h
@@ -23,7 +23,7 @@
  * files.  Use virt_to_phys/phys_to_virt/__pa/__va instead.
  */
 
-#define PHYS_OFFSET CFG_GLOBAL_RAM_BASE
+#define PLAT_PHYS_OFFSET CFG_GLOBAL_RAM_BASE
 
 /*
  * Maximum DMA memory allowed is 14M
diff --git a/arch/arm/mach-clps711x/include/mach/memory.h b/arch/arm/mach-clps711x/include/mach/memory.h
index f45c8e8..3a032a6 100644
--- a/arch/arm/mach-clps711x/include/mach/memory.h
+++ b/arch/arm/mach-clps711x/include/mach/memory.h
@@ -23,7 +23,7 @@
 /*
  * Physical DRAM offset.
  */
-#define PHYS_OFFSET	UL(0xc0000000)
+#define PLAT_PHYS_OFFSET	UL(0xc0000000)
 
 #if !defined(CONFIG_ARCH_CDB89712) && !defined (CONFIG_ARCH_AUTCPU12)
 
diff --git a/arch/arm/mach-cns3xxx/include/mach/memory.h b/arch/arm/mach-cns3xxx/include/mach/memory.h
index 3b6b769..dc16c5c 100644
--- a/arch/arm/mach-cns3xxx/include/mach/memory.h
+++ b/arch/arm/mach-cns3xxx/include/mach/memory.h
@@ -13,7 +13,7 @@
 /*
  * Physical DRAM offset.
  */
-#define PHYS_OFFSET		UL(0x00000000)
+#define PLAT_PHYS_OFFSET		UL(0x00000000)
 
 #define __phys_to_bus(x)	((x) + PHYS_OFFSET)
 #define __bus_to_phys(x)	((x) - PHYS_OFFSET)
diff --git a/arch/arm/mach-davinci/include/mach/memory.h b/arch/arm/mach-davinci/include/mach/memory.h
index 22eb97c..7882272 100644
--- a/arch/arm/mach-davinci/include/mach/memory.h
+++ b/arch/arm/mach-davinci/include/mach/memory.h
@@ -26,9 +26,9 @@
 #if defined(CONFIG_ARCH_DAVINCI_DA8XX) && defined(CONFIG_ARCH_DAVINCI_DMx)
 #error Cannot enable DaVinci and DA8XX platforms concurrently
 #elif defined(CONFIG_ARCH_DAVINCI_DA8XX)
-#define PHYS_OFFSET DA8XX_DDR_BASE
+#define PLAT_PHYS_OFFSET DA8XX_DDR_BASE
 #else
-#define PHYS_OFFSET DAVINCI_DDR_BASE
+#define PLAT_PHYS_OFFSET DAVINCI_DDR_BASE
 #endif
 
 #define DDR2_SDRCR_OFFSET	0xc
diff --git a/arch/arm/mach-dove/include/mach/memory.h b/arch/arm/mach-dove/include/mach/memory.h
index d668720..bbc93fe 100644
--- a/arch/arm/mach-dove/include/mach/memory.h
+++ b/arch/arm/mach-dove/include/mach/memory.h
@@ -5,6 +5,6 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-#define PHYS_OFFSET		UL(0x00000000)
+#define PLAT_PHYS_OFFSET		UL(0x00000000)
 
 #endif
diff --git a/arch/arm/mach-ebsa110/include/mach/memory.h b/arch/arm/mach-ebsa110/include/mach/memory.h
index 0ca66d0..8e49066 100644
--- a/arch/arm/mach-ebsa110/include/mach/memory.h
+++ b/arch/arm/mach-ebsa110/include/mach/memory.h
@@ -19,7 +19,7 @@
 /*
  * Physical DRAM offset.
  */
-#define PHYS_OFFSET	UL(0x00000000)
+#define PLAT_PHYS_OFFSET	UL(0x00000000)
 
 /*
  * Cache flushing area - SRAM
diff --git a/arch/arm/mach-ep93xx/include/mach/memory.h b/arch/arm/mach-ep93xx/include/mach/memory.h
index 554064e..c9400cf 100644
--- a/arch/arm/mach-ep93xx/include/mach/memory.h
+++ b/arch/arm/mach-ep93xx/include/mach/memory.h
@@ -6,15 +6,15 @@
 #define __ASM_ARCH_MEMORY_H
 
 #if defined(CONFIG_EP93XX_SDCE3_SYNC_PHYS_OFFSET)
-#define PHYS_OFFSET		UL(0x00000000)
+#define PLAT_PHYS_OFFSET		UL(0x00000000)
 #elif defined(CONFIG_EP93XX_SDCE0_PHYS_OFFSET)
-#define PHYS_OFFSET		UL(0xc0000000)
+#define PLAT_PHYS_OFFSET		UL(0xc0000000)
 #elif defined(CONFIG_EP93XX_SDCE1_PHYS_OFFSET)
-#define PHYS_OFFSET		UL(0xd0000000)
+#define PLAT_PHYS_OFFSET		UL(0xd0000000)
 #elif defined(CONFIG_EP93XX_SDCE2_PHYS_OFFSET)
-#define PHYS_OFFSET		UL(0xe0000000)
+#define PLAT_PHYS_OFFSET		UL(0xe0000000)
 #elif defined(CONFIG_EP93XX_SDCE3_ASYNC_PHYS_OFFSET)
-#define PHYS_OFFSET		UL(0xf0000000)
+#define PLAT_PHYS_OFFSET		UL(0xf0000000)
 #else
 #error "Kconfig bug: No EP93xx PHYS_OFFSET set"
 #endif
diff --git a/arch/arm/mach-footbridge/include/mach/memory.h b/arch/arm/mach-footbridge/include/mach/memory.h
index 8d64f45..5c6df37 100644
--- a/arch/arm/mach-footbridge/include/mach/memory.h
+++ b/arch/arm/mach-footbridge/include/mach/memory.h
@@ -62,7 +62,7 @@ extern unsigned long __bus_to_pfn(unsigned long);
 /*
  * Physical DRAM offset.
  */
-#define PHYS_OFFSET		UL(0x00000000)
+#define PLAT_PHYS_OFFSET		UL(0x00000000)
 
 #define FLUSH_BASE_PHYS		0x50000000
 
diff --git a/arch/arm/mach-h720x/include/mach/memory.h b/arch/arm/mach-h720x/include/mach/memory.h
index ef4c1e2..9d36876 100644
--- a/arch/arm/mach-h720x/include/mach/memory.h
+++ b/arch/arm/mach-h720x/include/mach/memory.h
@@ -7,7 +7,7 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-#define PHYS_OFFSET	UL(0x40000000)
+#define PLAT_PHYS_OFFSET	UL(0x40000000)
 /*
  * This is the maximum DMA address that can be DMAd to.
  * There should not be more than (0xd0000000 - 0xc0000000)
diff --git a/arch/arm/mach-integrator/include/mach/memory.h b/arch/arm/mach-integrator/include/mach/memory.h
index 991f24d..334d5e2 100644
--- a/arch/arm/mach-integrator/include/mach/memory.h
+++ b/arch/arm/mach-integrator/include/mach/memory.h
@@ -23,7 +23,7 @@
 /*
  * Physical DRAM offset.
  */
-#define PHYS_OFFSET	UL(0x00000000)
+#define PLAT_PHYS_OFFSET	UL(0x00000000)
 
 #define BUS_OFFSET	UL(0x80000000)
 #define __virt_to_bus(x)	((x) - PAGE_OFFSET + BUS_OFFSET)
diff --git a/arch/arm/mach-iop13xx/include/mach/memory.h b/arch/arm/mach-iop13xx/include/mach/memory.h
index 3ad4553..1afa99e 100644
--- a/arch/arm/mach-iop13xx/include/mach/memory.h
+++ b/arch/arm/mach-iop13xx/include/mach/memory.h
@@ -6,7 +6,7 @@
 /*
  * Physical DRAM offset.
  */
-#define PHYS_OFFSET	UL(0x00000000)
+#define PLAT_PHYS_OFFSET	UL(0x00000000)
 
 #ifndef __ASSEMBLY__
 
diff --git a/arch/arm/mach-iop32x/include/mach/memory.h b/arch/arm/mach-iop32x/include/mach/memory.h
index c30f645..169cc23 100644
--- a/arch/arm/mach-iop32x/include/mach/memory.h
+++ b/arch/arm/mach-iop32x/include/mach/memory.h
@@ -8,6 +8,6 @@
 /*
  * Physical DRAM offset.
  */
-#define PHYS_OFFSET	UL(0xa0000000)
+#define PLAT_PHYS_OFFSET	UL(0xa0000000)
 
 #endif
diff --git a/arch/arm/mach-iop33x/include/mach/memory.h b/arch/arm/mach-iop33x/include/mach/memory.h
index a30a96a..8e1daf7 100644
--- a/arch/arm/mach-iop33x/include/mach/memory.h
+++ b/arch/arm/mach-iop33x/include/mach/memory.h
@@ -8,6 +8,6 @@
 /*
  * Physical DRAM offset.
  */
-#define PHYS_OFFSET	UL(0x00000000)
+#define PLAT_PHYS_OFFSET	UL(0x00000000)
 
 #endif
diff --git a/arch/arm/mach-ixp2000/include/mach/memory.h b/arch/arm/mach-ixp2000/include/mach/memory.h
index 98e3471..5f0c4fd 100644
--- a/arch/arm/mach-ixp2000/include/mach/memory.h
+++ b/arch/arm/mach-ixp2000/include/mach/memory.h
@@ -13,7 +13,7 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-#define PHYS_OFFSET	UL(0x00000000)
+#define PLAT_PHYS_OFFSET	UL(0x00000000)
 
 #include <mach/ixp2000-regs.h>
 
diff --git a/arch/arm/mach-ixp23xx/include/mach/memory.h b/arch/arm/mach-ixp23xx/include/mach/memory.h
index 6ef65d8..6cf0704 100644
--- a/arch/arm/mach-ixp23xx/include/mach/memory.h
+++ b/arch/arm/mach-ixp23xx/include/mach/memory.h
@@ -17,7 +17,7 @@
 /*
  * Physical DRAM offset.
  */
-#define PHYS_OFFSET		(0x00000000)
+#define PLAT_PHYS_OFFSET		(0x00000000)
 
 #define IXP23XX_PCI_SDRAM_OFFSET (*((volatile int *)IXP23XX_PCI_SDRAM_BAR) & 0xfffffff0)
 
diff --git a/arch/arm/mach-ixp4xx/include/mach/memory.h b/arch/arm/mach-ixp4xx/include/mach/memory.h
index 0136eaa..6d388c9 100644
--- a/arch/arm/mach-ixp4xx/include/mach/memory.h
+++ b/arch/arm/mach-ixp4xx/include/mach/memory.h
@@ -12,7 +12,7 @@
 /*
  * Physical DRAM offset.
  */
-#define PHYS_OFFSET	UL(0x00000000)
+#define PLAT_PHYS_OFFSET	UL(0x00000000)
 
 #if !defined(__ASSEMBLY__) && defined(CONFIG_PCI)
 
diff --git a/arch/arm/mach-kirkwood/include/mach/memory.h b/arch/arm/mach-kirkwood/include/mach/memory.h
index 45431e1..4600b44 100644
--- a/arch/arm/mach-kirkwood/include/mach/memory.h
+++ b/arch/arm/mach-kirkwood/include/mach/memory.h
@@ -5,6 +5,6 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-#define PHYS_OFFSET		UL(0x00000000)
+#define PLAT_PHYS_OFFSET		UL(0x00000000)
 
 #endif
diff --git a/arch/arm/mach-ks8695/include/mach/memory.h b/arch/arm/mach-ks8695/include/mach/memory.h
index bace9a6..f7e1b9b 100644
--- a/arch/arm/mach-ks8695/include/mach/memory.h
+++ b/arch/arm/mach-ks8695/include/mach/memory.h
@@ -18,7 +18,7 @@
 /*
  * Physical SRAM offset.
  */
-#define PHYS_OFFSET		KS8695_SDRAM_PA
+#define PLAT_PHYS_OFFSET		KS8695_SDRAM_PA
 
 #ifndef __ASSEMBLY__
 
diff --git a/arch/arm/mach-lh7a40x/include/mach/memory.h b/arch/arm/mach-lh7a40x/include/mach/memory.h
index edb8f5f..f77bde8 100644
--- a/arch/arm/mach-lh7a40x/include/mach/memory.h
+++ b/arch/arm/mach-lh7a40x/include/mach/memory.h
@@ -17,7 +17,7 @@
 /*
  * Physical DRAM offset.
  */
-#define PHYS_OFFSET	UL(0xc0000000)
+#define PLAT_PHYS_OFFSET	UL(0xc0000000)
 
 /*
  * Sparsemem version of the above
diff --git a/arch/arm/mach-loki/include/mach/memory.h b/arch/arm/mach-loki/include/mach/memory.h
index 2ed7e6e..6636665 100644
--- a/arch/arm/mach-loki/include/mach/memory.h
+++ b/arch/arm/mach-loki/include/mach/memory.h
@@ -5,6 +5,6 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-#define PHYS_OFFSET		UL(0x00000000)
+#define PLAT_PHYS_OFFSET		UL(0x00000000)
 
 #endif
diff --git a/arch/arm/mach-lpc32xx/include/mach/memory.h b/arch/arm/mach-lpc32xx/include/mach/memory.h
index 044e1ac..a647dd6 100644
--- a/arch/arm/mach-lpc32xx/include/mach/memory.h
+++ b/arch/arm/mach-lpc32xx/include/mach/memory.h
@@ -22,6 +22,6 @@
 /*
  * Physical DRAM offset of bank 0
  */
-#define PHYS_OFFSET	UL(0x80000000)
+#define PLAT_PHYS_OFFSET	UL(0x80000000)
 
 #endif
diff --git a/arch/arm/mach-mmp/include/mach/memory.h b/arch/arm/mach-mmp/include/mach/memory.h
index bdb21d7..d68b50a 100644
--- a/arch/arm/mach-mmp/include/mach/memory.h
+++ b/arch/arm/mach-mmp/include/mach/memory.h
@@ -9,6 +9,6 @@
 #ifndef __ASM_MACH_MEMORY_H
 #define __ASM_MACH_MEMORY_H
 
-#define PHYS_OFFSET	UL(0x00000000)
+#define PLAT_PHYS_OFFSET	UL(0x00000000)
 
 #endif /* __ASM_MACH_MEMORY_H */
diff --git a/arch/arm/mach-msm/board-msm7x30.c b/arch/arm/mach-msm/board-msm7x30.c
index 05241df..1931e07 100644
--- a/arch/arm/mach-msm/board-msm7x30.c
+++ b/arch/arm/mach-msm/board-msm7x30.c
@@ -25,11 +25,11 @@
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
+#include <asm/memory.h>
 #include <asm/setup.h>
 
 #include <mach/gpio.h>
 #include <mach/board.h>
-#include <mach/memory.h>
 #include <mach/msm_iomap.h>
 #include <mach/dma.h>
 
diff --git a/arch/arm/mach-msm/include/mach/memory.h b/arch/arm/mach-msm/include/mach/memory.h
index 070e17d..176875d 100644
--- a/arch/arm/mach-msm/include/mach/memory.h
+++ b/arch/arm/mach-msm/include/mach/memory.h
@@ -18,15 +18,15 @@
 
 /* physical offset of RAM */
 #if defined(CONFIG_ARCH_QSD8X50) && defined(CONFIG_MSM_SOC_REV_A)
-#define PHYS_OFFSET		UL(0x00000000)
+#define PLAT_PHYS_OFFSET		UL(0x00000000)
 #elif defined(CONFIG_ARCH_QSD8X50)
-#define PHYS_OFFSET		UL(0x20000000)
+#define PLAT_PHYS_OFFSET		UL(0x20000000)
 #elif defined(CONFIG_ARCH_MSM7X30)
-#define PHYS_OFFSET		UL(0x00200000)
+#define PLAT_PHYS_OFFSET		UL(0x00200000)
 #elif defined(CONFIG_ARCH_MSM8X60)
-#define PHYS_OFFSET		UL(0x40200000)
+#define PLAT_PHYS_OFFSET		UL(0x40200000)
 #else
-#define PHYS_OFFSET		UL(0x10000000)
+#define PLAT_PHYS_OFFSET		UL(0x10000000)
 #endif
 
 #endif
diff --git a/arch/arm/mach-mv78xx0/include/mach/memory.h b/arch/arm/mach-mv78xx0/include/mach/memory.h
index e663042..a648c51 100644
--- a/arch/arm/mach-mv78xx0/include/mach/memory.h
+++ b/arch/arm/mach-mv78xx0/include/mach/memory.h
@@ -5,6 +5,6 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-#define PHYS_OFFSET		UL(0x00000000)
+#define PLAT_PHYS_OFFSET		UL(0x00000000)
 
 #endif
diff --git a/arch/arm/mach-mx3/mach-kzm_arm11_01.c b/arch/arm/mach-mx3/mach-kzm_arm11_01.c
index 042cd56..d8ebde8 100644
--- a/arch/arm/mach-mx3/mach-kzm_arm11_01.c
+++ b/arch/arm/mach-mx3/mach-kzm_arm11_01.c
@@ -27,6 +27,7 @@
 
 #include <asm/irq.h>
 #include <asm/mach-types.h>
+#include <asm/memory.h>
 #include <asm/setup.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/irq.h>
@@ -36,7 +37,6 @@
 #include <mach/clock.h>
 #include <mach/common.h>
 #include <mach/iomux-mx3.h>
-#include <mach/memory.h>
 
 #include "devices-imx31.h"
 #include "devices.h"
diff --git a/arch/arm/mach-netx/include/mach/memory.h b/arch/arm/mach-netx/include/mach/memory.h
index 9a363f2..5956149 100644
--- a/arch/arm/mach-netx/include/mach/memory.h
+++ b/arch/arm/mach-netx/include/mach/memory.h
@@ -20,7 +20,7 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-#define PHYS_OFFSET UL(0x80000000)
+#define PLAT_PHYS_OFFSET UL(0x80000000)
 
 #endif
 
diff --git a/arch/arm/mach-nomadik/include/mach/memory.h b/arch/arm/mach-nomadik/include/mach/memory.h
index 1e5689d..d332521 100644
--- a/arch/arm/mach-nomadik/include/mach/memory.h
+++ b/arch/arm/mach-nomadik/include/mach/memory.h
@@ -23,6 +23,6 @@
 /*
  * Physical DRAM offset.
  */
-#define PHYS_OFFSET	UL(0x00000000)
+#define PLAT_PHYS_OFFSET	UL(0x00000000)
 
 #endif
diff --git a/arch/arm/mach-ns9xxx/include/mach/memory.h b/arch/arm/mach-ns9xxx/include/mach/memory.h
index 6107193..5c65aee 100644
--- a/arch/arm/mach-ns9xxx/include/mach/memory.h
+++ b/arch/arm/mach-ns9xxx/include/mach/memory.h
@@ -19,6 +19,6 @@
 #define NS9XXX_CS2STAT_LENGTH	UL(0x1000)
 #define NS9XXX_CS3STAT_LENGTH	UL(0x1000)
 
-#define PHYS_OFFSET	UL(0x00000000)
+#define PLAT_PHYS_OFFSET	UL(0x00000000)
 
 #endif
diff --git a/arch/arm/mach-nuc93x/include/mach/memory.h b/arch/arm/mach-nuc93x/include/mach/memory.h
index 323ab0d..ef9864b 100644
--- a/arch/arm/mach-nuc93x/include/mach/memory.h
+++ b/arch/arm/mach-nuc93x/include/mach/memory.h
@@ -16,6 +16,6 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-#define PHYS_OFFSET	UL(0x00000000)
+#define PLAT_PHYS_OFFSET	UL(0x00000000)
 
 #endif
diff --git a/arch/arm/mach-orion5x/include/mach/memory.h b/arch/arm/mach-orion5x/include/mach/memory.h
index 52a2955..6769917 100644
--- a/arch/arm/mach-orion5x/include/mach/memory.h
+++ b/arch/arm/mach-orion5x/include/mach/memory.h
@@ -7,6 +7,6 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-#define PHYS_OFFSET	UL(0x00000000)
+#define PLAT_PHYS_OFFSET	UL(0x00000000)
 
 #endif
diff --git a/arch/arm/mach-pnx4008/include/mach/memory.h b/arch/arm/mach-pnx4008/include/mach/memory.h
index 0e87700..1275db6 100644
--- a/arch/arm/mach-pnx4008/include/mach/memory.h
+++ b/arch/arm/mach-pnx4008/include/mach/memory.h
@@ -16,6 +16,6 @@
 /*
  * Physical DRAM offset.
  */
-#define PHYS_OFFSET	UL(0x80000000)
+#define PLAT_PHYS_OFFSET	UL(0x80000000)
 
 #endif
diff --git a/arch/arm/mach-pxa/include/mach/memory.h b/arch/arm/mach-pxa/include/mach/memory.h
index 92361a6..7f68724 100644
--- a/arch/arm/mach-pxa/include/mach/memory.h
+++ b/arch/arm/mach-pxa/include/mach/memory.h
@@ -15,7 +15,7 @@
 /*
  * Physical DRAM offset.
  */
-#define PHYS_OFFSET	UL(0xa0000000)
+#define PLAT_PHYS_OFFSET	UL(0xa0000000)
 
 #if !defined(__ASSEMBLY__) && defined(CONFIG_MACH_ARMCORE) && defined(CONFIG_PCI)
 void cmx2xx_pci_adjust_zones(unsigned long *size, unsigned long *holes);
diff --git a/arch/arm/mach-realview/include/mach/memory.h b/arch/arm/mach-realview/include/mach/memory.h
index 5dafc15..e05fc2c 100644
--- a/arch/arm/mach-realview/include/mach/memory.h
+++ b/arch/arm/mach-realview/include/mach/memory.h
@@ -24,9 +24,9 @@
  * Physical DRAM offset.
  */
 #ifdef CONFIG_REALVIEW_HIGH_PHYS_OFFSET
-#define PHYS_OFFSET		UL(0x70000000)
+#define PLAT_PHYS_OFFSET		UL(0x70000000)
 #else
-#define PHYS_OFFSET		UL(0x00000000)
+#define PLAT_PHYS_OFFSET		UL(0x00000000)
 #endif
 
 #if !defined(__ASSEMBLY__) && defined(CONFIG_ZONE_DMA)
diff --git a/arch/arm/mach-rpc/include/mach/memory.h b/arch/arm/mach-rpc/include/mach/memory.h
index 78191bf..18a2210 100644
--- a/arch/arm/mach-rpc/include/mach/memory.h
+++ b/arch/arm/mach-rpc/include/mach/memory.h
@@ -21,7 +21,7 @@
 /*
  * Physical DRAM offset.
  */
-#define PHYS_OFFSET	UL(0x10000000)
+#define PLAT_PHYS_OFFSET	UL(0x10000000)
 
 /*
  * Cache flushing area - ROM
diff --git a/arch/arm/mach-s3c2400/include/mach/memory.h b/arch/arm/mach-s3c2400/include/mach/memory.h
index cf5901f..3f33670 100644
--- a/arch/arm/mach-s3c2400/include/mach/memory.h
+++ b/arch/arm/mach-s3c2400/include/mach/memory.h
@@ -15,6 +15,6 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-#define PHYS_OFFSET	UL(0x0C000000)
+#define PLAT_PHYS_OFFSET	UL(0x0C000000)
 
 #endif
diff --git a/arch/arm/mach-s3c2410/include/mach/memory.h b/arch/arm/mach-s3c2410/include/mach/memory.h
index 6f1e587..f92b97b 100644
--- a/arch/arm/mach-s3c2410/include/mach/memory.h
+++ b/arch/arm/mach-s3c2410/include/mach/memory.h
@@ -11,6 +11,6 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-#define PHYS_OFFSET	UL(0x30000000)
+#define PLAT_PHYS_OFFSET	UL(0x30000000)
 
 #endif
diff --git a/arch/arm/mach-s3c24a0/include/mach/memory.h b/arch/arm/mach-s3c24a0/include/mach/memory.h
index 7d74fd5..7d208a7 100644
--- a/arch/arm/mach-s3c24a0/include/mach/memory.h
+++ b/arch/arm/mach-s3c24a0/include/mach/memory.h
@@ -11,7 +11,7 @@
 #ifndef __ASM_ARCH_24A0_MEMORY_H
 #define __ASM_ARCH_24A0_MEMORY_H __FILE__
 
-#define PHYS_OFFSET UL(0x10000000)
+#define PLAT_PHYS_OFFSET UL(0x10000000)
 
 #define __virt_to_bus(x) __virt_to_phys(x)
 #define __bus_to_virt(x) __phys_to_virt(x)
diff --git a/arch/arm/mach-s3c64xx/include/mach/memory.h b/arch/arm/mach-s3c64xx/include/mach/memory.h
index 42cc54e..4760cda 100644
--- a/arch/arm/mach-s3c64xx/include/mach/memory.h
+++ b/arch/arm/mach-s3c64xx/include/mach/memory.h
@@ -13,7 +13,7 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-#define PHYS_OFFSET     UL(0x50000000)
+#define PLAT_PHYS_OFFSET     UL(0x50000000)
 
 #define CONSISTENT_DMA_SIZE	SZ_8M
 
diff --git a/arch/arm/mach-s5p6442/include/mach/memory.h b/arch/arm/mach-s5p6442/include/mach/memory.h
index 9ddd877..cfe259d 100644
--- a/arch/arm/mach-s5p6442/include/mach/memory.h
+++ b/arch/arm/mach-s5p6442/include/mach/memory.h
@@ -13,7 +13,7 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-#define PHYS_OFFSET		UL(0x20000000)
+#define PLAT_PHYS_OFFSET		UL(0x20000000)
 #define CONSISTENT_DMA_SIZE	SZ_8M
 
 #endif /* __ASM_ARCH_MEMORY_H */
diff --git a/arch/arm/mach-s5p64x0/include/mach/memory.h b/arch/arm/mach-s5p64x0/include/mach/memory.h
index 1b036b0..365a6eb 100644
--- a/arch/arm/mach-s5p64x0/include/mach/memory.h
+++ b/arch/arm/mach-s5p64x0/include/mach/memory.h
@@ -13,7 +13,7 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H __FILE__
 
-#define PHYS_OFFSET		UL(0x20000000)
+#define PLAT_PHYS_OFFSET		UL(0x20000000)
 #define CONSISTENT_DMA_SIZE	SZ_8M
 
 #endif /* __ASM_ARCH_MEMORY_H */
diff --git a/arch/arm/mach-s5pc100/include/mach/memory.h b/arch/arm/mach-s5pc100/include/mach/memory.h
index 4b60d18..bda4e79 100644
--- a/arch/arm/mach-s5pc100/include/mach/memory.h
+++ b/arch/arm/mach-s5pc100/include/mach/memory.h
@@ -13,6 +13,6 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-#define PHYS_OFFSET     	UL(0x20000000)
+#define PLAT_PHYS_OFFSET     	UL(0x20000000)
 
 #endif
diff --git a/arch/arm/mach-s5pv210/include/mach/memory.h b/arch/arm/mach-s5pv210/include/mach/memory.h
index d503e0c..7b5fcf0 100644
--- a/arch/arm/mach-s5pv210/include/mach/memory.h
+++ b/arch/arm/mach-s5pv210/include/mach/memory.h
@@ -13,7 +13,7 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-#define PHYS_OFFSET		UL(0x20000000)
+#define PLAT_PHYS_OFFSET		UL(0x20000000)
 #define CONSISTENT_DMA_SIZE	(SZ_8M + SZ_4M + SZ_2M)
 
 /*
diff --git a/arch/arm/mach-s5pv310/include/mach/memory.h b/arch/arm/mach-s5pv310/include/mach/memory.h
index 1dffb48..470b01b 100644
--- a/arch/arm/mach-s5pv310/include/mach/memory.h
+++ b/arch/arm/mach-s5pv310/include/mach/memory.h
@@ -13,7 +13,7 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H __FILE__
 
-#define PHYS_OFFSET		UL(0x40000000)
+#define PLAT_PHYS_OFFSET		UL(0x40000000)
 
 /* Maximum of 256MiB in one bank */
 #define MAX_PHYSMEM_BITS	32
diff --git a/arch/arm/mach-sa1100/include/mach/memory.h b/arch/arm/mach-sa1100/include/mach/memory.h
index 128a1df..a44da6a 100644
--- a/arch/arm/mach-sa1100/include/mach/memory.h
+++ b/arch/arm/mach-sa1100/include/mach/memory.h
@@ -12,7 +12,7 @@
 /*
  * Physical DRAM offset is 0xc0000000 on the SA1100
  */
-#define PHYS_OFFSET	UL(0xc0000000)
+#define PLAT_PHYS_OFFSET	UL(0xc0000000)
 
 #ifndef __ASSEMBLY__
 
diff --git a/arch/arm/mach-shark/include/mach/memory.h b/arch/arm/mach-shark/include/mach/memory.h
index d9c4812..9afb170 100644
--- a/arch/arm/mach-shark/include/mach/memory.h
+++ b/arch/arm/mach-shark/include/mach/memory.h
@@ -15,7 +15,7 @@
 /*
  * Physical DRAM offset.
  */
-#define PHYS_OFFSET     UL(0x08000000)
+#define PLAT_PHYS_OFFSET     UL(0x08000000)
 
 #ifndef __ASSEMBLY__
 
diff --git a/arch/arm/mach-shmobile/include/mach/memory.h b/arch/arm/mach-shmobile/include/mach/memory.h
index 377584e..ad00c3c 100644
--- a/arch/arm/mach-shmobile/include/mach/memory.h
+++ b/arch/arm/mach-shmobile/include/mach/memory.h
@@ -1,7 +1,7 @@
 #ifndef __ASM_MACH_MEMORY_H
 #define __ASM_MACH_MEMORY_H
 
-#define PHYS_OFFSET	UL(CONFIG_MEMORY_START)
+#define PLAT_PHYS_OFFSET	UL(CONFIG_MEMORY_START)
 #define MEM_SIZE	UL(CONFIG_MEMORY_SIZE)
 
 /* DMA memory at 0xf6000000 - 0xffdfffff */
diff --git a/arch/arm/mach-tegra/include/mach/memory.h b/arch/arm/mach-tegra/include/mach/memory.h
index 6151bab..537db3a 100644
--- a/arch/arm/mach-tegra/include/mach/memory.h
+++ b/arch/arm/mach-tegra/include/mach/memory.h
@@ -22,7 +22,7 @@
 #define __MACH_TEGRA_MEMORY_H
 
 /* physical offset of RAM */
-#define PHYS_OFFSET		UL(0)
+#define PLAT_PHYS_OFFSET		UL(0)
 
 #endif
 
diff --git a/arch/arm/mach-u300/include/mach/memory.h b/arch/arm/mach-u300/include/mach/memory.h
index bf134bc..888e2e3 100644
--- a/arch/arm/mach-u300/include/mach/memory.h
+++ b/arch/arm/mach-u300/include/mach/memory.h
@@ -15,17 +15,17 @@
 
 #ifdef CONFIG_MACH_U300_DUAL_RAM
 
-#define PHYS_OFFSET		UL(0x48000000)
+#define PLAT_PHYS_OFFSET		UL(0x48000000)
 #define BOOT_PARAMS_OFFSET	(PHYS_OFFSET + 0x100)
 
 #else
 
 #ifdef CONFIG_MACH_U300_2MB_ALIGNMENT_FIX
-#define PHYS_OFFSET (0x28000000 + \
+#define PLAT_PHYS_OFFSET (0x28000000 + \
 	     (CONFIG_MACH_U300_ACCESS_MEM_SIZE - \
 	     (CONFIG_MACH_U300_ACCESS_MEM_SIZE & 1))*1024*1024)
 #else
-#define PHYS_OFFSET (0x28000000 + \
+#define PLAT_PHYS_OFFSET (0x28000000 + \
 	     (CONFIG_MACH_U300_ACCESS_MEM_SIZE +	\
 	     (CONFIG_MACH_U300_ACCESS_MEM_SIZE & 1))*1024*1024)
 #endif
diff --git a/arch/arm/mach-u300/u300.c b/arch/arm/mach-u300/u300.c
index 07c35a8..48b3b7f 100644
--- a/arch/arm/mach-u300/u300.c
+++ b/arch/arm/mach-u300/u300.c
@@ -19,9 +19,9 @@
 #include <linux/io.h>
 #include <mach/hardware.h>
 #include <mach/platform.h>
-#include <mach/memory.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
+#include <asm/memory.h>
 
 static void __init u300_reserve(void)
 {
diff --git a/arch/arm/mach-ux500/include/mach/memory.h b/arch/arm/mach-ux500/include/mach/memory.h
index 510571a..2ef697a 100644
--- a/arch/arm/mach-ux500/include/mach/memory.h
+++ b/arch/arm/mach-ux500/include/mach/memory.h
@@ -12,7 +12,7 @@
 /*
  * Physical DRAM offset.
  */
-#define PHYS_OFFSET	UL(0x00000000)
+#define PLAT_PHYS_OFFSET	UL(0x00000000)
 #define BUS_OFFSET	UL(0x00000000)
 
 #endif
diff --git a/arch/arm/mach-versatile/include/mach/memory.h b/arch/arm/mach-versatile/include/mach/memory.h
index 79aeab8..dacc9d8 100644
--- a/arch/arm/mach-versatile/include/mach/memory.h
+++ b/arch/arm/mach-versatile/include/mach/memory.h
@@ -23,6 +23,6 @@
 /*
  * Physical DRAM offset.
  */
-#define PHYS_OFFSET	UL(0x00000000)
+#define PLAT_PHYS_OFFSET	UL(0x00000000)
 
 #endif
diff --git a/arch/arm/mach-vexpress/include/mach/memory.h b/arch/arm/mach-vexpress/include/mach/memory.h
index be28232..5b7fcd4 100644
--- a/arch/arm/mach-vexpress/include/mach/memory.h
+++ b/arch/arm/mach-vexpress/include/mach/memory.h
@@ -20,6 +20,6 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-#define PHYS_OFFSET		UL(0x60000000)
+#define PLAT_PHYS_OFFSET		UL(0x60000000)
 
 #endif
diff --git a/arch/arm/mach-w90x900/include/mach/memory.h b/arch/arm/mach-w90x900/include/mach/memory.h
index 971b807..f02905b 100644
--- a/arch/arm/mach-w90x900/include/mach/memory.h
+++ b/arch/arm/mach-w90x900/include/mach/memory.h
@@ -18,6 +18,6 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-#define PHYS_OFFSET	UL(0x00000000)
+#define PLAT_PHYS_OFFSET	UL(0x00000000)
 
 #endif
diff --git a/arch/arm/plat-omap/include/plat/memory.h b/arch/arm/plat-omap/include/plat/memory.h
index f8d922f..e6720aa 100644
--- a/arch/arm/plat-omap/include/plat/memory.h
+++ b/arch/arm/plat-omap/include/plat/memory.h
@@ -37,9 +37,9 @@
  * Physical DRAM offset.
  */
 #if defined(CONFIG_ARCH_OMAP1)
-#define PHYS_OFFSET		UL(0x10000000)
+#define PLAT_PHYS_OFFSET		UL(0x10000000)
 #else
-#define PHYS_OFFSET		UL(0x80000000)
+#define PLAT_PHYS_OFFSET		UL(0x80000000)
 #endif
 
 /*
diff --git a/arch/arm/plat-spear/include/plat/memory.h b/arch/arm/plat-spear/include/plat/memory.h
index 27a4aba..7e3599e 100644
--- a/arch/arm/plat-spear/include/plat/memory.h
+++ b/arch/arm/plat-spear/include/plat/memory.h
@@ -15,6 +15,6 @@
 #define __PLAT_MEMORY_H
 
 /* Physical DRAM offset */
-#define PHYS_OFFSET		UL(0x00000000)
+#define PLAT_PHYS_OFFSET		UL(0x00000000)
 
 #endif /* __PLAT_MEMORY_H */
diff --git a/arch/arm/plat-stmp3xxx/include/mach/memory.h b/arch/arm/plat-stmp3xxx/include/mach/memory.h
index 7b875a0..61fa548 100644
--- a/arch/arm/plat-stmp3xxx/include/mach/memory.h
+++ b/arch/arm/plat-stmp3xxx/include/mach/memory.h
@@ -17,6 +17,6 @@
 /*
  * Physical DRAM offset.
  */
-#define PHYS_OFFSET	UL(0x40000000)
+#define PLAT_PHYS_OFFSET	UL(0x40000000)
 
 #endif
diff --git a/arch/arm/plat-tcc/include/mach/memory.h b/arch/arm/plat-tcc/include/mach/memory.h
index cd91ba8..28a6e0c 100644
--- a/arch/arm/plat-tcc/include/mach/memory.h
+++ b/arch/arm/plat-tcc/include/mach/memory.h
@@ -13,6 +13,6 @@
 /*
  * Physical DRAM offset.
  */
-#define PHYS_OFFSET		UL(0x20000000)
+#define PLAT_PHYS_OFFSET		UL(0x20000000)
 
 #endif
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 72+ messages in thread

* [RFC 1/5] ARM: P2V: separate PHYS_OFFSET from platform definitions
@ 2011-01-04 20:22   ` Russell King - ARM Linux
  0 siblings, 0 replies; 72+ messages in thread
From: Russell King - ARM Linux @ 2011-01-04 20:22 UTC (permalink / raw)
  To: linux-arm-kernel

This uncouple PHYS_OFFSET from the platform definitions, thereby
facilitating run-time computation of the physical memory offset.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/include/asm/memory.h                  |    2 ++
 arch/arm/kernel/tcm.c                          |    2 +-
 arch/arm/mach-aaec2000/include/mach/memory.h   |    2 +-
 arch/arm/mach-at91/include/mach/memory.h       |    2 +-
 arch/arm/mach-bcmring/include/mach/hardware.h  |    2 +-
 arch/arm/mach-bcmring/include/mach/memory.h    |    2 +-
 arch/arm/mach-clps711x/include/mach/memory.h   |    2 +-
 arch/arm/mach-cns3xxx/include/mach/memory.h    |    2 +-
 arch/arm/mach-davinci/include/mach/memory.h    |    4 ++--
 arch/arm/mach-dove/include/mach/memory.h       |    2 +-
 arch/arm/mach-ebsa110/include/mach/memory.h    |    2 +-
 arch/arm/mach-ep93xx/include/mach/memory.h     |   10 +++++-----
 arch/arm/mach-footbridge/include/mach/memory.h |    2 +-
 arch/arm/mach-h720x/include/mach/memory.h      |    2 +-
 arch/arm/mach-integrator/include/mach/memory.h |    2 +-
 arch/arm/mach-iop13xx/include/mach/memory.h    |    2 +-
 arch/arm/mach-iop32x/include/mach/memory.h     |    2 +-
 arch/arm/mach-iop33x/include/mach/memory.h     |    2 +-
 arch/arm/mach-ixp2000/include/mach/memory.h    |    2 +-
 arch/arm/mach-ixp23xx/include/mach/memory.h    |    2 +-
 arch/arm/mach-ixp4xx/include/mach/memory.h     |    2 +-
 arch/arm/mach-kirkwood/include/mach/memory.h   |    2 +-
 arch/arm/mach-ks8695/include/mach/memory.h     |    2 +-
 arch/arm/mach-lh7a40x/include/mach/memory.h    |    2 +-
 arch/arm/mach-loki/include/mach/memory.h       |    2 +-
 arch/arm/mach-lpc32xx/include/mach/memory.h    |    2 +-
 arch/arm/mach-mmp/include/mach/memory.h        |    2 +-
 arch/arm/mach-msm/board-msm7x30.c              |    2 +-
 arch/arm/mach-msm/include/mach/memory.h        |   10 +++++-----
 arch/arm/mach-mv78xx0/include/mach/memory.h    |    2 +-
 arch/arm/mach-mx3/mach-kzm_arm11_01.c          |    2 +-
 arch/arm/mach-netx/include/mach/memory.h       |    2 +-
 arch/arm/mach-nomadik/include/mach/memory.h    |    2 +-
 arch/arm/mach-ns9xxx/include/mach/memory.h     |    2 +-
 arch/arm/mach-nuc93x/include/mach/memory.h     |    2 +-
 arch/arm/mach-orion5x/include/mach/memory.h    |    2 +-
 arch/arm/mach-pnx4008/include/mach/memory.h    |    2 +-
 arch/arm/mach-pxa/include/mach/memory.h        |    2 +-
 arch/arm/mach-realview/include/mach/memory.h   |    4 ++--
 arch/arm/mach-rpc/include/mach/memory.h        |    2 +-
 arch/arm/mach-s3c2400/include/mach/memory.h    |    2 +-
 arch/arm/mach-s3c2410/include/mach/memory.h    |    2 +-
 arch/arm/mach-s3c24a0/include/mach/memory.h    |    2 +-
 arch/arm/mach-s3c64xx/include/mach/memory.h    |    2 +-
 arch/arm/mach-s5p6442/include/mach/memory.h    |    2 +-
 arch/arm/mach-s5p64x0/include/mach/memory.h    |    2 +-
 arch/arm/mach-s5pc100/include/mach/memory.h    |    2 +-
 arch/arm/mach-s5pv210/include/mach/memory.h    |    2 +-
 arch/arm/mach-s5pv310/include/mach/memory.h    |    2 +-
 arch/arm/mach-sa1100/include/mach/memory.h     |    2 +-
 arch/arm/mach-shark/include/mach/memory.h      |    2 +-
 arch/arm/mach-shmobile/include/mach/memory.h   |    2 +-
 arch/arm/mach-tegra/include/mach/memory.h      |    2 +-
 arch/arm/mach-u300/include/mach/memory.h       |    6 +++---
 arch/arm/mach-u300/u300.c                      |    2 +-
 arch/arm/mach-ux500/include/mach/memory.h      |    2 +-
 arch/arm/mach-versatile/include/mach/memory.h  |    2 +-
 arch/arm/mach-vexpress/include/mach/memory.h   |    2 +-
 arch/arm/mach-w90x900/include/mach/memory.h    |    2 +-
 arch/arm/plat-omap/include/plat/memory.h       |    4 ++--
 arch/arm/plat-spear/include/plat/memory.h      |    2 +-
 arch/arm/plat-stmp3xxx/include/mach/memory.h   |    2 +-
 arch/arm/plat-tcc/include/mach/memory.h        |    2 +-
 63 files changed, 77 insertions(+), 75 deletions(-)

diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
index 23c2e8e..00b04ae 100644
--- a/arch/arm/include/asm/memory.h
+++ b/arch/arm/include/asm/memory.h
@@ -24,6 +24,8 @@
  */
 #define UL(x) _AC(x, UL)
 
+#define PHYS_OFFSET	PLAT_PHYS_OFFSET
+
 #ifdef CONFIG_MMU
 
 /*
diff --git a/arch/arm/kernel/tcm.c b/arch/arm/kernel/tcm.c
index 26685c2..f5cf660 100644
--- a/arch/arm/kernel/tcm.c
+++ b/arch/arm/kernel/tcm.c
@@ -15,7 +15,7 @@
 #include <linux/string.h> /* memcpy */
 #include <asm/cputype.h>
 #include <asm/mach/map.h>
-#include <mach/memory.h>
+#include <asm/memory.h>
 #include "tcm.h"
 
 static struct gen_pool *tcm_pool;
diff --git a/arch/arm/mach-aaec2000/include/mach/memory.h b/arch/arm/mach-aaec2000/include/mach/memory.h
index 4f93c56..4a10bf0 100644
--- a/arch/arm/mach-aaec2000/include/mach/memory.h
+++ b/arch/arm/mach-aaec2000/include/mach/memory.h
@@ -12,6 +12,6 @@
 #define __ASM_ARCH_MEMORY_H
 
 
-#define PHYS_OFFSET	UL(0xf0000000)
+#define PLAT_PHYS_OFFSET	UL(0xf0000000)
 
 #endif /* __ASM_ARCH_MEMORY_H */
diff --git a/arch/arm/mach-at91/include/mach/memory.h b/arch/arm/mach-at91/include/mach/memory.h
index 14f4ef4..c2cfe50 100644
--- a/arch/arm/mach-at91/include/mach/memory.h
+++ b/arch/arm/mach-at91/include/mach/memory.h
@@ -23,6 +23,6 @@
 
 #include <mach/hardware.h>
 
-#define PHYS_OFFSET	(AT91_SDRAM_BASE)
+#define PLAT_PHYS_OFFSET	(AT91_SDRAM_BASE)
 
 #endif
diff --git a/arch/arm/mach-bcmring/include/mach/hardware.h b/arch/arm/mach-bcmring/include/mach/hardware.h
index 447eb34..8bf3564 100644
--- a/arch/arm/mach-bcmring/include/mach/hardware.h
+++ b/arch/arm/mach-bcmring/include/mach/hardware.h
@@ -31,7 +31,7 @@
  *  *_SIZE  is the size of the region
  *  *_BASE  is the virtual address
  */
-#define RAM_START               PHYS_OFFSET
+#define RAM_START               PLAT_PHYS_OFFSET
 
 #define RAM_SIZE                (CFG_GLOBAL_RAM_SIZE-CFG_GLOBAL_RAM_SIZE_RESERVED)
 #define RAM_BASE                PAGE_OFFSET
diff --git a/arch/arm/mach-bcmring/include/mach/memory.h b/arch/arm/mach-bcmring/include/mach/memory.h
index 114f942..15162e4 100644
--- a/arch/arm/mach-bcmring/include/mach/memory.h
+++ b/arch/arm/mach-bcmring/include/mach/memory.h
@@ -23,7 +23,7 @@
  * files.  Use virt_to_phys/phys_to_virt/__pa/__va instead.
  */
 
-#define PHYS_OFFSET CFG_GLOBAL_RAM_BASE
+#define PLAT_PHYS_OFFSET CFG_GLOBAL_RAM_BASE
 
 /*
  * Maximum DMA memory allowed is 14M
diff --git a/arch/arm/mach-clps711x/include/mach/memory.h b/arch/arm/mach-clps711x/include/mach/memory.h
index f45c8e8..3a032a6 100644
--- a/arch/arm/mach-clps711x/include/mach/memory.h
+++ b/arch/arm/mach-clps711x/include/mach/memory.h
@@ -23,7 +23,7 @@
 /*
  * Physical DRAM offset.
  */
-#define PHYS_OFFSET	UL(0xc0000000)
+#define PLAT_PHYS_OFFSET	UL(0xc0000000)
 
 #if !defined(CONFIG_ARCH_CDB89712) && !defined (CONFIG_ARCH_AUTCPU12)
 
diff --git a/arch/arm/mach-cns3xxx/include/mach/memory.h b/arch/arm/mach-cns3xxx/include/mach/memory.h
index 3b6b769..dc16c5c 100644
--- a/arch/arm/mach-cns3xxx/include/mach/memory.h
+++ b/arch/arm/mach-cns3xxx/include/mach/memory.h
@@ -13,7 +13,7 @@
 /*
  * Physical DRAM offset.
  */
-#define PHYS_OFFSET		UL(0x00000000)
+#define PLAT_PHYS_OFFSET		UL(0x00000000)
 
 #define __phys_to_bus(x)	((x) + PHYS_OFFSET)
 #define __bus_to_phys(x)	((x) - PHYS_OFFSET)
diff --git a/arch/arm/mach-davinci/include/mach/memory.h b/arch/arm/mach-davinci/include/mach/memory.h
index 22eb97c..7882272 100644
--- a/arch/arm/mach-davinci/include/mach/memory.h
+++ b/arch/arm/mach-davinci/include/mach/memory.h
@@ -26,9 +26,9 @@
 #if defined(CONFIG_ARCH_DAVINCI_DA8XX) && defined(CONFIG_ARCH_DAVINCI_DMx)
 #error Cannot enable DaVinci and DA8XX platforms concurrently
 #elif defined(CONFIG_ARCH_DAVINCI_DA8XX)
-#define PHYS_OFFSET DA8XX_DDR_BASE
+#define PLAT_PHYS_OFFSET DA8XX_DDR_BASE
 #else
-#define PHYS_OFFSET DAVINCI_DDR_BASE
+#define PLAT_PHYS_OFFSET DAVINCI_DDR_BASE
 #endif
 
 #define DDR2_SDRCR_OFFSET	0xc
diff --git a/arch/arm/mach-dove/include/mach/memory.h b/arch/arm/mach-dove/include/mach/memory.h
index d668720..bbc93fe 100644
--- a/arch/arm/mach-dove/include/mach/memory.h
+++ b/arch/arm/mach-dove/include/mach/memory.h
@@ -5,6 +5,6 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-#define PHYS_OFFSET		UL(0x00000000)
+#define PLAT_PHYS_OFFSET		UL(0x00000000)
 
 #endif
diff --git a/arch/arm/mach-ebsa110/include/mach/memory.h b/arch/arm/mach-ebsa110/include/mach/memory.h
index 0ca66d0..8e49066 100644
--- a/arch/arm/mach-ebsa110/include/mach/memory.h
+++ b/arch/arm/mach-ebsa110/include/mach/memory.h
@@ -19,7 +19,7 @@
 /*
  * Physical DRAM offset.
  */
-#define PHYS_OFFSET	UL(0x00000000)
+#define PLAT_PHYS_OFFSET	UL(0x00000000)
 
 /*
  * Cache flushing area - SRAM
diff --git a/arch/arm/mach-ep93xx/include/mach/memory.h b/arch/arm/mach-ep93xx/include/mach/memory.h
index 554064e..c9400cf 100644
--- a/arch/arm/mach-ep93xx/include/mach/memory.h
+++ b/arch/arm/mach-ep93xx/include/mach/memory.h
@@ -6,15 +6,15 @@
 #define __ASM_ARCH_MEMORY_H
 
 #if defined(CONFIG_EP93XX_SDCE3_SYNC_PHYS_OFFSET)
-#define PHYS_OFFSET		UL(0x00000000)
+#define PLAT_PHYS_OFFSET		UL(0x00000000)
 #elif defined(CONFIG_EP93XX_SDCE0_PHYS_OFFSET)
-#define PHYS_OFFSET		UL(0xc0000000)
+#define PLAT_PHYS_OFFSET		UL(0xc0000000)
 #elif defined(CONFIG_EP93XX_SDCE1_PHYS_OFFSET)
-#define PHYS_OFFSET		UL(0xd0000000)
+#define PLAT_PHYS_OFFSET		UL(0xd0000000)
 #elif defined(CONFIG_EP93XX_SDCE2_PHYS_OFFSET)
-#define PHYS_OFFSET		UL(0xe0000000)
+#define PLAT_PHYS_OFFSET		UL(0xe0000000)
 #elif defined(CONFIG_EP93XX_SDCE3_ASYNC_PHYS_OFFSET)
-#define PHYS_OFFSET		UL(0xf0000000)
+#define PLAT_PHYS_OFFSET		UL(0xf0000000)
 #else
 #error "Kconfig bug: No EP93xx PHYS_OFFSET set"
 #endif
diff --git a/arch/arm/mach-footbridge/include/mach/memory.h b/arch/arm/mach-footbridge/include/mach/memory.h
index 8d64f45..5c6df37 100644
--- a/arch/arm/mach-footbridge/include/mach/memory.h
+++ b/arch/arm/mach-footbridge/include/mach/memory.h
@@ -62,7 +62,7 @@ extern unsigned long __bus_to_pfn(unsigned long);
 /*
  * Physical DRAM offset.
  */
-#define PHYS_OFFSET		UL(0x00000000)
+#define PLAT_PHYS_OFFSET		UL(0x00000000)
 
 #define FLUSH_BASE_PHYS		0x50000000
 
diff --git a/arch/arm/mach-h720x/include/mach/memory.h b/arch/arm/mach-h720x/include/mach/memory.h
index ef4c1e2..9d36876 100644
--- a/arch/arm/mach-h720x/include/mach/memory.h
+++ b/arch/arm/mach-h720x/include/mach/memory.h
@@ -7,7 +7,7 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-#define PHYS_OFFSET	UL(0x40000000)
+#define PLAT_PHYS_OFFSET	UL(0x40000000)
 /*
  * This is the maximum DMA address that can be DMAd to.
  * There should not be more than (0xd0000000 - 0xc0000000)
diff --git a/arch/arm/mach-integrator/include/mach/memory.h b/arch/arm/mach-integrator/include/mach/memory.h
index 991f24d..334d5e2 100644
--- a/arch/arm/mach-integrator/include/mach/memory.h
+++ b/arch/arm/mach-integrator/include/mach/memory.h
@@ -23,7 +23,7 @@
 /*
  * Physical DRAM offset.
  */
-#define PHYS_OFFSET	UL(0x00000000)
+#define PLAT_PHYS_OFFSET	UL(0x00000000)
 
 #define BUS_OFFSET	UL(0x80000000)
 #define __virt_to_bus(x)	((x) - PAGE_OFFSET + BUS_OFFSET)
diff --git a/arch/arm/mach-iop13xx/include/mach/memory.h b/arch/arm/mach-iop13xx/include/mach/memory.h
index 3ad4553..1afa99e 100644
--- a/arch/arm/mach-iop13xx/include/mach/memory.h
+++ b/arch/arm/mach-iop13xx/include/mach/memory.h
@@ -6,7 +6,7 @@
 /*
  * Physical DRAM offset.
  */
-#define PHYS_OFFSET	UL(0x00000000)
+#define PLAT_PHYS_OFFSET	UL(0x00000000)
 
 #ifndef __ASSEMBLY__
 
diff --git a/arch/arm/mach-iop32x/include/mach/memory.h b/arch/arm/mach-iop32x/include/mach/memory.h
index c30f645..169cc23 100644
--- a/arch/arm/mach-iop32x/include/mach/memory.h
+++ b/arch/arm/mach-iop32x/include/mach/memory.h
@@ -8,6 +8,6 @@
 /*
  * Physical DRAM offset.
  */
-#define PHYS_OFFSET	UL(0xa0000000)
+#define PLAT_PHYS_OFFSET	UL(0xa0000000)
 
 #endif
diff --git a/arch/arm/mach-iop33x/include/mach/memory.h b/arch/arm/mach-iop33x/include/mach/memory.h
index a30a96a..8e1daf7 100644
--- a/arch/arm/mach-iop33x/include/mach/memory.h
+++ b/arch/arm/mach-iop33x/include/mach/memory.h
@@ -8,6 +8,6 @@
 /*
  * Physical DRAM offset.
  */
-#define PHYS_OFFSET	UL(0x00000000)
+#define PLAT_PHYS_OFFSET	UL(0x00000000)
 
 #endif
diff --git a/arch/arm/mach-ixp2000/include/mach/memory.h b/arch/arm/mach-ixp2000/include/mach/memory.h
index 98e3471..5f0c4fd 100644
--- a/arch/arm/mach-ixp2000/include/mach/memory.h
+++ b/arch/arm/mach-ixp2000/include/mach/memory.h
@@ -13,7 +13,7 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-#define PHYS_OFFSET	UL(0x00000000)
+#define PLAT_PHYS_OFFSET	UL(0x00000000)
 
 #include <mach/ixp2000-regs.h>
 
diff --git a/arch/arm/mach-ixp23xx/include/mach/memory.h b/arch/arm/mach-ixp23xx/include/mach/memory.h
index 6ef65d8..6cf0704 100644
--- a/arch/arm/mach-ixp23xx/include/mach/memory.h
+++ b/arch/arm/mach-ixp23xx/include/mach/memory.h
@@ -17,7 +17,7 @@
 /*
  * Physical DRAM offset.
  */
-#define PHYS_OFFSET		(0x00000000)
+#define PLAT_PHYS_OFFSET		(0x00000000)
 
 #define IXP23XX_PCI_SDRAM_OFFSET (*((volatile int *)IXP23XX_PCI_SDRAM_BAR) & 0xfffffff0)
 
diff --git a/arch/arm/mach-ixp4xx/include/mach/memory.h b/arch/arm/mach-ixp4xx/include/mach/memory.h
index 0136eaa..6d388c9 100644
--- a/arch/arm/mach-ixp4xx/include/mach/memory.h
+++ b/arch/arm/mach-ixp4xx/include/mach/memory.h
@@ -12,7 +12,7 @@
 /*
  * Physical DRAM offset.
  */
-#define PHYS_OFFSET	UL(0x00000000)
+#define PLAT_PHYS_OFFSET	UL(0x00000000)
 
 #if !defined(__ASSEMBLY__) && defined(CONFIG_PCI)
 
diff --git a/arch/arm/mach-kirkwood/include/mach/memory.h b/arch/arm/mach-kirkwood/include/mach/memory.h
index 45431e1..4600b44 100644
--- a/arch/arm/mach-kirkwood/include/mach/memory.h
+++ b/arch/arm/mach-kirkwood/include/mach/memory.h
@@ -5,6 +5,6 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-#define PHYS_OFFSET		UL(0x00000000)
+#define PLAT_PHYS_OFFSET		UL(0x00000000)
 
 #endif
diff --git a/arch/arm/mach-ks8695/include/mach/memory.h b/arch/arm/mach-ks8695/include/mach/memory.h
index bace9a6..f7e1b9b 100644
--- a/arch/arm/mach-ks8695/include/mach/memory.h
+++ b/arch/arm/mach-ks8695/include/mach/memory.h
@@ -18,7 +18,7 @@
 /*
  * Physical SRAM offset.
  */
-#define PHYS_OFFSET		KS8695_SDRAM_PA
+#define PLAT_PHYS_OFFSET		KS8695_SDRAM_PA
 
 #ifndef __ASSEMBLY__
 
diff --git a/arch/arm/mach-lh7a40x/include/mach/memory.h b/arch/arm/mach-lh7a40x/include/mach/memory.h
index edb8f5f..f77bde8 100644
--- a/arch/arm/mach-lh7a40x/include/mach/memory.h
+++ b/arch/arm/mach-lh7a40x/include/mach/memory.h
@@ -17,7 +17,7 @@
 /*
  * Physical DRAM offset.
  */
-#define PHYS_OFFSET	UL(0xc0000000)
+#define PLAT_PHYS_OFFSET	UL(0xc0000000)
 
 /*
  * Sparsemem version of the above
diff --git a/arch/arm/mach-loki/include/mach/memory.h b/arch/arm/mach-loki/include/mach/memory.h
index 2ed7e6e..6636665 100644
--- a/arch/arm/mach-loki/include/mach/memory.h
+++ b/arch/arm/mach-loki/include/mach/memory.h
@@ -5,6 +5,6 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-#define PHYS_OFFSET		UL(0x00000000)
+#define PLAT_PHYS_OFFSET		UL(0x00000000)
 
 #endif
diff --git a/arch/arm/mach-lpc32xx/include/mach/memory.h b/arch/arm/mach-lpc32xx/include/mach/memory.h
index 044e1ac..a647dd6 100644
--- a/arch/arm/mach-lpc32xx/include/mach/memory.h
+++ b/arch/arm/mach-lpc32xx/include/mach/memory.h
@@ -22,6 +22,6 @@
 /*
  * Physical DRAM offset of bank 0
  */
-#define PHYS_OFFSET	UL(0x80000000)
+#define PLAT_PHYS_OFFSET	UL(0x80000000)
 
 #endif
diff --git a/arch/arm/mach-mmp/include/mach/memory.h b/arch/arm/mach-mmp/include/mach/memory.h
index bdb21d7..d68b50a 100644
--- a/arch/arm/mach-mmp/include/mach/memory.h
+++ b/arch/arm/mach-mmp/include/mach/memory.h
@@ -9,6 +9,6 @@
 #ifndef __ASM_MACH_MEMORY_H
 #define __ASM_MACH_MEMORY_H
 
-#define PHYS_OFFSET	UL(0x00000000)
+#define PLAT_PHYS_OFFSET	UL(0x00000000)
 
 #endif /* __ASM_MACH_MEMORY_H */
diff --git a/arch/arm/mach-msm/board-msm7x30.c b/arch/arm/mach-msm/board-msm7x30.c
index 05241df..1931e07 100644
--- a/arch/arm/mach-msm/board-msm7x30.c
+++ b/arch/arm/mach-msm/board-msm7x30.c
@@ -25,11 +25,11 @@
 
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
+#include <asm/memory.h>
 #include <asm/setup.h>
 
 #include <mach/gpio.h>
 #include <mach/board.h>
-#include <mach/memory.h>
 #include <mach/msm_iomap.h>
 #include <mach/dma.h>
 
diff --git a/arch/arm/mach-msm/include/mach/memory.h b/arch/arm/mach-msm/include/mach/memory.h
index 070e17d..176875d 100644
--- a/arch/arm/mach-msm/include/mach/memory.h
+++ b/arch/arm/mach-msm/include/mach/memory.h
@@ -18,15 +18,15 @@
 
 /* physical offset of RAM */
 #if defined(CONFIG_ARCH_QSD8X50) && defined(CONFIG_MSM_SOC_REV_A)
-#define PHYS_OFFSET		UL(0x00000000)
+#define PLAT_PHYS_OFFSET		UL(0x00000000)
 #elif defined(CONFIG_ARCH_QSD8X50)
-#define PHYS_OFFSET		UL(0x20000000)
+#define PLAT_PHYS_OFFSET		UL(0x20000000)
 #elif defined(CONFIG_ARCH_MSM7X30)
-#define PHYS_OFFSET		UL(0x00200000)
+#define PLAT_PHYS_OFFSET		UL(0x00200000)
 #elif defined(CONFIG_ARCH_MSM8X60)
-#define PHYS_OFFSET		UL(0x40200000)
+#define PLAT_PHYS_OFFSET		UL(0x40200000)
 #else
-#define PHYS_OFFSET		UL(0x10000000)
+#define PLAT_PHYS_OFFSET		UL(0x10000000)
 #endif
 
 #endif
diff --git a/arch/arm/mach-mv78xx0/include/mach/memory.h b/arch/arm/mach-mv78xx0/include/mach/memory.h
index e663042..a648c51 100644
--- a/arch/arm/mach-mv78xx0/include/mach/memory.h
+++ b/arch/arm/mach-mv78xx0/include/mach/memory.h
@@ -5,6 +5,6 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-#define PHYS_OFFSET		UL(0x00000000)
+#define PLAT_PHYS_OFFSET		UL(0x00000000)
 
 #endif
diff --git a/arch/arm/mach-mx3/mach-kzm_arm11_01.c b/arch/arm/mach-mx3/mach-kzm_arm11_01.c
index 042cd56..d8ebde8 100644
--- a/arch/arm/mach-mx3/mach-kzm_arm11_01.c
+++ b/arch/arm/mach-mx3/mach-kzm_arm11_01.c
@@ -27,6 +27,7 @@
 
 #include <asm/irq.h>
 #include <asm/mach-types.h>
+#include <asm/memory.h>
 #include <asm/setup.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/irq.h>
@@ -36,7 +37,6 @@
 #include <mach/clock.h>
 #include <mach/common.h>
 #include <mach/iomux-mx3.h>
-#include <mach/memory.h>
 
 #include "devices-imx31.h"
 #include "devices.h"
diff --git a/arch/arm/mach-netx/include/mach/memory.h b/arch/arm/mach-netx/include/mach/memory.h
index 9a363f2..5956149 100644
--- a/arch/arm/mach-netx/include/mach/memory.h
+++ b/arch/arm/mach-netx/include/mach/memory.h
@@ -20,7 +20,7 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-#define PHYS_OFFSET UL(0x80000000)
+#define PLAT_PHYS_OFFSET UL(0x80000000)
 
 #endif
 
diff --git a/arch/arm/mach-nomadik/include/mach/memory.h b/arch/arm/mach-nomadik/include/mach/memory.h
index 1e5689d..d332521 100644
--- a/arch/arm/mach-nomadik/include/mach/memory.h
+++ b/arch/arm/mach-nomadik/include/mach/memory.h
@@ -23,6 +23,6 @@
 /*
  * Physical DRAM offset.
  */
-#define PHYS_OFFSET	UL(0x00000000)
+#define PLAT_PHYS_OFFSET	UL(0x00000000)
 
 #endif
diff --git a/arch/arm/mach-ns9xxx/include/mach/memory.h b/arch/arm/mach-ns9xxx/include/mach/memory.h
index 6107193..5c65aee 100644
--- a/arch/arm/mach-ns9xxx/include/mach/memory.h
+++ b/arch/arm/mach-ns9xxx/include/mach/memory.h
@@ -19,6 +19,6 @@
 #define NS9XXX_CS2STAT_LENGTH	UL(0x1000)
 #define NS9XXX_CS3STAT_LENGTH	UL(0x1000)
 
-#define PHYS_OFFSET	UL(0x00000000)
+#define PLAT_PHYS_OFFSET	UL(0x00000000)
 
 #endif
diff --git a/arch/arm/mach-nuc93x/include/mach/memory.h b/arch/arm/mach-nuc93x/include/mach/memory.h
index 323ab0d..ef9864b 100644
--- a/arch/arm/mach-nuc93x/include/mach/memory.h
+++ b/arch/arm/mach-nuc93x/include/mach/memory.h
@@ -16,6 +16,6 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-#define PHYS_OFFSET	UL(0x00000000)
+#define PLAT_PHYS_OFFSET	UL(0x00000000)
 
 #endif
diff --git a/arch/arm/mach-orion5x/include/mach/memory.h b/arch/arm/mach-orion5x/include/mach/memory.h
index 52a2955..6769917 100644
--- a/arch/arm/mach-orion5x/include/mach/memory.h
+++ b/arch/arm/mach-orion5x/include/mach/memory.h
@@ -7,6 +7,6 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-#define PHYS_OFFSET	UL(0x00000000)
+#define PLAT_PHYS_OFFSET	UL(0x00000000)
 
 #endif
diff --git a/arch/arm/mach-pnx4008/include/mach/memory.h b/arch/arm/mach-pnx4008/include/mach/memory.h
index 0e87700..1275db6 100644
--- a/arch/arm/mach-pnx4008/include/mach/memory.h
+++ b/arch/arm/mach-pnx4008/include/mach/memory.h
@@ -16,6 +16,6 @@
 /*
  * Physical DRAM offset.
  */
-#define PHYS_OFFSET	UL(0x80000000)
+#define PLAT_PHYS_OFFSET	UL(0x80000000)
 
 #endif
diff --git a/arch/arm/mach-pxa/include/mach/memory.h b/arch/arm/mach-pxa/include/mach/memory.h
index 92361a6..7f68724 100644
--- a/arch/arm/mach-pxa/include/mach/memory.h
+++ b/arch/arm/mach-pxa/include/mach/memory.h
@@ -15,7 +15,7 @@
 /*
  * Physical DRAM offset.
  */
-#define PHYS_OFFSET	UL(0xa0000000)
+#define PLAT_PHYS_OFFSET	UL(0xa0000000)
 
 #if !defined(__ASSEMBLY__) && defined(CONFIG_MACH_ARMCORE) && defined(CONFIG_PCI)
 void cmx2xx_pci_adjust_zones(unsigned long *size, unsigned long *holes);
diff --git a/arch/arm/mach-realview/include/mach/memory.h b/arch/arm/mach-realview/include/mach/memory.h
index 5dafc15..e05fc2c 100644
--- a/arch/arm/mach-realview/include/mach/memory.h
+++ b/arch/arm/mach-realview/include/mach/memory.h
@@ -24,9 +24,9 @@
  * Physical DRAM offset.
  */
 #ifdef CONFIG_REALVIEW_HIGH_PHYS_OFFSET
-#define PHYS_OFFSET		UL(0x70000000)
+#define PLAT_PHYS_OFFSET		UL(0x70000000)
 #else
-#define PHYS_OFFSET		UL(0x00000000)
+#define PLAT_PHYS_OFFSET		UL(0x00000000)
 #endif
 
 #if !defined(__ASSEMBLY__) && defined(CONFIG_ZONE_DMA)
diff --git a/arch/arm/mach-rpc/include/mach/memory.h b/arch/arm/mach-rpc/include/mach/memory.h
index 78191bf..18a2210 100644
--- a/arch/arm/mach-rpc/include/mach/memory.h
+++ b/arch/arm/mach-rpc/include/mach/memory.h
@@ -21,7 +21,7 @@
 /*
  * Physical DRAM offset.
  */
-#define PHYS_OFFSET	UL(0x10000000)
+#define PLAT_PHYS_OFFSET	UL(0x10000000)
 
 /*
  * Cache flushing area - ROM
diff --git a/arch/arm/mach-s3c2400/include/mach/memory.h b/arch/arm/mach-s3c2400/include/mach/memory.h
index cf5901f..3f33670 100644
--- a/arch/arm/mach-s3c2400/include/mach/memory.h
+++ b/arch/arm/mach-s3c2400/include/mach/memory.h
@@ -15,6 +15,6 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-#define PHYS_OFFSET	UL(0x0C000000)
+#define PLAT_PHYS_OFFSET	UL(0x0C000000)
 
 #endif
diff --git a/arch/arm/mach-s3c2410/include/mach/memory.h b/arch/arm/mach-s3c2410/include/mach/memory.h
index 6f1e587..f92b97b 100644
--- a/arch/arm/mach-s3c2410/include/mach/memory.h
+++ b/arch/arm/mach-s3c2410/include/mach/memory.h
@@ -11,6 +11,6 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-#define PHYS_OFFSET	UL(0x30000000)
+#define PLAT_PHYS_OFFSET	UL(0x30000000)
 
 #endif
diff --git a/arch/arm/mach-s3c24a0/include/mach/memory.h b/arch/arm/mach-s3c24a0/include/mach/memory.h
index 7d74fd5..7d208a7 100644
--- a/arch/arm/mach-s3c24a0/include/mach/memory.h
+++ b/arch/arm/mach-s3c24a0/include/mach/memory.h
@@ -11,7 +11,7 @@
 #ifndef __ASM_ARCH_24A0_MEMORY_H
 #define __ASM_ARCH_24A0_MEMORY_H __FILE__
 
-#define PHYS_OFFSET UL(0x10000000)
+#define PLAT_PHYS_OFFSET UL(0x10000000)
 
 #define __virt_to_bus(x) __virt_to_phys(x)
 #define __bus_to_virt(x) __phys_to_virt(x)
diff --git a/arch/arm/mach-s3c64xx/include/mach/memory.h b/arch/arm/mach-s3c64xx/include/mach/memory.h
index 42cc54e..4760cda 100644
--- a/arch/arm/mach-s3c64xx/include/mach/memory.h
+++ b/arch/arm/mach-s3c64xx/include/mach/memory.h
@@ -13,7 +13,7 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-#define PHYS_OFFSET     UL(0x50000000)
+#define PLAT_PHYS_OFFSET     UL(0x50000000)
 
 #define CONSISTENT_DMA_SIZE	SZ_8M
 
diff --git a/arch/arm/mach-s5p6442/include/mach/memory.h b/arch/arm/mach-s5p6442/include/mach/memory.h
index 9ddd877..cfe259d 100644
--- a/arch/arm/mach-s5p6442/include/mach/memory.h
+++ b/arch/arm/mach-s5p6442/include/mach/memory.h
@@ -13,7 +13,7 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-#define PHYS_OFFSET		UL(0x20000000)
+#define PLAT_PHYS_OFFSET		UL(0x20000000)
 #define CONSISTENT_DMA_SIZE	SZ_8M
 
 #endif /* __ASM_ARCH_MEMORY_H */
diff --git a/arch/arm/mach-s5p64x0/include/mach/memory.h b/arch/arm/mach-s5p64x0/include/mach/memory.h
index 1b036b0..365a6eb 100644
--- a/arch/arm/mach-s5p64x0/include/mach/memory.h
+++ b/arch/arm/mach-s5p64x0/include/mach/memory.h
@@ -13,7 +13,7 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H __FILE__
 
-#define PHYS_OFFSET		UL(0x20000000)
+#define PLAT_PHYS_OFFSET		UL(0x20000000)
 #define CONSISTENT_DMA_SIZE	SZ_8M
 
 #endif /* __ASM_ARCH_MEMORY_H */
diff --git a/arch/arm/mach-s5pc100/include/mach/memory.h b/arch/arm/mach-s5pc100/include/mach/memory.h
index 4b60d18..bda4e79 100644
--- a/arch/arm/mach-s5pc100/include/mach/memory.h
+++ b/arch/arm/mach-s5pc100/include/mach/memory.h
@@ -13,6 +13,6 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-#define PHYS_OFFSET     	UL(0x20000000)
+#define PLAT_PHYS_OFFSET     	UL(0x20000000)
 
 #endif
diff --git a/arch/arm/mach-s5pv210/include/mach/memory.h b/arch/arm/mach-s5pv210/include/mach/memory.h
index d503e0c..7b5fcf0 100644
--- a/arch/arm/mach-s5pv210/include/mach/memory.h
+++ b/arch/arm/mach-s5pv210/include/mach/memory.h
@@ -13,7 +13,7 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-#define PHYS_OFFSET		UL(0x20000000)
+#define PLAT_PHYS_OFFSET		UL(0x20000000)
 #define CONSISTENT_DMA_SIZE	(SZ_8M + SZ_4M + SZ_2M)
 
 /*
diff --git a/arch/arm/mach-s5pv310/include/mach/memory.h b/arch/arm/mach-s5pv310/include/mach/memory.h
index 1dffb48..470b01b 100644
--- a/arch/arm/mach-s5pv310/include/mach/memory.h
+++ b/arch/arm/mach-s5pv310/include/mach/memory.h
@@ -13,7 +13,7 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H __FILE__
 
-#define PHYS_OFFSET		UL(0x40000000)
+#define PLAT_PHYS_OFFSET		UL(0x40000000)
 
 /* Maximum of 256MiB in one bank */
 #define MAX_PHYSMEM_BITS	32
diff --git a/arch/arm/mach-sa1100/include/mach/memory.h b/arch/arm/mach-sa1100/include/mach/memory.h
index 128a1df..a44da6a 100644
--- a/arch/arm/mach-sa1100/include/mach/memory.h
+++ b/arch/arm/mach-sa1100/include/mach/memory.h
@@ -12,7 +12,7 @@
 /*
  * Physical DRAM offset is 0xc0000000 on the SA1100
  */
-#define PHYS_OFFSET	UL(0xc0000000)
+#define PLAT_PHYS_OFFSET	UL(0xc0000000)
 
 #ifndef __ASSEMBLY__
 
diff --git a/arch/arm/mach-shark/include/mach/memory.h b/arch/arm/mach-shark/include/mach/memory.h
index d9c4812..9afb170 100644
--- a/arch/arm/mach-shark/include/mach/memory.h
+++ b/arch/arm/mach-shark/include/mach/memory.h
@@ -15,7 +15,7 @@
 /*
  * Physical DRAM offset.
  */
-#define PHYS_OFFSET     UL(0x08000000)
+#define PLAT_PHYS_OFFSET     UL(0x08000000)
 
 #ifndef __ASSEMBLY__
 
diff --git a/arch/arm/mach-shmobile/include/mach/memory.h b/arch/arm/mach-shmobile/include/mach/memory.h
index 377584e..ad00c3c 100644
--- a/arch/arm/mach-shmobile/include/mach/memory.h
+++ b/arch/arm/mach-shmobile/include/mach/memory.h
@@ -1,7 +1,7 @@
 #ifndef __ASM_MACH_MEMORY_H
 #define __ASM_MACH_MEMORY_H
 
-#define PHYS_OFFSET	UL(CONFIG_MEMORY_START)
+#define PLAT_PHYS_OFFSET	UL(CONFIG_MEMORY_START)
 #define MEM_SIZE	UL(CONFIG_MEMORY_SIZE)
 
 /* DMA memory at 0xf6000000 - 0xffdfffff */
diff --git a/arch/arm/mach-tegra/include/mach/memory.h b/arch/arm/mach-tegra/include/mach/memory.h
index 6151bab..537db3a 100644
--- a/arch/arm/mach-tegra/include/mach/memory.h
+++ b/arch/arm/mach-tegra/include/mach/memory.h
@@ -22,7 +22,7 @@
 #define __MACH_TEGRA_MEMORY_H
 
 /* physical offset of RAM */
-#define PHYS_OFFSET		UL(0)
+#define PLAT_PHYS_OFFSET		UL(0)
 
 #endif
 
diff --git a/arch/arm/mach-u300/include/mach/memory.h b/arch/arm/mach-u300/include/mach/memory.h
index bf134bc..888e2e3 100644
--- a/arch/arm/mach-u300/include/mach/memory.h
+++ b/arch/arm/mach-u300/include/mach/memory.h
@@ -15,17 +15,17 @@
 
 #ifdef CONFIG_MACH_U300_DUAL_RAM
 
-#define PHYS_OFFSET		UL(0x48000000)
+#define PLAT_PHYS_OFFSET		UL(0x48000000)
 #define BOOT_PARAMS_OFFSET	(PHYS_OFFSET + 0x100)
 
 #else
 
 #ifdef CONFIG_MACH_U300_2MB_ALIGNMENT_FIX
-#define PHYS_OFFSET (0x28000000 + \
+#define PLAT_PHYS_OFFSET (0x28000000 + \
 	     (CONFIG_MACH_U300_ACCESS_MEM_SIZE - \
 	     (CONFIG_MACH_U300_ACCESS_MEM_SIZE & 1))*1024*1024)
 #else
-#define PHYS_OFFSET (0x28000000 + \
+#define PLAT_PHYS_OFFSET (0x28000000 + \
 	     (CONFIG_MACH_U300_ACCESS_MEM_SIZE +	\
 	     (CONFIG_MACH_U300_ACCESS_MEM_SIZE & 1))*1024*1024)
 #endif
diff --git a/arch/arm/mach-u300/u300.c b/arch/arm/mach-u300/u300.c
index 07c35a8..48b3b7f 100644
--- a/arch/arm/mach-u300/u300.c
+++ b/arch/arm/mach-u300/u300.c
@@ -19,9 +19,9 @@
 #include <linux/io.h>
 #include <mach/hardware.h>
 #include <mach/platform.h>
-#include <mach/memory.h>
 #include <asm/mach-types.h>
 #include <asm/mach/arch.h>
+#include <asm/memory.h>
 
 static void __init u300_reserve(void)
 {
diff --git a/arch/arm/mach-ux500/include/mach/memory.h b/arch/arm/mach-ux500/include/mach/memory.h
index 510571a..2ef697a 100644
--- a/arch/arm/mach-ux500/include/mach/memory.h
+++ b/arch/arm/mach-ux500/include/mach/memory.h
@@ -12,7 +12,7 @@
 /*
  * Physical DRAM offset.
  */
-#define PHYS_OFFSET	UL(0x00000000)
+#define PLAT_PHYS_OFFSET	UL(0x00000000)
 #define BUS_OFFSET	UL(0x00000000)
 
 #endif
diff --git a/arch/arm/mach-versatile/include/mach/memory.h b/arch/arm/mach-versatile/include/mach/memory.h
index 79aeab8..dacc9d8 100644
--- a/arch/arm/mach-versatile/include/mach/memory.h
+++ b/arch/arm/mach-versatile/include/mach/memory.h
@@ -23,6 +23,6 @@
 /*
  * Physical DRAM offset.
  */
-#define PHYS_OFFSET	UL(0x00000000)
+#define PLAT_PHYS_OFFSET	UL(0x00000000)
 
 #endif
diff --git a/arch/arm/mach-vexpress/include/mach/memory.h b/arch/arm/mach-vexpress/include/mach/memory.h
index be28232..5b7fcd4 100644
--- a/arch/arm/mach-vexpress/include/mach/memory.h
+++ b/arch/arm/mach-vexpress/include/mach/memory.h
@@ -20,6 +20,6 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-#define PHYS_OFFSET		UL(0x60000000)
+#define PLAT_PHYS_OFFSET		UL(0x60000000)
 
 #endif
diff --git a/arch/arm/mach-w90x900/include/mach/memory.h b/arch/arm/mach-w90x900/include/mach/memory.h
index 971b807..f02905b 100644
--- a/arch/arm/mach-w90x900/include/mach/memory.h
+++ b/arch/arm/mach-w90x900/include/mach/memory.h
@@ -18,6 +18,6 @@
 #ifndef __ASM_ARCH_MEMORY_H
 #define __ASM_ARCH_MEMORY_H
 
-#define PHYS_OFFSET	UL(0x00000000)
+#define PLAT_PHYS_OFFSET	UL(0x00000000)
 
 #endif
diff --git a/arch/arm/plat-omap/include/plat/memory.h b/arch/arm/plat-omap/include/plat/memory.h
index f8d922f..e6720aa 100644
--- a/arch/arm/plat-omap/include/plat/memory.h
+++ b/arch/arm/plat-omap/include/plat/memory.h
@@ -37,9 +37,9 @@
  * Physical DRAM offset.
  */
 #if defined(CONFIG_ARCH_OMAP1)
-#define PHYS_OFFSET		UL(0x10000000)
+#define PLAT_PHYS_OFFSET		UL(0x10000000)
 #else
-#define PHYS_OFFSET		UL(0x80000000)
+#define PLAT_PHYS_OFFSET		UL(0x80000000)
 #endif
 
 /*
diff --git a/arch/arm/plat-spear/include/plat/memory.h b/arch/arm/plat-spear/include/plat/memory.h
index 27a4aba..7e3599e 100644
--- a/arch/arm/plat-spear/include/plat/memory.h
+++ b/arch/arm/plat-spear/include/plat/memory.h
@@ -15,6 +15,6 @@
 #define __PLAT_MEMORY_H
 
 /* Physical DRAM offset */
-#define PHYS_OFFSET		UL(0x00000000)
+#define PLAT_PHYS_OFFSET		UL(0x00000000)
 
 #endif /* __PLAT_MEMORY_H */
diff --git a/arch/arm/plat-stmp3xxx/include/mach/memory.h b/arch/arm/plat-stmp3xxx/include/mach/memory.h
index 7b875a0..61fa548 100644
--- a/arch/arm/plat-stmp3xxx/include/mach/memory.h
+++ b/arch/arm/plat-stmp3xxx/include/mach/memory.h
@@ -17,6 +17,6 @@
 /*
  * Physical DRAM offset.
  */
-#define PHYS_OFFSET	UL(0x40000000)
+#define PLAT_PHYS_OFFSET	UL(0x40000000)
 
 #endif
diff --git a/arch/arm/plat-tcc/include/mach/memory.h b/arch/arm/plat-tcc/include/mach/memory.h
index cd91ba8..28a6e0c 100644
--- a/arch/arm/plat-tcc/include/mach/memory.h
+++ b/arch/arm/plat-tcc/include/mach/memory.h
@@ -13,6 +13,6 @@
 /*
  * Physical DRAM offset.
  */
-#define PHYS_OFFSET		UL(0x20000000)
+#define PLAT_PHYS_OFFSET		UL(0x20000000)
 
 #endif
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 72+ messages in thread

* [RFC 2/5] ARM: P2V: avoid initializers and assembly using PHYS_OFFSET
  2011-01-04 20:20 ` Russell King - ARM Linux
@ 2011-01-04 20:22   ` Russell King - ARM Linux
  -1 siblings, 0 replies; 72+ messages in thread
From: Russell King - ARM Linux @ 2011-01-04 20:22 UTC (permalink / raw)
  To: Nicolas Pitre
  Cc: David Brown, Daniel Walker, Bryan Huntsman, Amit Kucheria,
	Sascha Hauer, Eric Miao, Kukjin Kim, Hans J. Koch,
	linux-arm-kernel, linux-arm-msm, linux-samsung-soc

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="us-ascii", Size: 11962 bytes --]

As PHYS_OFFSET will be becoming a variable, we can't have it used in
initializers nor assembly code.  Replace those in generic code with
a run-time initialization.  Replace those in platform code using the
individual platform specific PLAT_PHYS_OFFSET.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/kernel/setup.c                  |    4 +++-
 arch/arm/mach-msm/board-msm7x27.c        |    8 ++++----
 arch/arm/mach-msm/board-msm7x30.c        |    6 +++---
 arch/arm/mach-msm/board-qsd8x50.c        |    4 ++--
 arch/arm/mach-msm/board-sapphire.c       |    2 +-
 arch/arm/mach-mx5/board-cpuimx51.c       |    2 +-
 arch/arm/mach-mx5/board-cpuimx51sd.c     |    2 +-
 arch/arm/mach-mx5/board-mx51_3ds.c       |    2 +-
 arch/arm/mach-pxa/balloon3.c             |    2 +-
 arch/arm/mach-realview/realview_eb.c     |    2 +-
 arch/arm/mach-realview/realview_pb1176.c |    2 +-
 arch/arm/mach-realview/realview_pb11mp.c |    2 +-
 arch/arm/mach-realview/realview_pba8.c   |    2 +-
 arch/arm/mach-realview/realview_pbx.c    |    2 +-
 arch/arm/mach-s5pv210/sleep.S            |    2 +-
 arch/arm/mach-tcc8k/board-tcc8000-sdk.c  |    2 +-
 arch/arm/mach-vexpress/ct-ca9x4.c        |    2 +-
 17 files changed, 25 insertions(+), 23 deletions(-)

diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 3455ad3..f67e682 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -705,7 +705,7 @@ static struct init_tags {
 	{ tag_size(tag_core), ATAG_CORE },
 	{ 1, PAGE_SIZE, 0xff },
 	{ tag_size(tag_mem32), ATAG_MEM },
-	{ MEM_SIZE, PHYS_OFFSET },
+	{ MEM_SIZE },
 	{ 0, ATAG_NONE }
 };
 
@@ -804,6 +804,8 @@ void __init setup_arch(char **cmdline_p)
 	struct machine_desc *mdesc;
 	char *from = default_command_line;
 
+	tags->mem.start = PHYS_OFFSET;
+
 	unwind_init();
 
 	setup_processor();
diff --git a/arch/arm/mach-msm/board-msm7x27.c b/arch/arm/mach-msm/board-msm7x27.c
index e7a76ef..08fcd40 100644
--- a/arch/arm/mach-msm/board-msm7x27.c
+++ b/arch/arm/mach-msm/board-msm7x27.c
@@ -132,7 +132,7 @@ static void __init msm7x2x_map_io(void)
 MACHINE_START(MSM7X27_SURF, "QCT MSM7x27 SURF")
 #ifdef CONFIG_MSM_DEBUG_UART
 #endif
-	.boot_params	= PHYS_OFFSET + 0x100,
+	.boot_params	= PLAT_PHYS_OFFSET + 0x100,
 	.map_io		= msm7x2x_map_io,
 	.init_irq	= msm7x2x_init_irq,
 	.init_machine	= msm7x2x_init,
@@ -142,7 +142,7 @@ MACHINE_END
 MACHINE_START(MSM7X27_FFA, "QCT MSM7x27 FFA")
 #ifdef CONFIG_MSM_DEBUG_UART
 #endif
-	.boot_params	= PHYS_OFFSET + 0x100,
+	.boot_params	= PLAT_PHYS_OFFSET + 0x100,
 	.map_io		= msm7x2x_map_io,
 	.init_irq	= msm7x2x_init_irq,
 	.init_machine	= msm7x2x_init,
@@ -152,7 +152,7 @@ MACHINE_END
 MACHINE_START(MSM7X25_SURF, "QCT MSM7x25 SURF")
 #ifdef CONFIG_MSM_DEBUG_UART
 #endif
-	.boot_params	= PHYS_OFFSET + 0x100,
+	.boot_params	= PLAT_PHYS_OFFSET + 0x100,
 	.map_io		= msm7x2x_map_io,
 	.init_irq	= msm7x2x_init_irq,
 	.init_machine	= msm7x2x_init,
@@ -162,7 +162,7 @@ MACHINE_END
 MACHINE_START(MSM7X25_FFA, "QCT MSM7x25 FFA")
 #ifdef CONFIG_MSM_DEBUG_UART
 #endif
-	.boot_params	= PHYS_OFFSET + 0x100,
+	.boot_params	= PLAT_PHYS_OFFSET + 0x100,
 	.map_io		= msm7x2x_map_io,
 	.init_irq	= msm7x2x_init_irq,
 	.init_machine	= msm7x2x_init,
diff --git a/arch/arm/mach-msm/board-msm7x30.c b/arch/arm/mach-msm/board-msm7x30.c
index 1931e07..eb1d1b1 100644
--- a/arch/arm/mach-msm/board-msm7x30.c
+++ b/arch/arm/mach-msm/board-msm7x30.c
@@ -65,7 +65,7 @@ static void __init msm7x30_map_io(void)
 MACHINE_START(MSM7X30_SURF, "QCT MSM7X30 SURF")
 #ifdef CONFIG_MSM_DEBUG_UART
 #endif
-	.boot_params = PHYS_OFFSET + 0x100,
+	.boot_params = PLAT_PHYS_OFFSET + 0x100,
 	.map_io = msm7x30_map_io,
 	.init_irq = msm7x30_init_irq,
 	.init_machine = msm7x30_init,
@@ -75,7 +75,7 @@ MACHINE_END
 MACHINE_START(MSM7X30_FFA, "QCT MSM7X30 FFA")
 #ifdef CONFIG_MSM_DEBUG_UART
 #endif
-	.boot_params = PHYS_OFFSET + 0x100,
+	.boot_params = PLAT_PHYS_OFFSET + 0x100,
 	.map_io = msm7x30_map_io,
 	.init_irq = msm7x30_init_irq,
 	.init_machine = msm7x30_init,
@@ -85,7 +85,7 @@ MACHINE_END
 MACHINE_START(MSM7X30_FLUID, "QCT MSM7X30 FLUID")
 #ifdef CONFIG_MSM_DEBUG_UART
 #endif
-	.boot_params = PHYS_OFFSET + 0x100,
+	.boot_params = PLAT_PHYS_OFFSET + 0x100,
 	.map_io = msm7x30_map_io,
 	.init_irq = msm7x30_init_irq,
 	.init_machine = msm7x30_init,
diff --git a/arch/arm/mach-msm/board-qsd8x50.c b/arch/arm/mach-msm/board-qsd8x50.c
index ed2af4a..41892ed 100644
--- a/arch/arm/mach-msm/board-qsd8x50.c
+++ b/arch/arm/mach-msm/board-qsd8x50.c
@@ -99,7 +99,7 @@ static void __init qsd8x50_init(void)
 MACHINE_START(QSD8X50_SURF, "QCT QSD8X50 SURF")
 #ifdef CONFIG_MSM_DEBUG_UART
 #endif
-	.boot_params = PHYS_OFFSET + 0x100,
+	.boot_params = PLAT_PHYS_OFFSET + 0x100,
 	.map_io = qsd8x50_map_io,
 	.init_irq = qsd8x50_init_irq,
 	.init_machine = qsd8x50_init,
@@ -109,7 +109,7 @@ MACHINE_END
 MACHINE_START(QSD8X50A_ST1_5, "QCT QSD8X50A ST1.5")
 #ifdef CONFIG_MSM_DEBUG_UART
 #endif
-	.boot_params = PHYS_OFFSET + 0x100,
+	.boot_params = PLAT_PHYS_OFFSET + 0x100,
 	.map_io = qsd8x50_map_io,
 	.init_irq = qsd8x50_init_irq,
 	.init_machine = qsd8x50_init,
diff --git a/arch/arm/mach-msm/board-sapphire.c b/arch/arm/mach-msm/board-sapphire.c
index 8919ffb..83604f5 100644
--- a/arch/arm/mach-msm/board-sapphire.c
+++ b/arch/arm/mach-msm/board-sapphire.c
@@ -107,7 +107,7 @@ MACHINE_START(SAPPHIRE, "sapphire")
 /* Maintainer: Brian Swetland <swetland@google.com> */
 #ifdef CONFIG_MSM_DEBUG_UART
 #endif
-	.boot_params    = PHYS_OFFSET + 0x100,
+	.boot_params    = PLAT_PHYS_OFFSET + 0x100,
 	.fixup          = sapphire_fixup,
 	.map_io         = sapphire_map_io,
 	.init_irq       = sapphire_init_irq,
diff --git a/arch/arm/mach-mx5/board-cpuimx51.c b/arch/arm/mach-mx5/board-cpuimx51.c
index 6a9792f..c4c3a9c 100644
--- a/arch/arm/mach-mx5/board-cpuimx51.c
+++ b/arch/arm/mach-mx5/board-cpuimx51.c
@@ -292,7 +292,7 @@ static struct sys_timer mxc_timer = {
 
 MACHINE_START(EUKREA_CPUIMX51, "Eukrea CPUIMX51 Module")
 	/* Maintainer: Eric Bénard <eric@eukrea.com> */
-	.boot_params = PHYS_OFFSET + 0x100,
+	.boot_params = PLAT_PHYS_OFFSET + 0x100,
 	.map_io = mx51_map_io,
 	.init_irq = mx51_init_irq,
 	.init_machine = eukrea_cpuimx51_init,
diff --git a/arch/arm/mach-mx5/board-cpuimx51sd.c b/arch/arm/mach-mx5/board-cpuimx51sd.c
index 4b3a611..b887381 100644
--- a/arch/arm/mach-mx5/board-cpuimx51sd.c
+++ b/arch/arm/mach-mx5/board-cpuimx51sd.c
@@ -323,7 +323,7 @@ static struct sys_timer mxc_timer = {
 
 MACHINE_START(EUKREA_CPUIMX51SD, "Eukrea CPUIMX51SD")
 	/* Maintainer: Eric Bénard <eric@eukrea.com> */
-	.boot_params = PHYS_OFFSET + 0x100,
+	.boot_params = PLAT_PHYS_OFFSET + 0x100,
 	.map_io = mx51_map_io,
 	.init_irq = mx51_init_irq,
 	.init_machine = eukrea_cpuimx51sd_init,
diff --git a/arch/arm/mach-mx5/board-mx51_3ds.c b/arch/arm/mach-mx5/board-mx51_3ds.c
index 79ce8dc..10e6ce3 100644
--- a/arch/arm/mach-mx5/board-mx51_3ds.c
+++ b/arch/arm/mach-mx5/board-mx51_3ds.c
@@ -186,7 +186,7 @@ static struct sys_timer mxc_timer = {
 
 MACHINE_START(MX51_3DS, "Freescale MX51 3-Stack Board")
 	/* Maintainer: Freescale Semiconductor, Inc. */
-	.boot_params = PHYS_OFFSET + 0x100,
+	.boot_params = PLAT_PHYS_OFFSET + 0x100,
 	.map_io = mx51_map_io,
 	.init_irq = mx51_init_irq,
 	.init_machine = mxc_board_init,
diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c
index ccb2d0c..abcc646 100644
--- a/arch/arm/mach-pxa/balloon3.c
+++ b/arch/arm/mach-pxa/balloon3.c
@@ -824,5 +824,5 @@ MACHINE_START(BALLOON3, "Balloon3")
 	.init_irq	= balloon3_init_irq,
 	.timer		= &pxa_timer,
 	.init_machine	= balloon3_init,
-	.boot_params	= PHYS_OFFSET + 0x100,
+	.boot_params	= PLAT_PHYS_OFFSET + 0x100,
 MACHINE_END
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c
index 6ef5c5e..8ede983 100644
--- a/arch/arm/mach-realview/realview_eb.c
+++ b/arch/arm/mach-realview/realview_eb.c
@@ -484,7 +484,7 @@ static void __init realview_eb_init(void)
 
 MACHINE_START(REALVIEW_EB, "ARM-RealView EB")
 	/* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
-	.boot_params	= PHYS_OFFSET + 0x00000100,
+	.boot_params	= PLAT_PHYS_OFFSET + 0x00000100,
 	.fixup		= realview_fixup,
 	.map_io		= realview_eb_map_io,
 	.init_irq	= gic_init_irq,
diff --git a/arch/arm/mach-realview/realview_pb1176.c b/arch/arm/mach-realview/realview_pb1176.c
index cbdc97a..9f26369 100644
--- a/arch/arm/mach-realview/realview_pb1176.c
+++ b/arch/arm/mach-realview/realview_pb1176.c
@@ -379,7 +379,7 @@ static void __init realview_pb1176_init(void)
 
 MACHINE_START(REALVIEW_PB1176, "ARM-RealView PB1176")
 	/* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
-	.boot_params	= PHYS_OFFSET + 0x00000100,
+	.boot_params	= PLAT_PHYS_OFFSET + 0x00000100,
 	.fixup		= realview_pb1176_fixup,
 	.map_io		= realview_pb1176_map_io,
 	.init_irq	= gic_init_irq,
diff --git a/arch/arm/mach-realview/realview_pb11mp.c b/arch/arm/mach-realview/realview_pb11mp.c
index 8e8ab7d..dea06b2 100644
--- a/arch/arm/mach-realview/realview_pb11mp.c
+++ b/arch/arm/mach-realview/realview_pb11mp.c
@@ -381,7 +381,7 @@ static void __init realview_pb11mp_init(void)
 
 MACHINE_START(REALVIEW_PB11MP, "ARM-RealView PB11MPCore")
 	/* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
-	.boot_params	= PHYS_OFFSET + 0x00000100,
+	.boot_params	= PLAT_PHYS_OFFSET + 0x00000100,
 	.fixup		= realview_fixup,
 	.map_io		= realview_pb11mp_map_io,
 	.init_irq	= gic_init_irq,
diff --git a/arch/arm/mach-realview/realview_pba8.c b/arch/arm/mach-realview/realview_pba8.c
index 841118e..7d0f173 100644
--- a/arch/arm/mach-realview/realview_pba8.c
+++ b/arch/arm/mach-realview/realview_pba8.c
@@ -331,7 +331,7 @@ static void __init realview_pba8_init(void)
 
 MACHINE_START(REALVIEW_PBA8, "ARM-RealView PB-A8")
 	/* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
-	.boot_params	= PHYS_OFFSET + 0x00000100,
+	.boot_params	= PLAT_PHYS_OFFSET + 0x00000100,
 	.fixup		= realview_fixup,
 	.map_io		= realview_pba8_map_io,
 	.init_irq	= gic_init_irq,
diff --git a/arch/arm/mach-realview/realview_pbx.c b/arch/arm/mach-realview/realview_pbx.c
index 02b755b..b89e28f 100644
--- a/arch/arm/mach-realview/realview_pbx.c
+++ b/arch/arm/mach-realview/realview_pbx.c
@@ -414,7 +414,7 @@ static void __init realview_pbx_init(void)
 
 MACHINE_START(REALVIEW_PBX, "ARM-RealView PBX")
 	/* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
-	.boot_params	= PHYS_OFFSET + 0x00000100,
+	.boot_params	= PLAT_PHYS_OFFSET + 0x00000100,
 	.fixup		= realview_pbx_fixup,
 	.map_io		= realview_pbx_map_io,
 	.init_irq	= gic_init_irq,
diff --git a/arch/arm/mach-s5pv210/sleep.S b/arch/arm/mach-s5pv210/sleep.S
index d4d222b..2737622 100644
--- a/arch/arm/mach-s5pv210/sleep.S
+++ b/arch/arm/mach-s5pv210/sleep.S
@@ -65,7 +65,7 @@ resume_with_mmu:
 	/*
 	 * After MMU is turned on, restore the previous MMU table.
 	 */
-	ldr	r9 , =(PAGE_OFFSET - PHYS_OFFSET)
+	ldr	r9 , =(PAGE_OFFSET - PLAT_PHYS_OFFSET)
 	add	r4, r4, r9
 	str	r12, [r4]
 
diff --git a/arch/arm/mach-tcc8k/board-tcc8000-sdk.c b/arch/arm/mach-tcc8k/board-tcc8000-sdk.c
index 7991415..fb6426d 100644
--- a/arch/arm/mach-tcc8k/board-tcc8000-sdk.c
+++ b/arch/arm/mach-tcc8k/board-tcc8000-sdk.c
@@ -54,7 +54,7 @@ static void __init tcc8k_map_io(void)
 }
 
 MACHINE_START(TCC8000_SDK, "Telechips TCC8000-SDK Demo Board")
-	.boot_params	= PHYS_OFFSET + 0x00000100,
+	.boot_params	= PLAT_PHYS_OFFSET + 0x00000100,
 	.map_io		= tcc8k_map_io,
 	.init_irq	= tcc8k_init_irq,
 	.init_machine	= tcc8k_init,
diff --git a/arch/arm/mach-vexpress/ct-ca9x4.c b/arch/arm/mach-vexpress/ct-ca9x4.c
index e628402..e9bccc5 100644
--- a/arch/arm/mach-vexpress/ct-ca9x4.c
+++ b/arch/arm/mach-vexpress/ct-ca9x4.c
@@ -243,7 +243,7 @@ static void __init ct_ca9x4_init(void)
 }
 
 MACHINE_START(VEXPRESS, "ARM-Versatile Express CA9x4")
-	.boot_params	= PHYS_OFFSET + 0x00000100,
+	.boot_params	= PLAT_PHYS_OFFSET + 0x00000100,
 	.map_io		= ct_ca9x4_map_io,
 	.init_irq	= ct_ca9x4_init_irq,
 #if 0
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 72+ messages in thread

* [RFC 2/5] ARM: P2V: avoid initializers and assembly using PHYS_OFFSET
@ 2011-01-04 20:22   ` Russell King - ARM Linux
  0 siblings, 0 replies; 72+ messages in thread
From: Russell King - ARM Linux @ 2011-01-04 20:22 UTC (permalink / raw)
  To: linux-arm-kernel

As PHYS_OFFSET will be becoming a variable, we can't have it used in
initializers nor assembly code.  Replace those in generic code with
a run-time initialization.  Replace those in platform code using the
individual platform specific PLAT_PHYS_OFFSET.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/kernel/setup.c                  |    4 +++-
 arch/arm/mach-msm/board-msm7x27.c        |    8 ++++----
 arch/arm/mach-msm/board-msm7x30.c        |    6 +++---
 arch/arm/mach-msm/board-qsd8x50.c        |    4 ++--
 arch/arm/mach-msm/board-sapphire.c       |    2 +-
 arch/arm/mach-mx5/board-cpuimx51.c       |    2 +-
 arch/arm/mach-mx5/board-cpuimx51sd.c     |    2 +-
 arch/arm/mach-mx5/board-mx51_3ds.c       |    2 +-
 arch/arm/mach-pxa/balloon3.c             |    2 +-
 arch/arm/mach-realview/realview_eb.c     |    2 +-
 arch/arm/mach-realview/realview_pb1176.c |    2 +-
 arch/arm/mach-realview/realview_pb11mp.c |    2 +-
 arch/arm/mach-realview/realview_pba8.c   |    2 +-
 arch/arm/mach-realview/realview_pbx.c    |    2 +-
 arch/arm/mach-s5pv210/sleep.S            |    2 +-
 arch/arm/mach-tcc8k/board-tcc8000-sdk.c  |    2 +-
 arch/arm/mach-vexpress/ct-ca9x4.c        |    2 +-
 17 files changed, 25 insertions(+), 23 deletions(-)

diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 3455ad3..f67e682 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -705,7 +705,7 @@ static struct init_tags {
 	{ tag_size(tag_core), ATAG_CORE },
 	{ 1, PAGE_SIZE, 0xff },
 	{ tag_size(tag_mem32), ATAG_MEM },
-	{ MEM_SIZE, PHYS_OFFSET },
+	{ MEM_SIZE },
 	{ 0, ATAG_NONE }
 };
 
@@ -804,6 +804,8 @@ void __init setup_arch(char **cmdline_p)
 	struct machine_desc *mdesc;
 	char *from = default_command_line;
 
+	tags->mem.start = PHYS_OFFSET;
+
 	unwind_init();
 
 	setup_processor();
diff --git a/arch/arm/mach-msm/board-msm7x27.c b/arch/arm/mach-msm/board-msm7x27.c
index e7a76ef..08fcd40 100644
--- a/arch/arm/mach-msm/board-msm7x27.c
+++ b/arch/arm/mach-msm/board-msm7x27.c
@@ -132,7 +132,7 @@ static void __init msm7x2x_map_io(void)
 MACHINE_START(MSM7X27_SURF, "QCT MSM7x27 SURF")
 #ifdef CONFIG_MSM_DEBUG_UART
 #endif
-	.boot_params	= PHYS_OFFSET + 0x100,
+	.boot_params	= PLAT_PHYS_OFFSET + 0x100,
 	.map_io		= msm7x2x_map_io,
 	.init_irq	= msm7x2x_init_irq,
 	.init_machine	= msm7x2x_init,
@@ -142,7 +142,7 @@ MACHINE_END
 MACHINE_START(MSM7X27_FFA, "QCT MSM7x27 FFA")
 #ifdef CONFIG_MSM_DEBUG_UART
 #endif
-	.boot_params	= PHYS_OFFSET + 0x100,
+	.boot_params	= PLAT_PHYS_OFFSET + 0x100,
 	.map_io		= msm7x2x_map_io,
 	.init_irq	= msm7x2x_init_irq,
 	.init_machine	= msm7x2x_init,
@@ -152,7 +152,7 @@ MACHINE_END
 MACHINE_START(MSM7X25_SURF, "QCT MSM7x25 SURF")
 #ifdef CONFIG_MSM_DEBUG_UART
 #endif
-	.boot_params	= PHYS_OFFSET + 0x100,
+	.boot_params	= PLAT_PHYS_OFFSET + 0x100,
 	.map_io		= msm7x2x_map_io,
 	.init_irq	= msm7x2x_init_irq,
 	.init_machine	= msm7x2x_init,
@@ -162,7 +162,7 @@ MACHINE_END
 MACHINE_START(MSM7X25_FFA, "QCT MSM7x25 FFA")
 #ifdef CONFIG_MSM_DEBUG_UART
 #endif
-	.boot_params	= PHYS_OFFSET + 0x100,
+	.boot_params	= PLAT_PHYS_OFFSET + 0x100,
 	.map_io		= msm7x2x_map_io,
 	.init_irq	= msm7x2x_init_irq,
 	.init_machine	= msm7x2x_init,
diff --git a/arch/arm/mach-msm/board-msm7x30.c b/arch/arm/mach-msm/board-msm7x30.c
index 1931e07..eb1d1b1 100644
--- a/arch/arm/mach-msm/board-msm7x30.c
+++ b/arch/arm/mach-msm/board-msm7x30.c
@@ -65,7 +65,7 @@ static void __init msm7x30_map_io(void)
 MACHINE_START(MSM7X30_SURF, "QCT MSM7X30 SURF")
 #ifdef CONFIG_MSM_DEBUG_UART
 #endif
-	.boot_params = PHYS_OFFSET + 0x100,
+	.boot_params = PLAT_PHYS_OFFSET + 0x100,
 	.map_io = msm7x30_map_io,
 	.init_irq = msm7x30_init_irq,
 	.init_machine = msm7x30_init,
@@ -75,7 +75,7 @@ MACHINE_END
 MACHINE_START(MSM7X30_FFA, "QCT MSM7X30 FFA")
 #ifdef CONFIG_MSM_DEBUG_UART
 #endif
-	.boot_params = PHYS_OFFSET + 0x100,
+	.boot_params = PLAT_PHYS_OFFSET + 0x100,
 	.map_io = msm7x30_map_io,
 	.init_irq = msm7x30_init_irq,
 	.init_machine = msm7x30_init,
@@ -85,7 +85,7 @@ MACHINE_END
 MACHINE_START(MSM7X30_FLUID, "QCT MSM7X30 FLUID")
 #ifdef CONFIG_MSM_DEBUG_UART
 #endif
-	.boot_params = PHYS_OFFSET + 0x100,
+	.boot_params = PLAT_PHYS_OFFSET + 0x100,
 	.map_io = msm7x30_map_io,
 	.init_irq = msm7x30_init_irq,
 	.init_machine = msm7x30_init,
diff --git a/arch/arm/mach-msm/board-qsd8x50.c b/arch/arm/mach-msm/board-qsd8x50.c
index ed2af4a..41892ed 100644
--- a/arch/arm/mach-msm/board-qsd8x50.c
+++ b/arch/arm/mach-msm/board-qsd8x50.c
@@ -99,7 +99,7 @@ static void __init qsd8x50_init(void)
 MACHINE_START(QSD8X50_SURF, "QCT QSD8X50 SURF")
 #ifdef CONFIG_MSM_DEBUG_UART
 #endif
-	.boot_params = PHYS_OFFSET + 0x100,
+	.boot_params = PLAT_PHYS_OFFSET + 0x100,
 	.map_io = qsd8x50_map_io,
 	.init_irq = qsd8x50_init_irq,
 	.init_machine = qsd8x50_init,
@@ -109,7 +109,7 @@ MACHINE_END
 MACHINE_START(QSD8X50A_ST1_5, "QCT QSD8X50A ST1.5")
 #ifdef CONFIG_MSM_DEBUG_UART
 #endif
-	.boot_params = PHYS_OFFSET + 0x100,
+	.boot_params = PLAT_PHYS_OFFSET + 0x100,
 	.map_io = qsd8x50_map_io,
 	.init_irq = qsd8x50_init_irq,
 	.init_machine = qsd8x50_init,
diff --git a/arch/arm/mach-msm/board-sapphire.c b/arch/arm/mach-msm/board-sapphire.c
index 8919ffb..83604f5 100644
--- a/arch/arm/mach-msm/board-sapphire.c
+++ b/arch/arm/mach-msm/board-sapphire.c
@@ -107,7 +107,7 @@ MACHINE_START(SAPPHIRE, "sapphire")
 /* Maintainer: Brian Swetland <swetland@google.com> */
 #ifdef CONFIG_MSM_DEBUG_UART
 #endif
-	.boot_params    = PHYS_OFFSET + 0x100,
+	.boot_params    = PLAT_PHYS_OFFSET + 0x100,
 	.fixup          = sapphire_fixup,
 	.map_io         = sapphire_map_io,
 	.init_irq       = sapphire_init_irq,
diff --git a/arch/arm/mach-mx5/board-cpuimx51.c b/arch/arm/mach-mx5/board-cpuimx51.c
index 6a9792f..c4c3a9c 100644
--- a/arch/arm/mach-mx5/board-cpuimx51.c
+++ b/arch/arm/mach-mx5/board-cpuimx51.c
@@ -292,7 +292,7 @@ static struct sys_timer mxc_timer = {
 
 MACHINE_START(EUKREA_CPUIMX51, "Eukrea CPUIMX51 Module")
 	/* Maintainer: Eric B??nard <eric@eukrea.com> */
-	.boot_params = PHYS_OFFSET + 0x100,
+	.boot_params = PLAT_PHYS_OFFSET + 0x100,
 	.map_io = mx51_map_io,
 	.init_irq = mx51_init_irq,
 	.init_machine = eukrea_cpuimx51_init,
diff --git a/arch/arm/mach-mx5/board-cpuimx51sd.c b/arch/arm/mach-mx5/board-cpuimx51sd.c
index 4b3a611..b887381 100644
--- a/arch/arm/mach-mx5/board-cpuimx51sd.c
+++ b/arch/arm/mach-mx5/board-cpuimx51sd.c
@@ -323,7 +323,7 @@ static struct sys_timer mxc_timer = {
 
 MACHINE_START(EUKREA_CPUIMX51SD, "Eukrea CPUIMX51SD")
 	/* Maintainer: Eric B??nard <eric@eukrea.com> */
-	.boot_params = PHYS_OFFSET + 0x100,
+	.boot_params = PLAT_PHYS_OFFSET + 0x100,
 	.map_io = mx51_map_io,
 	.init_irq = mx51_init_irq,
 	.init_machine = eukrea_cpuimx51sd_init,
diff --git a/arch/arm/mach-mx5/board-mx51_3ds.c b/arch/arm/mach-mx5/board-mx51_3ds.c
index 79ce8dc..10e6ce3 100644
--- a/arch/arm/mach-mx5/board-mx51_3ds.c
+++ b/arch/arm/mach-mx5/board-mx51_3ds.c
@@ -186,7 +186,7 @@ static struct sys_timer mxc_timer = {
 
 MACHINE_START(MX51_3DS, "Freescale MX51 3-Stack Board")
 	/* Maintainer: Freescale Semiconductor, Inc. */
-	.boot_params = PHYS_OFFSET + 0x100,
+	.boot_params = PLAT_PHYS_OFFSET + 0x100,
 	.map_io = mx51_map_io,
 	.init_irq = mx51_init_irq,
 	.init_machine = mxc_board_init,
diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c
index ccb2d0c..abcc646 100644
--- a/arch/arm/mach-pxa/balloon3.c
+++ b/arch/arm/mach-pxa/balloon3.c
@@ -824,5 +824,5 @@ MACHINE_START(BALLOON3, "Balloon3")
 	.init_irq	= balloon3_init_irq,
 	.timer		= &pxa_timer,
 	.init_machine	= balloon3_init,
-	.boot_params	= PHYS_OFFSET + 0x100,
+	.boot_params	= PLAT_PHYS_OFFSET + 0x100,
 MACHINE_END
diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c
index 6ef5c5e..8ede983 100644
--- a/arch/arm/mach-realview/realview_eb.c
+++ b/arch/arm/mach-realview/realview_eb.c
@@ -484,7 +484,7 @@ static void __init realview_eb_init(void)
 
 MACHINE_START(REALVIEW_EB, "ARM-RealView EB")
 	/* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
-	.boot_params	= PHYS_OFFSET + 0x00000100,
+	.boot_params	= PLAT_PHYS_OFFSET + 0x00000100,
 	.fixup		= realview_fixup,
 	.map_io		= realview_eb_map_io,
 	.init_irq	= gic_init_irq,
diff --git a/arch/arm/mach-realview/realview_pb1176.c b/arch/arm/mach-realview/realview_pb1176.c
index cbdc97a..9f26369 100644
--- a/arch/arm/mach-realview/realview_pb1176.c
+++ b/arch/arm/mach-realview/realview_pb1176.c
@@ -379,7 +379,7 @@ static void __init realview_pb1176_init(void)
 
 MACHINE_START(REALVIEW_PB1176, "ARM-RealView PB1176")
 	/* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
-	.boot_params	= PHYS_OFFSET + 0x00000100,
+	.boot_params	= PLAT_PHYS_OFFSET + 0x00000100,
 	.fixup		= realview_pb1176_fixup,
 	.map_io		= realview_pb1176_map_io,
 	.init_irq	= gic_init_irq,
diff --git a/arch/arm/mach-realview/realview_pb11mp.c b/arch/arm/mach-realview/realview_pb11mp.c
index 8e8ab7d..dea06b2 100644
--- a/arch/arm/mach-realview/realview_pb11mp.c
+++ b/arch/arm/mach-realview/realview_pb11mp.c
@@ -381,7 +381,7 @@ static void __init realview_pb11mp_init(void)
 
 MACHINE_START(REALVIEW_PB11MP, "ARM-RealView PB11MPCore")
 	/* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
-	.boot_params	= PHYS_OFFSET + 0x00000100,
+	.boot_params	= PLAT_PHYS_OFFSET + 0x00000100,
 	.fixup		= realview_fixup,
 	.map_io		= realview_pb11mp_map_io,
 	.init_irq	= gic_init_irq,
diff --git a/arch/arm/mach-realview/realview_pba8.c b/arch/arm/mach-realview/realview_pba8.c
index 841118e..7d0f173 100644
--- a/arch/arm/mach-realview/realview_pba8.c
+++ b/arch/arm/mach-realview/realview_pba8.c
@@ -331,7 +331,7 @@ static void __init realview_pba8_init(void)
 
 MACHINE_START(REALVIEW_PBA8, "ARM-RealView PB-A8")
 	/* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
-	.boot_params	= PHYS_OFFSET + 0x00000100,
+	.boot_params	= PLAT_PHYS_OFFSET + 0x00000100,
 	.fixup		= realview_fixup,
 	.map_io		= realview_pba8_map_io,
 	.init_irq	= gic_init_irq,
diff --git a/arch/arm/mach-realview/realview_pbx.c b/arch/arm/mach-realview/realview_pbx.c
index 02b755b..b89e28f 100644
--- a/arch/arm/mach-realview/realview_pbx.c
+++ b/arch/arm/mach-realview/realview_pbx.c
@@ -414,7 +414,7 @@ static void __init realview_pbx_init(void)
 
 MACHINE_START(REALVIEW_PBX, "ARM-RealView PBX")
 	/* Maintainer: ARM Ltd/Deep Blue Solutions Ltd */
-	.boot_params	= PHYS_OFFSET + 0x00000100,
+	.boot_params	= PLAT_PHYS_OFFSET + 0x00000100,
 	.fixup		= realview_pbx_fixup,
 	.map_io		= realview_pbx_map_io,
 	.init_irq	= gic_init_irq,
diff --git a/arch/arm/mach-s5pv210/sleep.S b/arch/arm/mach-s5pv210/sleep.S
index d4d222b..2737622 100644
--- a/arch/arm/mach-s5pv210/sleep.S
+++ b/arch/arm/mach-s5pv210/sleep.S
@@ -65,7 +65,7 @@ resume_with_mmu:
 	/*
 	 * After MMU is turned on, restore the previous MMU table.
 	 */
-	ldr	r9 , =(PAGE_OFFSET - PHYS_OFFSET)
+	ldr	r9 , =(PAGE_OFFSET - PLAT_PHYS_OFFSET)
 	add	r4, r4, r9
 	str	r12, [r4]
 
diff --git a/arch/arm/mach-tcc8k/board-tcc8000-sdk.c b/arch/arm/mach-tcc8k/board-tcc8000-sdk.c
index 7991415..fb6426d 100644
--- a/arch/arm/mach-tcc8k/board-tcc8000-sdk.c
+++ b/arch/arm/mach-tcc8k/board-tcc8000-sdk.c
@@ -54,7 +54,7 @@ static void __init tcc8k_map_io(void)
 }
 
 MACHINE_START(TCC8000_SDK, "Telechips TCC8000-SDK Demo Board")
-	.boot_params	= PHYS_OFFSET + 0x00000100,
+	.boot_params	= PLAT_PHYS_OFFSET + 0x00000100,
 	.map_io		= tcc8k_map_io,
 	.init_irq	= tcc8k_init_irq,
 	.init_machine	= tcc8k_init,
diff --git a/arch/arm/mach-vexpress/ct-ca9x4.c b/arch/arm/mach-vexpress/ct-ca9x4.c
index e628402..e9bccc5 100644
--- a/arch/arm/mach-vexpress/ct-ca9x4.c
+++ b/arch/arm/mach-vexpress/ct-ca9x4.c
@@ -243,7 +243,7 @@ static void __init ct_ca9x4_init(void)
 }
 
 MACHINE_START(VEXPRESS, "ARM-Versatile Express CA9x4")
-	.boot_params	= PHYS_OFFSET + 0x00000100,
+	.boot_params	= PLAT_PHYS_OFFSET + 0x00000100,
 	.map_io		= ct_ca9x4_map_io,
 	.init_irq	= ct_ca9x4_init_irq,
 #if 0
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 72+ messages in thread

* [RFC 3/5] ARM: P2V: make head.S use PLAT_PHYS_OFFSET
  2011-01-04 20:20 ` Russell King - ARM Linux
                   ` (2 preceding siblings ...)
  (?)
@ 2011-01-04 20:22 ` Russell King - ARM Linux
  2011-01-04 21:13   ` Nicolas Pitre
  -1 siblings, 1 reply; 72+ messages in thread
From: Russell King - ARM Linux @ 2011-01-04 20:22 UTC (permalink / raw)
  To: linux-arm-kernel

head.S makes use of PHYS_OFFSET.  When it becomes a variable, the
assembler won't understand this.  Switch it to use PLAT_PHYS_OFFSET
for the time being, until this code is properly updated.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/kernel/head.S |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
index f17d9a0..aedd80e 100644
--- a/arch/arm/kernel/head.S
+++ b/arch/arm/kernel/head.S
@@ -26,12 +26,12 @@
 #include <mach/debug-macro.S>
 #endif
 
-#if (PHYS_OFFSET & 0x001fffff)
-#error "PHYS_OFFSET must be at an even 2MiB boundary!"
+#if (PLAT_PHYS_OFFSET & 0x001fffff)
+#error "PLAT_PHYS_OFFSET must be at an even 2MiB boundary!"
 #endif
 
 #define KERNEL_RAM_VADDR	(PAGE_OFFSET + TEXT_OFFSET)
-#define KERNEL_RAM_PADDR	(PHYS_OFFSET + TEXT_OFFSET)
+#define KERNEL_RAM_PADDR	(PLAT_PHYS_OFFSET + TEXT_OFFSET)
 
 
 /*
@@ -208,9 +208,9 @@ __create_page_tables:
 	 * Then map first 1MB of ram in case it contains our boot params.
 	 */
 	add	r0, r4, #PAGE_OFFSET >> 18
-	orr	r6, r7, #(PHYS_OFFSET & 0xff000000)
-	.if	(PHYS_OFFSET & 0x00f00000)
-	orr	r6, r6, #(PHYS_OFFSET & 0x00f00000)
+	orr	r6, r7, #(PLAT_PHYS_OFFSET & 0xff000000)
+	.if	(PLAT_PHYS_OFFSET & 0x00f00000)
+	orr	r6, r6, #(PLAT_PHYS_OFFSET & 0x00f00000)
 	.endif
 	str	r6, [r0]
 
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 72+ messages in thread

* [RFC 4/5] ARM: P2V: introduce phys_to_virt/virt_to_phys runtime patching
  2011-01-04 20:20 ` Russell King - ARM Linux
                   ` (3 preceding siblings ...)
  (?)
@ 2011-01-04 20:23 ` Russell King - ARM Linux
  2011-01-04 21:27   ` Nicolas Pitre
  2011-02-09 12:17   ` Jamie Iles
  -1 siblings, 2 replies; 72+ messages in thread
From: Russell King - ARM Linux @ 2011-01-04 20:23 UTC (permalink / raw)
  To: linux-arm-kernel

This idea came from Nicolas, Eric Miao produced an initial version,
which was then rewritten into this.

Patch the physical to virtual translations at runtime.  As we modify
the code, this makes it incompatible with XIP kernels, but on allows
is to achieve this with minimal loss of performance.

As many translations are of the form:

	physical = virtual + (PHYS_OFFSET - PAGE_OFFSET)
	virtual = physical - (PHYS_OFFSET - PAGE_OFFSET)

we generate an 'add' instruction for __virt_to_phys(), and a 'sub'
instruction for __phys_to_virt().  We calculate at run time (PHYS_OFFSET
- PAGE_OFFSET) by comparing the address prior to MMU initialization with
where it should be once the MMU has been initialized, and place this
constant into the above add/sub instructions.

Once we have (PHYS_OFFSET - PAGE_OFFSET), we can calcuate the real
PHYS_OFFSET as PAGE_OFFSET is a build-time constant, and save this for
the C-mode PHYS_OFFSET variable definition to use.

At present, we are unable to support Realview with Sparsemem enabled
as this uses a complex mapping function, and MSM as this requires a
constant which will not fit in our math instruction.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/Kconfig              |   14 +++++++++
 arch/arm/include/asm/memory.h |   55 ++++++++++++++++++++++++++++--------
 arch/arm/kernel/head.S        |   63 +++++++++++++++++++++++++++++++++++++++++
 arch/arm/kernel/module.c      |   23 ++++++++++++++-
 arch/arm/kernel/setup.c       |    2 +-
 arch/arm/kernel/vmlinux.lds.S |    4 ++
 6 files changed, 147 insertions(+), 14 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 7b155b0..801192b 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -196,6 +196,19 @@ config VECTORS_BASE
 	help
 	  The base address of exception vectors.
 
+config ARM_PATCH_PHYS_VIRT
+	bool "Patch physical to virtual translations at runtime (EXPERIMENTAL)"
+	depends on EXPERIMENTAL
+	depends on !XIP_KERNEL && !THUMB2_KERNEL && MMU
+	depends on !ARCH_MSM
+	depends on !ARCH_REALVIEW || !SPARSEMEM
+	help
+	  Patch phys-to-virt translation functions at runtime according to
+	  the position of the kernel in system memory.
+
+	  This can only be used with non-XIP, non-Thumb2, MMU kernels where
+	  the base of physical memory is at a 16MB boundary.
+
 source "init/Kconfig"
 
 source "kernel/Kconfig.freezer"
@@ -608,6 +621,7 @@ config ARCH_PXA
 	select TICK_ONESHOT
 	select PLAT_PXA
 	select SPARSE_IRQ
+	select ARM_PATCH_PHYS_VIRT
 	help
 	  Support for Intel/Marvell's PXA2xx/PXA3xx processor line.
 
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
index 00b04ae..288b690 100644
--- a/arch/arm/include/asm/memory.h
+++ b/arch/arm/include/asm/memory.h
@@ -24,8 +24,6 @@
  */
 #define UL(x) _AC(x, UL)
 
-#define PHYS_OFFSET	PLAT_PHYS_OFFSET
-
 #ifdef CONFIG_MMU
 
 /*
@@ -135,16 +133,6 @@
 #endif
 
 /*
- * Physical vs virtual RAM address space conversion.  These are
- * private definitions which should NOT be used outside memory.h
- * files.  Use virt_to_phys/phys_to_virt/__pa/__va instead.
- */
-#ifndef __virt_to_phys
-#define __virt_to_phys(x)	((x) - PAGE_OFFSET + PHYS_OFFSET)
-#define __phys_to_virt(x)	((x) - PHYS_OFFSET + PAGE_OFFSET)
-#endif
-
-/*
  * Convert a physical address to a Page Frame Number and back
  */
 #define	__phys_to_pfn(paddr)	((paddr) >> PAGE_SHIFT)
@@ -159,6 +147,49 @@
 #ifndef __ASSEMBLY__
 
 /*
+ * Physical vs virtual RAM address space conversion.  These are
+ * private definitions which should NOT be used outside memory.h
+ * files.  Use virt_to_phys/phys_to_virt/__pa/__va instead.
+ */
+#ifndef __virt_to_phys
+#ifdef CONFIG_ARM_PATCH_PHYS_VIRT
+
+extern unsigned long __pv_phys_offset;
+#define PHYS_OFFSET __pv_phys_offset
+
+#define __pv_stub(from,to,instr)			\
+	__asm__("@ __pv_stub\n"				\
+	"1:	" instr "	%0, %1, %2\n"		\
+	"	.pushsection .pv_table,\"a\"\n"		\
+	"	.long	1b\n"				\
+	"	.popsection\n"				\
+	: "=r" (to)					\
+	: "r" (from), "I" (1))
+
+static inline unsigned long __virt_to_phys(unsigned long x)
+{
+	unsigned long t;
+	__pv_stub(x, t, "add");
+	return t;
+}
+
+static inline unsigned long __phys_to_virt(unsigned long x)
+{
+	unsigned long t;
+	__pv_stub(x, t, "sub");
+	return t;
+}
+#else
+#define __virt_to_phys(x)	((x) - PAGE_OFFSET + PHYS_OFFSET)
+#define __phys_to_virt(x)	((x) - PHYS_OFFSET + PAGE_OFFSET)
+#endif
+#endif
+
+#ifndef PHYS_OFFSET
+#define PHYS_OFFSET	PLAT_PHYS_OFFSET
+#endif
+
+/*
  * The DMA mask corresponding to the maximum bus address allocatable
  * using GFP_DMA.  The default here places no restriction on DMA
  * allocations.  This must be the smallest DMA mask in the system,
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
index aedd80e..258b0ca 100644
--- a/arch/arm/kernel/head.S
+++ b/arch/arm/kernel/head.S
@@ -100,6 +100,9 @@ ENTRY(stext)
 #ifdef CONFIG_SMP_ON_UP
 	bl	__fixup_smp
 #endif
+#ifdef CONFIG_ARM_PATCH_PHYS_VIRT
+	bl	__fixup_pv_table
+#endif
 	bl	__create_page_tables
 
 	/*
@@ -445,4 +448,64 @@ smp_on_up:
 
 #endif
 
+#ifdef CONFIG_ARM_PATCH_PHYS_VIRT
+
+/* __fixup_pv_table - patch the stub instructions with the delta between
+ * PHYS_OFFSET and PAGE_OFFSET, which is assumed to be 16MiB aligned and
+ * can be expressed by an immediate shifter operand. The stub instruction
+ * has a form of '(add|sub) rd, rn, #imm'.
+ */
+__fixup_pv_table:
+	adr	r0, 1f
+	ldmia	r0, {r3-r5,r7,ip}
+	sub	r3, r0, r3	@ PHYS_OFFSET - PAGE_OFFSET
+	add	r4, r4, r3	@ adjust table start address
+	add	r5, r5, r3	@ adjust table end address
+	add	ip, ip, r3	@ our PHYS_OFFSET
+	str	ip, [r7, r3]!	@ save to __pv_phys_offset
+	mov	r6, r3, lsr #24	@ constant for add/sub instructions
+	teq	r3, r6, lsl #24 @ must be 16MiB aligned
+	bne	__error
+	orr	r6, r6, #0x400	@ mask in rotate right 8 bits
+	str	r6, [r7, #4]	@ save to __pv_offset
+__fixup_a_pv_table:
+2:	cmp	r4, r5
+	ldrlo	r7, [r4], #4
+	ldrlo	ip, [r7, r3]
+	bic	ip, ip, #0x000000ff
+	bic	ip, ip, #0x00000f00
+	orr	ip, ip, r6
+	strlo	ip, [r7, r3]
+	blo	2b
+	mov	pc, lr
+ENDPROC(__fixup_phys_virt)
+
+ENTRY(fixup_pv_table)
+	stmfd	sp!, {r4 - r7, lr}
+	ldr	r2, 2f			@ get address of __pv_phys_offset
+	mov	r3, #0			@ no offset
+	mov	r4, r0			@ r0 = table start
+	add	r5, r0, r1		@ r1 = table size
+	ldr	r6, [r2, #4]		@ get __pv_offset
+	bl	__fixup_a_pv_table
+	ldmfd	sp!, {r4 - r7, pc}
+ENDPROC(fixup_pv_table)
+
+	.align
+1:	.long	.
+	.long	__pv_table_begin
+	.long	__pv_table_end
+2:	.long	__pv_phys_offset
+	.long	PAGE_OFFSET
+
+	.data
+	.globl	__pv_phys_offset
+	.type	__pv_phys_offset, %object
+__pv_phys_offset:
+	.long	0
+	.size	__pv_phys_offset, . - __pv_phys_offset
+__pv_offset:
+	.long	0
+#endif
+
 #include "head-common.S"
diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c
index 0c1bb68..6a42e17 100644
--- a/arch/arm/kernel/module.c
+++ b/arch/arm/kernel/module.c
@@ -276,12 +276,28 @@ struct mod_unwind_map {
 	const Elf_Shdr *txt_sec;
 };
 
+static const Elf_Shdr *find_mod_section(const Elf32_Ehdr *hdr,
+	const Elf_Shdr *sechdrs, const char *name)
+{
+	const Elf_Shdr *s, *se;
+	const char *secstrs = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;
+
+	for (s = sechdrs, se = sechdrs + hdr->e_shnum; s < se; s++)
+		if (strcmp(name, secstrs + s->sh_name) == 0)
+			return s;
+
+	return NULL;
+}
+
+extern void fixup_pv_table(const void *, unsigned long);
+
 int module_finalize(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs,
 		    struct module *mod)
 {
+	const Elf_Shdr *s = NULL;
 #ifdef CONFIG_ARM_UNWIND
 	const char *secstrs = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;
-	const Elf_Shdr *s, *sechdrs_end = sechdrs + hdr->e_shnum;
+	const Elf_Shdr *sechdrs_end = sechdrs + hdr->e_shnum;
 	struct mod_unwind_map maps[ARM_SEC_MAX];
 	int i;
 
@@ -323,6 +339,11 @@ int module_finalize(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs,
 					         maps[i].txt_sec->sh_addr,
 					         maps[i].txt_sec->sh_size);
 #endif
+#ifdef CONFIG_ARM_PATCH_PHYS_VIRT
+	s = find_mod_section(hdr, sechdrs, ".pv_table");
+	if (s)
+		fixup_pv_table((void *)s->sh_addr, s->sh_size);
+#endif
 	return 0;
 }
 
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index f67e682..7c5499d 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -804,7 +804,7 @@ void __init setup_arch(char **cmdline_p)
 	struct machine_desc *mdesc;
 	char *from = default_command_line;
 
-	tags->mem.start = PHYS_OFFSET;
+	init_tags.mem.start = PHYS_OFFSET;
 
 	unwind_init();
 
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
index 86b66f3..45b5651 100644
--- a/arch/arm/kernel/vmlinux.lds.S
+++ b/arch/arm/kernel/vmlinux.lds.S
@@ -57,6 +57,10 @@ SECTIONS
 		__smpalt_end = .;
 #endif
 
+		__pv_table_begin = .;
+			*(.pv_table)
+		__pv_table_end = .;
+
 		INIT_SETUP(16)
 
 		INIT_CALLS
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 72+ messages in thread

* [RFC 5/5] ARM: P2V: extend to 16-bit translation offsets
  2011-01-04 20:20 ` Russell King - ARM Linux
                   ` (4 preceding siblings ...)
  (?)
@ 2011-01-04 20:23 ` Russell King - ARM Linux
  2011-01-04 21:41   ` Nicolas Pitre
                     ` (2 more replies)
  -1 siblings, 3 replies; 72+ messages in thread
From: Russell King - ARM Linux @ 2011-01-04 20:23 UTC (permalink / raw)
  To: linux-arm-kernel

MSM's memory is aligned to 2MB, which is more than we can do with our
existing method as we're limited to the upper 8 bits.  Extend this by
using two instructions to 16 bits, automatically selected when MSM is
enabled.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/Kconfig              |    5 ++++-
 arch/arm/include/asm/memory.h |   14 ++++++++++----
 arch/arm/kernel/head.S        |   18 ++++++++++++++++--
 3 files changed, 30 insertions(+), 7 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 801192b..8a753cb 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -200,7 +200,6 @@ config ARM_PATCH_PHYS_VIRT
 	bool "Patch physical to virtual translations at runtime (EXPERIMENTAL)"
 	depends on EXPERIMENTAL
 	depends on !XIP_KERNEL && !THUMB2_KERNEL && MMU
-	depends on !ARCH_MSM
 	depends on !ARCH_REALVIEW || !SPARSEMEM
 	help
 	  Patch phys-to-virt translation functions at runtime according to
@@ -209,6 +208,10 @@ config ARM_PATCH_PHYS_VIRT
 	  This can only be used with non-XIP, non-Thumb2, MMU kernels where
 	  the base of physical memory is at a 16MB boundary.
 
+config ARM_PATCH_PHYS_VIRT_16BIT
+	def_bool y
+	depends on ARM_PATCH_PHYS_VIRT && ARCH_MSM
+
 source "init/Kconfig"
 
 source "kernel/Kconfig.freezer"
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
index 288b690..e2b54fd 100644
--- a/arch/arm/include/asm/memory.h
+++ b/arch/arm/include/asm/memory.h
@@ -157,26 +157,32 @@
 extern unsigned long __pv_phys_offset;
 #define PHYS_OFFSET __pv_phys_offset
 
-#define __pv_stub(from,to,instr)			\
+#define __pv_stub(from,to,instr,type)			\
 	__asm__("@ __pv_stub\n"				\
 	"1:	" instr "	%0, %1, %2\n"		\
 	"	.pushsection .pv_table,\"a\"\n"		\
 	"	.long	1b\n"				\
 	"	.popsection\n"				\
 	: "=r" (to)					\
-	: "r" (from), "I" (1))
+	: "r" (from), "I" (type))
 
 static inline unsigned long __virt_to_phys(unsigned long x)
 {
 	unsigned long t;
-	__pv_stub(x, t, "add");
+	__pv_stub(x, t, "add", 1);
+#ifdef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT
+	__pv_stub(t, t, "add", 0);
+#endif
 	return t;
 }
 
 static inline unsigned long __phys_to_virt(unsigned long x)
 {
 	unsigned long t;
-	__pv_stub(x, t, "sub");
+	__pv_stub(x, t, "sub", 1);
+#ifdef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT
+	__pv_stub(t, t, "sub", 0);
+#endif
 	return t;
 }
 #else
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
index 258b0ca..c0b77a0 100644
--- a/arch/arm/kernel/head.S
+++ b/arch/arm/kernel/head.S
@@ -463,18 +463,32 @@ __fixup_pv_table:
 	add	r5, r5, r3	@ adjust table end address
 	add	ip, ip, r3	@ our PHYS_OFFSET
 	str	ip, [r7, r3]!	@ save to __pv_phys_offset
+#ifndef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT
 	mov	r6, r3, lsr #24	@ constant for add/sub instructions
 	teq	r3, r6, lsl #24 @ must be 16MiB aligned
+#else
+	mov	r6, r3, lsr #16	@ constant for add/sub instructions
+	teq	r3, r6, lsl #16	@ must be 64kiB aligned
+#endif
 	bne	__error
-	orr	r6, r6, #0x400	@ mask in rotate right 8 bits
 	str	r6, [r7, #4]	@ save to __pv_offset
 __fixup_a_pv_table:
+#ifdef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT
+	and	r0, r6, #255	@ offset bits 23-16
+	mov	r6, r6, lsr #8	@ offset bits 31-24
+	orr	r0, r0, #0x400	@ mask in rotate right 8 bits
+#else
+	mov	r0, #0		@ just in case...
+#endif
+	orr	r6, r6, #0x400	@ mask in rotate right 8 bits
 2:	cmp	r4, r5
 	ldrlo	r7, [r4], #4
 	ldrlo	ip, [r7, r3]
+	tst	ip, #1		@ existing constant tells us LS or MS byte
 	bic	ip, ip, #0x000000ff
 	bic	ip, ip, #0x00000f00
-	orr	ip, ip, r6
+	orrne	ip, ip, r6	@ mask in offset bits 31-24
+	orreq	ip, ip, r0	@ mask in offset bits 23-16
 	strlo	ip, [r7, r3]
 	blo	2b
 	mov	pc, lr
-- 
1.6.2.5

^ permalink raw reply related	[flat|nested] 72+ messages in thread

* Re: [RFC 1/5] ARM: P2V: separate PHYS_OFFSET from platform definitions
  2011-01-04 20:22   ` Russell King - ARM Linux
@ 2011-01-04 21:10     ` Nicolas Pitre
  -1 siblings, 0 replies; 72+ messages in thread
From: Nicolas Pitre @ 2011-01-04 21:10 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Viresh Kumar, Srinidhi Kasagar, Kevin Hilman, Anton Vorontsov,
	Lennert Buytenhek, Kukjin Kim, Erik Gilling, linux-sh,
	Vincent Sanders, Hans J. Koch, Magnus Damm, Marc Singer,
	Tony Lindgren, David Brown, Alessandro Rubini, Jiandong Zheng,
	Wan ZongShun, linux-arm-msm, Olof Johansson, Ryan Mallon,
	linux-samsung-soc, Ben Dooks, linux-tegra, linux-omap,
	linux-arm-kernel

On Tue, 4 Jan 2011, Russell King - ARM Linux wrote:

> This uncouple PHYS_OFFSET from the platform definitions, thereby
> facilitating run-time computation of the physical memory offset.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>

This might even be a good time to merge such patch now even if the later 
patches don't make it into the next merge window as this would produce 
fewer conflicts later.


Nicolas

^ permalink raw reply	[flat|nested] 72+ messages in thread

* [RFC 1/5] ARM: P2V: separate PHYS_OFFSET from platform definitions
@ 2011-01-04 21:10     ` Nicolas Pitre
  0 siblings, 0 replies; 72+ messages in thread
From: Nicolas Pitre @ 2011-01-04 21:10 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, 4 Jan 2011, Russell King - ARM Linux wrote:

> This uncouple PHYS_OFFSET from the platform definitions, thereby
> facilitating run-time computation of the physical memory offset.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>

This might even be a good time to merge such patch now even if the later 
patches don't make it into the next merge window as this would produce 
fewer conflicts later.


Nicolas

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [RFC 2/5] ARM: P2V: avoid initializers and assembly using PHYS_OFFSET
  2011-01-04 20:22   ` Russell King - ARM Linux
@ 2011-01-04 21:12     ` Nicolas Pitre
  -1 siblings, 0 replies; 72+ messages in thread
From: Nicolas Pitre @ 2011-01-04 21:12 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: David Brown, Daniel Walker, Bryan Huntsman, Amit Kucheria,
	Sascha Hauer, Eric Miao, Kukjin Kim, Hans J. Koch,
	linux-arm-kernel, linux-arm-msm, linux-samsung-soc

On Tue, 4 Jan 2011, Russell King - ARM Linux wrote:

> As PHYS_OFFSET will be becoming a variable, we can't have it used in
> initializers nor assembly code.  Replace those in generic code with
> a run-time initialization.  Replace those in platform code using the
> individual platform specific PLAT_PHYS_OFFSET.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>

Same comment as for 1/5.


Nicolas

^ permalink raw reply	[flat|nested] 72+ messages in thread

* [RFC 2/5] ARM: P2V: avoid initializers and assembly using PHYS_OFFSET
@ 2011-01-04 21:12     ` Nicolas Pitre
  0 siblings, 0 replies; 72+ messages in thread
From: Nicolas Pitre @ 2011-01-04 21:12 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, 4 Jan 2011, Russell King - ARM Linux wrote:

> As PHYS_OFFSET will be becoming a variable, we can't have it used in
> initializers nor assembly code.  Replace those in generic code with
> a run-time initialization.  Replace those in platform code using the
> individual platform specific PLAT_PHYS_OFFSET.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>

Same comment as for 1/5.


Nicolas

^ permalink raw reply	[flat|nested] 72+ messages in thread

* [RFC 3/5] ARM: P2V: make head.S use PLAT_PHYS_OFFSET
  2011-01-04 20:22 ` [RFC 3/5] ARM: P2V: make head.S use PLAT_PHYS_OFFSET Russell King - ARM Linux
@ 2011-01-04 21:13   ` Nicolas Pitre
  2011-02-07 16:12     ` Tony Lindgren
  0 siblings, 1 reply; 72+ messages in thread
From: Nicolas Pitre @ 2011-01-04 21:13 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, 4 Jan 2011, Russell King - ARM Linux wrote:

> head.S makes use of PHYS_OFFSET.  When it becomes a variable, the
> assembler won't understand this.  Switch it to use PLAT_PHYS_OFFSET
> for the time being, until this code is properly updated.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Right...  One thing at a time.

Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>


Nicolas

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [RFC 1/5] ARM: P2V: separate PHYS_OFFSET from platform definitions
  2011-01-04 20:22   ` Russell King - ARM Linux
@ 2011-01-04 21:23     ` Uwe Kleine-König
  -1 siblings, 0 replies; 72+ messages in thread
From: Uwe Kleine-König @ 2011-01-04 21:23 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Viresh Kumar, Srinidhi Kasagar, Kevin Hilman, Anton Vorontsov,
	Lennert Buytenhek, Kukjin Kim, linux-sh, Vincent Sanders,
	Hans J. Koch, Magnus Damm, Scott Branden, Marc Singer,
	Tony Lindgren, David Brown, Alessandro Rubini, Sascha Hauer,
	Wan ZongShun, linux-arm-msm, STEricsson, Ryan Mallon,
	linux-samsung-soc, Ben Dooks, linux-tegra, linux-omap

Hello Russell,

On Tue, Jan 04, 2011 at 08:22:17PM +0000, Russell King - ARM Linux wrote:
> This uncouple PHYS_OFFSET from the platform definitions, thereby
> facilitating run-time computation of the physical memory offset.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
>  arch/arm/include/asm/memory.h                  |    2 ++
>  arch/arm/kernel/tcm.c                          |    2 +-
>  arch/arm/mach-aaec2000/include/mach/memory.h   |    2 +-
>  arch/arm/mach-at91/include/mach/memory.h       |    2 +-
>  arch/arm/mach-bcmring/include/mach/hardware.h  |    2 +-
>  arch/arm/mach-bcmring/include/mach/memory.h    |    2 +-
>  arch/arm/mach-clps711x/include/mach/memory.h   |    2 +-
>  arch/arm/mach-cns3xxx/include/mach/memory.h    |    2 +-
>  arch/arm/mach-davinci/include/mach/memory.h    |    4 ++--
>  arch/arm/mach-dove/include/mach/memory.h       |    2 +-
>  arch/arm/mach-ebsa110/include/mach/memory.h    |    2 +-
>  arch/arm/mach-ep93xx/include/mach/memory.h     |   10 +++++-----
>  arch/arm/mach-footbridge/include/mach/memory.h |    2 +-
>  arch/arm/mach-h720x/include/mach/memory.h      |    2 +-
>  arch/arm/mach-integrator/include/mach/memory.h |    2 +-
>  arch/arm/mach-iop13xx/include/mach/memory.h    |    2 +-
>  arch/arm/mach-iop32x/include/mach/memory.h     |    2 +-
>  arch/arm/mach-iop33x/include/mach/memory.h     |    2 +-
>  arch/arm/mach-ixp2000/include/mach/memory.h    |    2 +-
>  arch/arm/mach-ixp23xx/include/mach/memory.h    |    2 +-
>  arch/arm/mach-ixp4xx/include/mach/memory.h     |    2 +-
>  arch/arm/mach-kirkwood/include/mach/memory.h   |    2 +-
>  arch/arm/mach-ks8695/include/mach/memory.h     |    2 +-
>  arch/arm/mach-lh7a40x/include/mach/memory.h    |    2 +-
>  arch/arm/mach-loki/include/mach/memory.h       |    2 +-
>  arch/arm/mach-lpc32xx/include/mach/memory.h    |    2 +-
>  arch/arm/mach-mmp/include/mach/memory.h        |    2 +-
>  arch/arm/mach-msm/board-msm7x30.c              |    2 +-
>  arch/arm/mach-msm/include/mach/memory.h        |   10 +++++-----
>  arch/arm/mach-mv78xx0/include/mach/memory.h    |    2 +-
>  arch/arm/mach-mx3/mach-kzm_arm11_01.c          |    2 +-
>  arch/arm/mach-netx/include/mach/memory.h       |    2 +-
>  arch/arm/mach-nomadik/include/mach/memory.h    |    2 +-
>  arch/arm/mach-ns9xxx/include/mach/memory.h     |    2 +-
>  arch/arm/mach-nuc93x/include/mach/memory.h     |    2 +-
>  arch/arm/mach-orion5x/include/mach/memory.h    |    2 +-
>  arch/arm/mach-pnx4008/include/mach/memory.h    |    2 +-
>  arch/arm/mach-pxa/include/mach/memory.h        |    2 +-
>  arch/arm/mach-realview/include/mach/memory.h   |    4 ++--
>  arch/arm/mach-rpc/include/mach/memory.h        |    2 +-
>  arch/arm/mach-s3c2400/include/mach/memory.h    |    2 +-
>  arch/arm/mach-s3c2410/include/mach/memory.h    |    2 +-
>  arch/arm/mach-s3c24a0/include/mach/memory.h    |    2 +-
>  arch/arm/mach-s3c64xx/include/mach/memory.h    |    2 +-
>  arch/arm/mach-s5p6442/include/mach/memory.h    |    2 +-
>  arch/arm/mach-s5p64x0/include/mach/memory.h    |    2 +-
>  arch/arm/mach-s5pc100/include/mach/memory.h    |    2 +-
>  arch/arm/mach-s5pv210/include/mach/memory.h    |    2 +-
>  arch/arm/mach-s5pv310/include/mach/memory.h    |    2 +-
>  arch/arm/mach-sa1100/include/mach/memory.h     |    2 +-
>  arch/arm/mach-shark/include/mach/memory.h      |    2 +-
>  arch/arm/mach-shmobile/include/mach/memory.h   |    2 +-
>  arch/arm/mach-tegra/include/mach/memory.h      |    2 +-
>  arch/arm/mach-u300/include/mach/memory.h       |    6 +++---
>  arch/arm/mach-u300/u300.c                      |    2 +-
>  arch/arm/mach-ux500/include/mach/memory.h      |    2 +-
>  arch/arm/mach-versatile/include/mach/memory.h  |    2 +-
>  arch/arm/mach-vexpress/include/mach/memory.h   |    2 +-
>  arch/arm/mach-w90x900/include/mach/memory.h    |    2 +-
>  arch/arm/plat-omap/include/plat/memory.h       |    4 ++--
>  arch/arm/plat-spear/include/plat/memory.h      |    2 +-
>  arch/arm/plat-stmp3xxx/include/mach/memory.h   |    2 +-
>  arch/arm/plat-tcc/include/mach/memory.h        |    2 +-
>  63 files changed, 77 insertions(+), 75 deletions(-)
You didn't touch arch/arm/plat-mxc/include/mach/memory.h which defines
PHYS_OFFSET, too.  I assume you just missed these?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 72+ messages in thread

* [RFC 1/5] ARM: P2V: separate PHYS_OFFSET from platform definitions
@ 2011-01-04 21:23     ` Uwe Kleine-König
  0 siblings, 0 replies; 72+ messages in thread
From: Uwe Kleine-König @ 2011-01-04 21:23 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Russell,

On Tue, Jan 04, 2011 at 08:22:17PM +0000, Russell King - ARM Linux wrote:
> This uncouple PHYS_OFFSET from the platform definitions, thereby
> facilitating run-time computation of the physical memory offset.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
>  arch/arm/include/asm/memory.h                  |    2 ++
>  arch/arm/kernel/tcm.c                          |    2 +-
>  arch/arm/mach-aaec2000/include/mach/memory.h   |    2 +-
>  arch/arm/mach-at91/include/mach/memory.h       |    2 +-
>  arch/arm/mach-bcmring/include/mach/hardware.h  |    2 +-
>  arch/arm/mach-bcmring/include/mach/memory.h    |    2 +-
>  arch/arm/mach-clps711x/include/mach/memory.h   |    2 +-
>  arch/arm/mach-cns3xxx/include/mach/memory.h    |    2 +-
>  arch/arm/mach-davinci/include/mach/memory.h    |    4 ++--
>  arch/arm/mach-dove/include/mach/memory.h       |    2 +-
>  arch/arm/mach-ebsa110/include/mach/memory.h    |    2 +-
>  arch/arm/mach-ep93xx/include/mach/memory.h     |   10 +++++-----
>  arch/arm/mach-footbridge/include/mach/memory.h |    2 +-
>  arch/arm/mach-h720x/include/mach/memory.h      |    2 +-
>  arch/arm/mach-integrator/include/mach/memory.h |    2 +-
>  arch/arm/mach-iop13xx/include/mach/memory.h    |    2 +-
>  arch/arm/mach-iop32x/include/mach/memory.h     |    2 +-
>  arch/arm/mach-iop33x/include/mach/memory.h     |    2 +-
>  arch/arm/mach-ixp2000/include/mach/memory.h    |    2 +-
>  arch/arm/mach-ixp23xx/include/mach/memory.h    |    2 +-
>  arch/arm/mach-ixp4xx/include/mach/memory.h     |    2 +-
>  arch/arm/mach-kirkwood/include/mach/memory.h   |    2 +-
>  arch/arm/mach-ks8695/include/mach/memory.h     |    2 +-
>  arch/arm/mach-lh7a40x/include/mach/memory.h    |    2 +-
>  arch/arm/mach-loki/include/mach/memory.h       |    2 +-
>  arch/arm/mach-lpc32xx/include/mach/memory.h    |    2 +-
>  arch/arm/mach-mmp/include/mach/memory.h        |    2 +-
>  arch/arm/mach-msm/board-msm7x30.c              |    2 +-
>  arch/arm/mach-msm/include/mach/memory.h        |   10 +++++-----
>  arch/arm/mach-mv78xx0/include/mach/memory.h    |    2 +-
>  arch/arm/mach-mx3/mach-kzm_arm11_01.c          |    2 +-
>  arch/arm/mach-netx/include/mach/memory.h       |    2 +-
>  arch/arm/mach-nomadik/include/mach/memory.h    |    2 +-
>  arch/arm/mach-ns9xxx/include/mach/memory.h     |    2 +-
>  arch/arm/mach-nuc93x/include/mach/memory.h     |    2 +-
>  arch/arm/mach-orion5x/include/mach/memory.h    |    2 +-
>  arch/arm/mach-pnx4008/include/mach/memory.h    |    2 +-
>  arch/arm/mach-pxa/include/mach/memory.h        |    2 +-
>  arch/arm/mach-realview/include/mach/memory.h   |    4 ++--
>  arch/arm/mach-rpc/include/mach/memory.h        |    2 +-
>  arch/arm/mach-s3c2400/include/mach/memory.h    |    2 +-
>  arch/arm/mach-s3c2410/include/mach/memory.h    |    2 +-
>  arch/arm/mach-s3c24a0/include/mach/memory.h    |    2 +-
>  arch/arm/mach-s3c64xx/include/mach/memory.h    |    2 +-
>  arch/arm/mach-s5p6442/include/mach/memory.h    |    2 +-
>  arch/arm/mach-s5p64x0/include/mach/memory.h    |    2 +-
>  arch/arm/mach-s5pc100/include/mach/memory.h    |    2 +-
>  arch/arm/mach-s5pv210/include/mach/memory.h    |    2 +-
>  arch/arm/mach-s5pv310/include/mach/memory.h    |    2 +-
>  arch/arm/mach-sa1100/include/mach/memory.h     |    2 +-
>  arch/arm/mach-shark/include/mach/memory.h      |    2 +-
>  arch/arm/mach-shmobile/include/mach/memory.h   |    2 +-
>  arch/arm/mach-tegra/include/mach/memory.h      |    2 +-
>  arch/arm/mach-u300/include/mach/memory.h       |    6 +++---
>  arch/arm/mach-u300/u300.c                      |    2 +-
>  arch/arm/mach-ux500/include/mach/memory.h      |    2 +-
>  arch/arm/mach-versatile/include/mach/memory.h  |    2 +-
>  arch/arm/mach-vexpress/include/mach/memory.h   |    2 +-
>  arch/arm/mach-w90x900/include/mach/memory.h    |    2 +-
>  arch/arm/plat-omap/include/plat/memory.h       |    4 ++--
>  arch/arm/plat-spear/include/plat/memory.h      |    2 +-
>  arch/arm/plat-stmp3xxx/include/mach/memory.h   |    2 +-
>  arch/arm/plat-tcc/include/mach/memory.h        |    2 +-
>  63 files changed, 77 insertions(+), 75 deletions(-)
You didn't touch arch/arm/plat-mxc/include/mach/memory.h which defines
PHYS_OFFSET, too.  I assume you just missed these?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 72+ messages in thread

* [RFC 4/5] ARM: P2V: introduce phys_to_virt/virt_to_phys runtime patching
  2011-01-04 20:23 ` [RFC 4/5] ARM: P2V: introduce phys_to_virt/virt_to_phys runtime patching Russell King - ARM Linux
@ 2011-01-04 21:27   ` Nicolas Pitre
  2011-01-05  0:08     ` Russell King - ARM Linux
  2011-02-09 12:17   ` Jamie Iles
  1 sibling, 1 reply; 72+ messages in thread
From: Nicolas Pitre @ 2011-01-04 21:27 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, 4 Jan 2011, Russell King - ARM Linux wrote:

> This idea came from Nicolas, Eric Miao produced an initial version,
> which was then rewritten into this.
> 
> Patch the physical to virtual translations at runtime.  As we modify
> the code, this makes it incompatible with XIP kernels, but on allows
> is to achieve this with minimal loss of performance.

Above sentence looks weird.

> As many translations are of the form:
> 
> 	physical = virtual + (PHYS_OFFSET - PAGE_OFFSET)
> 	virtual = physical - (PHYS_OFFSET - PAGE_OFFSET)
> 
> we generate an 'add' instruction for __virt_to_phys(), and a 'sub'
> instruction for __phys_to_virt().  We calculate at run time (PHYS_OFFSET
> - PAGE_OFFSET) by comparing the address prior to MMU initialization with
> where it should be once the MMU has been initialized, and place this
> constant into the above add/sub instructions.
> 
> Once we have (PHYS_OFFSET - PAGE_OFFSET), we can calcuate the real

s/calcuate/calculate/

> PHYS_OFFSET as PAGE_OFFSET is a build-time constant, and save this for
> the C-mode PHYS_OFFSET variable definition to use.
> 
> At present, we are unable to support Realview with Sparsemem enabled
> as this uses a complex mapping function, and MSM as this requires a
> constant which will not fit in our math instruction.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

[...]

> @@ -608,6 +621,7 @@ config ARCH_PXA
>  	select TICK_ONESHOT
>  	select PLAT_PXA
>  	select SPARSE_IRQ
> +	select ARM_PATCH_PHYS_VIRT
>  	help
>  	  Support for Intel/Marvell's PXA2xx/PXA3xx processor line.
>  

This hunk should go away.

> diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
> index 00b04ae..288b690 100644
> --- a/arch/arm/include/asm/memory.h
> +++ b/arch/arm/include/asm/memory.h
> @@ -24,8 +24,6 @@
>   */
>  #define UL(x) _AC(x, UL)
>  
> -#define PHYS_OFFSET	PLAT_PHYS_OFFSET
> -
>  #ifdef CONFIG_MMU
>  
>  /*
> @@ -135,16 +133,6 @@
>  #endif
>  
>  /*
> - * Physical vs virtual RAM address space conversion.  These are
> - * private definitions which should NOT be used outside memory.h
> - * files.  Use virt_to_phys/phys_to_virt/__pa/__va instead.
> - */
> -#ifndef __virt_to_phys
> -#define __virt_to_phys(x)	((x) - PAGE_OFFSET + PHYS_OFFSET)
> -#define __phys_to_virt(x)	((x) - PHYS_OFFSET + PAGE_OFFSET)
> -#endif
> -
> -/*
>   * Convert a physical address to a Page Frame Number and back
>   */
>  #define	__phys_to_pfn(paddr)	((paddr) >> PAGE_SHIFT)
> @@ -159,6 +147,49 @@
>  #ifndef __ASSEMBLY__
>  
>  /*
> + * Physical vs virtual RAM address space conversion.  These are
> + * private definitions which should NOT be used outside memory.h
> + * files.  Use virt_to_phys/phys_to_virt/__pa/__va instead.
> + */
> +#ifndef __virt_to_phys
> +#ifdef CONFIG_ARM_PATCH_PHYS_VIRT
> +
> +extern unsigned long __pv_phys_offset;
> +#define PHYS_OFFSET __pv_phys_offset
> +
> +#define __pv_stub(from,to,instr)			\
> +	__asm__("@ __pv_stub\n"				\
> +	"1:	" instr "	%0, %1, %2\n"		\
> +	"	.pushsection .pv_table,\"a\"\n"		\
> +	"	.long	1b\n"				\
> +	"	.popsection\n"				\
> +	: "=r" (to)					\
> +	: "r" (from), "I" (1))
> +
> +static inline unsigned long __virt_to_phys(unsigned long x)
> +{
> +	unsigned long t;
> +	__pv_stub(x, t, "add");
> +	return t;
> +}
> +
> +static inline unsigned long __phys_to_virt(unsigned long x)
> +{
> +	unsigned long t;
> +	__pv_stub(x, t, "sub");
> +	return t;
> +}
> +#else
> +#define __virt_to_phys(x)	((x) - PAGE_OFFSET + PHYS_OFFSET)
> +#define __phys_to_virt(x)	((x) - PHYS_OFFSET + PAGE_OFFSET)
> +#endif
> +#endif
> +
> +#ifndef PHYS_OFFSET
> +#define PHYS_OFFSET	PLAT_PHYS_OFFSET
> +#endif
> +
> +/*
>   * The DMA mask corresponding to the maximum bus address allocatable
>   * using GFP_DMA.  The default here places no restriction on DMA
>   * allocations.  This must be the smallest DMA mask in the system,
> diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
> index aedd80e..258b0ca 100644
> --- a/arch/arm/kernel/head.S
> +++ b/arch/arm/kernel/head.S
> @@ -100,6 +100,9 @@ ENTRY(stext)
>  #ifdef CONFIG_SMP_ON_UP
>  	bl	__fixup_smp
>  #endif
> +#ifdef CONFIG_ARM_PATCH_PHYS_VIRT
> +	bl	__fixup_pv_table
> +#endif
>  	bl	__create_page_tables
>  
>  	/*
> @@ -445,4 +448,64 @@ smp_on_up:
>  
>  #endif
>  
> +#ifdef CONFIG_ARM_PATCH_PHYS_VIRT
> +
> +/* __fixup_pv_table - patch the stub instructions with the delta between
> + * PHYS_OFFSET and PAGE_OFFSET, which is assumed to be 16MiB aligned and
> + * can be expressed by an immediate shifter operand. The stub instruction
> + * has a form of '(add|sub) rd, rn, #imm'.
> + */
> +__fixup_pv_table:
> +	adr	r0, 1f
> +	ldmia	r0, {r3-r5,r7,ip}
> +	sub	r3, r0, r3	@ PHYS_OFFSET - PAGE_OFFSET
> +	add	r4, r4, r3	@ adjust table start address
> +	add	r5, r5, r3	@ adjust table end address
> +	add	ip, ip, r3	@ our PHYS_OFFSET
> +	str	ip, [r7, r3]!	@ save to __pv_phys_offset
> +	mov	r6, r3, lsr #24	@ constant for add/sub instructions
> +	teq	r3, r6, lsl #24 @ must be 16MiB aligned
> +	bne	__error
> +	orr	r6, r6, #0x400	@ mask in rotate right 8 bits
> +	str	r6, [r7, #4]	@ save to __pv_offset

Looks to me that the code up to now, including the referenced data 
constants, can live in __init section.  But the following code should be 
in the .text section.

> +__fixup_a_pv_table:
> +2:	cmp	r4, r5
> +	ldrlo	r7, [r4], #4
> +	ldrlo	ip, [r7, r3]
> +	bic	ip, ip, #0x000000ff
> +	bic	ip, ip, #0x00000f00
> +	orr	ip, ip, r6
> +	strlo	ip, [r7, r3]
> +	blo	2b
> +	mov	pc, lr
> +ENDPROC(__fixup_phys_virt)
> +
> +ENTRY(fixup_pv_table)
> +	stmfd	sp!, {r4 - r7, lr}
> +	ldr	r2, 2f			@ get address of __pv_phys_offset
> +	mov	r3, #0			@ no offset
> +	mov	r4, r0			@ r0 = table start
> +	add	r5, r0, r1		@ r1 = table size
> +	ldr	r6, [r2, #4]		@ get __pv_offset
> +	bl	__fixup_a_pv_table
> +	ldmfd	sp!, {r4 - r7, pc}
> +ENDPROC(fixup_pv_table)
> +
> +	.align
> +1:	.long	.
> +	.long	__pv_table_begin
> +	.long	__pv_table_end
> +2:	.long	__pv_phys_offset
> +	.long	PAGE_OFFSET
> +
> +	.data
> +	.globl	__pv_phys_offset
> +	.type	__pv_phys_offset, %object
> +__pv_phys_offset:
> +	.long	0
> +	.size	__pv_phys_offset, . - __pv_phys_offset
> +__pv_offset:
> +	.long	0
> +#endif
> +
>  #include "head-common.S"
> diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c
> index 0c1bb68..6a42e17 100644
> --- a/arch/arm/kernel/module.c
> +++ b/arch/arm/kernel/module.c
> @@ -276,12 +276,28 @@ struct mod_unwind_map {
>  	const Elf_Shdr *txt_sec;
>  };
>  
> +static const Elf_Shdr *find_mod_section(const Elf32_Ehdr *hdr,
> +	const Elf_Shdr *sechdrs, const char *name)
> +{
> +	const Elf_Shdr *s, *se;
> +	const char *secstrs = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;
> +
> +	for (s = sechdrs, se = sechdrs + hdr->e_shnum; s < se; s++)
> +		if (strcmp(name, secstrs + s->sh_name) == 0)
> +			return s;
> +
> +	return NULL;
> +}
> +
> +extern void fixup_pv_table(const void *, unsigned long);
> +
>  int module_finalize(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs,
>  		    struct module *mod)
>  {
> +	const Elf_Shdr *s = NULL;
>  #ifdef CONFIG_ARM_UNWIND
>  	const char *secstrs = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;
> -	const Elf_Shdr *s, *sechdrs_end = sechdrs + hdr->e_shnum;
> +	const Elf_Shdr *sechdrs_end = sechdrs + hdr->e_shnum;
>  	struct mod_unwind_map maps[ARM_SEC_MAX];
>  	int i;
>  
> @@ -323,6 +339,11 @@ int module_finalize(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs,
>  					         maps[i].txt_sec->sh_addr,
>  					         maps[i].txt_sec->sh_size);
>  #endif
> +#ifdef CONFIG_ARM_PATCH_PHYS_VIRT
> +	s = find_mod_section(hdr, sechdrs, ".pv_table");
> +	if (s)
> +		fixup_pv_table((void *)s->sh_addr, s->sh_size);
> +#endif
>  	return 0;
>  }
>  
> diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
> index f67e682..7c5499d 100644
> --- a/arch/arm/kernel/setup.c
> +++ b/arch/arm/kernel/setup.c
> @@ -804,7 +804,7 @@ void __init setup_arch(char **cmdline_p)
>  	struct machine_desc *mdesc;
>  	char *from = default_command_line;
>  
> -	tags->mem.start = PHYS_OFFSET;
> +	init_tags.mem.start = PHYS_OFFSET;

Doesn't this belong in 2/5 instead?


Nicolas

^ permalink raw reply	[flat|nested] 72+ messages in thread

* [RFC 5/5] ARM: P2V: extend to 16-bit translation offsets
  2011-01-04 20:23 ` [RFC 5/5] ARM: P2V: extend to 16-bit translation offsets Russell King - ARM Linux
@ 2011-01-04 21:41   ` Nicolas Pitre
  2011-01-05  0:15     ` Russell King - ARM Linux
  2011-01-04 23:14   ` David Brown
  2011-01-04 23:18   ` David Brown
  2 siblings, 1 reply; 72+ messages in thread
From: Nicolas Pitre @ 2011-01-04 21:41 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, 4 Jan 2011, Russell King - ARM Linux wrote:

> MSM's memory is aligned to 2MB, which is more than we can do with our
> existing method as we're limited to the upper 8 bits.  Extend this by
> using two instructions to 16 bits, automatically selected when MSM is
> enabled.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
>  arch/arm/Kconfig              |    5 ++++-
>  arch/arm/include/asm/memory.h |   14 ++++++++++----
>  arch/arm/kernel/head.S        |   18 ++++++++++++++++--
>  3 files changed, 30 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 801192b..8a753cb 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -200,7 +200,6 @@ config ARM_PATCH_PHYS_VIRT
>  	bool "Patch physical to virtual translations at runtime (EXPERIMENTAL)"
>  	depends on EXPERIMENTAL
>  	depends on !XIP_KERNEL && !THUMB2_KERNEL && MMU
> -	depends on !ARCH_MSM
>  	depends on !ARCH_REALVIEW || !SPARSEMEM
>  	help
>  	  Patch phys-to-virt translation functions at runtime according to
> @@ -209,6 +208,10 @@ config ARM_PATCH_PHYS_VIRT
>  	  This can only be used with non-XIP, non-Thumb2, MMU kernels where
>  	  the base of physical memory is at a 16MB boundary.
>  
> +config ARM_PATCH_PHYS_VIRT_16BIT
> +	def_bool y
> +	depends on ARM_PATCH_PHYS_VIRT && ARCH_MSM
> +
>  source "init/Kconfig"
>  
>  source "kernel/Kconfig.freezer"
> diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
> index 288b690..e2b54fd 100644
> --- a/arch/arm/include/asm/memory.h
> +++ b/arch/arm/include/asm/memory.h
> @@ -157,26 +157,32 @@
>  extern unsigned long __pv_phys_offset;
>  #define PHYS_OFFSET __pv_phys_offset
>  
> -#define __pv_stub(from,to,instr)			\
> +#define __pv_stub(from,to,instr,type)			\
>  	__asm__("@ __pv_stub\n"				\
>  	"1:	" instr "	%0, %1, %2\n"		\
>  	"	.pushsection .pv_table,\"a\"\n"		\
>  	"	.long	1b\n"				\
>  	"	.popsection\n"				\
>  	: "=r" (to)					\
> -	: "r" (from), "I" (1))
> +	: "r" (from), "I" (type))
>  
>  static inline unsigned long __virt_to_phys(unsigned long x)
>  {
>  	unsigned long t;
> -	__pv_stub(x, t, "add");
> +	__pv_stub(x, t, "add", 1);
> +#ifdef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT
> +	__pv_stub(t, t, "add", 0);
> +#endif
[...]

I'd suggest making the type argument into a mask instead, something 
like:

	__pv_stub(x, t, "add", 0xff000000);
#ifdef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT
	__pv_stub(t, t, "add", 0x00ff0000);
#endif

Reasons for this are multiple:

 - This would simplifies the patching code as the rotation bitfield in 
   the instruction would already be set appropriately for the desired 
   value by the assembler.  Would only suffice to test one bit in that 
   field to determine the required constant to patch in.

 - For the Thumb2 build, we want the assembler to select the appropriate 
   encoding flavor for the add instruction from all the possibilities.  
   Giving it a constant with all bits set nicely solves this issue.

If further distinctions are needed in the future then we can use the 6 
middle bits to encode alternatives.


Nicolas

^ permalink raw reply	[flat|nested] 72+ messages in thread

* [RFC 5/5] ARM: P2V: extend to 16-bit translation offsets
  2011-01-04 20:23 ` [RFC 5/5] ARM: P2V: extend to 16-bit translation offsets Russell King - ARM Linux
  2011-01-04 21:41   ` Nicolas Pitre
@ 2011-01-04 23:14   ` David Brown
  2011-01-04 23:18   ` David Brown
  2 siblings, 0 replies; 72+ messages in thread
From: David Brown @ 2011-01-04 23:14 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 04 2011, Russell King - ARM Linux wrote:

> MSM's memory is aligned to 2MB, which is more than we can do with our
> existing method as we're limited to the upper 8 bits.  Extend this by
> using two instructions to 16 bits, automatically selected when MSM is
> enabled.

I've verified that the these 5 patches boot on an MSM QSD 8x50, both
with and without ARM_PATCH_PHYS_VIRT enabled.  I haven't tried building
with a different offset than it is running at, yet.

David

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

^ permalink raw reply	[flat|nested] 72+ messages in thread

* [RFC 5/5] ARM: P2V: extend to 16-bit translation offsets
  2011-01-04 20:23 ` [RFC 5/5] ARM: P2V: extend to 16-bit translation offsets Russell King - ARM Linux
  2011-01-04 21:41   ` Nicolas Pitre
  2011-01-04 23:14   ` David Brown
@ 2011-01-04 23:18   ` David Brown
  2011-01-05  0:13     ` Russell King - ARM Linux
  2 siblings, 1 reply; 72+ messages in thread
From: David Brown @ 2011-01-04 23:18 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 04 2011, Russell King - ARM Linux wrote:

> MSM's memory is aligned to 2MB, which is more than we can do with our
> existing method as we're limited to the upper 8 bits.  Extend this by
> using two instructions to 16 bits, automatically selected when MSM is
> enabled.

I should also add that this series adds a warning to my build when
CONFIG_ARM_PATCH_PHYS_VIRT is not defined:

  arch/arm/kernel/module.c:279: error: 'find_mod_section' defined but not used

David

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [RFC 1/5] ARM: P2V: separate PHYS_OFFSET from platform definitions
  2011-01-04 21:23     ` Uwe Kleine-König
@ 2011-01-05  0:04       ` Russell King - ARM Linux
  -1 siblings, 0 replies; 72+ messages in thread
From: Russell King - ARM Linux @ 2011-01-05  0:04 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Viresh Kumar, Srinidhi Kasagar, Kevin Hilman, Anton Vorontsov,
	Lennert Buytenhek, Kukjin Kim, linux-sh, Vincent Sanders,
	Hans J. Koch, Magnus Damm, Scott Branden, Marc Singer,
	Tony Lindgren, David Brown, Alessandro Rubini, Sascha Hauer,
	Wan ZongShun, linux-arm-msm, STEricsson, Ryan Mallon,
	linux-samsung-soc, Ben Dooks, linux-tegra, linux-omap

On Tue, Jan 04, 2011 at 10:23:59PM +0100, Uwe Kleine-König wrote:
> Hello Russell,
> 
> On Tue, Jan 04, 2011 at 08:22:17PM +0000, Russell King - ARM Linux wrote:
> > This uncouple PHYS_OFFSET from the platform definitions, thereby
> > facilitating run-time computation of the physical memory offset.
> > 
> > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> > ---
> >  arch/arm/include/asm/memory.h                  |    2 ++
> >  arch/arm/kernel/tcm.c                          |    2 +-
> >  arch/arm/mach-aaec2000/include/mach/memory.h   |    2 +-
> >  arch/arm/mach-at91/include/mach/memory.h       |    2 +-
> >  arch/arm/mach-bcmring/include/mach/hardware.h  |    2 +-
> >  arch/arm/mach-bcmring/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-clps711x/include/mach/memory.h   |    2 +-
> >  arch/arm/mach-cns3xxx/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-davinci/include/mach/memory.h    |    4 ++--
> >  arch/arm/mach-dove/include/mach/memory.h       |    2 +-
> >  arch/arm/mach-ebsa110/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-ep93xx/include/mach/memory.h     |   10 +++++-----
> >  arch/arm/mach-footbridge/include/mach/memory.h |    2 +-
> >  arch/arm/mach-h720x/include/mach/memory.h      |    2 +-
> >  arch/arm/mach-integrator/include/mach/memory.h |    2 +-
> >  arch/arm/mach-iop13xx/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-iop32x/include/mach/memory.h     |    2 +-
> >  arch/arm/mach-iop33x/include/mach/memory.h     |    2 +-
> >  arch/arm/mach-ixp2000/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-ixp23xx/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-ixp4xx/include/mach/memory.h     |    2 +-
> >  arch/arm/mach-kirkwood/include/mach/memory.h   |    2 +-
> >  arch/arm/mach-ks8695/include/mach/memory.h     |    2 +-
> >  arch/arm/mach-lh7a40x/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-loki/include/mach/memory.h       |    2 +-
> >  arch/arm/mach-lpc32xx/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-mmp/include/mach/memory.h        |    2 +-
> >  arch/arm/mach-msm/board-msm7x30.c              |    2 +-
> >  arch/arm/mach-msm/include/mach/memory.h        |   10 +++++-----
> >  arch/arm/mach-mv78xx0/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-mx3/mach-kzm_arm11_01.c          |    2 +-
> >  arch/arm/mach-netx/include/mach/memory.h       |    2 +-
> >  arch/arm/mach-nomadik/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-ns9xxx/include/mach/memory.h     |    2 +-
> >  arch/arm/mach-nuc93x/include/mach/memory.h     |    2 +-
> >  arch/arm/mach-orion5x/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-pnx4008/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-pxa/include/mach/memory.h        |    2 +-
> >  arch/arm/mach-realview/include/mach/memory.h   |    4 ++--
> >  arch/arm/mach-rpc/include/mach/memory.h        |    2 +-
> >  arch/arm/mach-s3c2400/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-s3c2410/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-s3c24a0/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-s3c64xx/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-s5p6442/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-s5p64x0/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-s5pc100/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-s5pv210/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-s5pv310/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-sa1100/include/mach/memory.h     |    2 +-
> >  arch/arm/mach-shark/include/mach/memory.h      |    2 +-
> >  arch/arm/mach-shmobile/include/mach/memory.h   |    2 +-
> >  arch/arm/mach-tegra/include/mach/memory.h      |    2 +-
> >  arch/arm/mach-u300/include/mach/memory.h       |    6 +++---
> >  arch/arm/mach-u300/u300.c                      |    2 +-
> >  arch/arm/mach-ux500/include/mach/memory.h      |    2 +-
> >  arch/arm/mach-versatile/include/mach/memory.h  |    2 +-
> >  arch/arm/mach-vexpress/include/mach/memory.h   |    2 +-
> >  arch/arm/mach-w90x900/include/mach/memory.h    |    2 +-
> >  arch/arm/plat-omap/include/plat/memory.h       |    4 ++--
> >  arch/arm/plat-spear/include/plat/memory.h      |    2 +-
> >  arch/arm/plat-stmp3xxx/include/mach/memory.h   |    2 +-
> >  arch/arm/plat-tcc/include/mach/memory.h        |    2 +-
> >  63 files changed, 77 insertions(+), 75 deletions(-)
> You didn't touch arch/arm/plat-mxc/include/mach/memory.h which defines
> PHYS_OFFSET, too.  I assume you just missed these?

Grr.

That's because it didn't match the '#define *PHYS_OFFSET' regexp I used
to find all the definitions.  This is exactly why being different from
everyone else is a bad idea - you get missed.

^ permalink raw reply	[flat|nested] 72+ messages in thread

* [RFC 1/5] ARM: P2V: separate PHYS_OFFSET from platform definitions
@ 2011-01-05  0:04       ` Russell King - ARM Linux
  0 siblings, 0 replies; 72+ messages in thread
From: Russell King - ARM Linux @ 2011-01-05  0:04 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 04, 2011 at 10:23:59PM +0100, Uwe Kleine-K?nig wrote:
> Hello Russell,
> 
> On Tue, Jan 04, 2011 at 08:22:17PM +0000, Russell King - ARM Linux wrote:
> > This uncouple PHYS_OFFSET from the platform definitions, thereby
> > facilitating run-time computation of the physical memory offset.
> > 
> > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> > ---
> >  arch/arm/include/asm/memory.h                  |    2 ++
> >  arch/arm/kernel/tcm.c                          |    2 +-
> >  arch/arm/mach-aaec2000/include/mach/memory.h   |    2 +-
> >  arch/arm/mach-at91/include/mach/memory.h       |    2 +-
> >  arch/arm/mach-bcmring/include/mach/hardware.h  |    2 +-
> >  arch/arm/mach-bcmring/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-clps711x/include/mach/memory.h   |    2 +-
> >  arch/arm/mach-cns3xxx/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-davinci/include/mach/memory.h    |    4 ++--
> >  arch/arm/mach-dove/include/mach/memory.h       |    2 +-
> >  arch/arm/mach-ebsa110/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-ep93xx/include/mach/memory.h     |   10 +++++-----
> >  arch/arm/mach-footbridge/include/mach/memory.h |    2 +-
> >  arch/arm/mach-h720x/include/mach/memory.h      |    2 +-
> >  arch/arm/mach-integrator/include/mach/memory.h |    2 +-
> >  arch/arm/mach-iop13xx/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-iop32x/include/mach/memory.h     |    2 +-
> >  arch/arm/mach-iop33x/include/mach/memory.h     |    2 +-
> >  arch/arm/mach-ixp2000/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-ixp23xx/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-ixp4xx/include/mach/memory.h     |    2 +-
> >  arch/arm/mach-kirkwood/include/mach/memory.h   |    2 +-
> >  arch/arm/mach-ks8695/include/mach/memory.h     |    2 +-
> >  arch/arm/mach-lh7a40x/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-loki/include/mach/memory.h       |    2 +-
> >  arch/arm/mach-lpc32xx/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-mmp/include/mach/memory.h        |    2 +-
> >  arch/arm/mach-msm/board-msm7x30.c              |    2 +-
> >  arch/arm/mach-msm/include/mach/memory.h        |   10 +++++-----
> >  arch/arm/mach-mv78xx0/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-mx3/mach-kzm_arm11_01.c          |    2 +-
> >  arch/arm/mach-netx/include/mach/memory.h       |    2 +-
> >  arch/arm/mach-nomadik/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-ns9xxx/include/mach/memory.h     |    2 +-
> >  arch/arm/mach-nuc93x/include/mach/memory.h     |    2 +-
> >  arch/arm/mach-orion5x/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-pnx4008/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-pxa/include/mach/memory.h        |    2 +-
> >  arch/arm/mach-realview/include/mach/memory.h   |    4 ++--
> >  arch/arm/mach-rpc/include/mach/memory.h        |    2 +-
> >  arch/arm/mach-s3c2400/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-s3c2410/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-s3c24a0/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-s3c64xx/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-s5p6442/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-s5p64x0/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-s5pc100/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-s5pv210/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-s5pv310/include/mach/memory.h    |    2 +-
> >  arch/arm/mach-sa1100/include/mach/memory.h     |    2 +-
> >  arch/arm/mach-shark/include/mach/memory.h      |    2 +-
> >  arch/arm/mach-shmobile/include/mach/memory.h   |    2 +-
> >  arch/arm/mach-tegra/include/mach/memory.h      |    2 +-
> >  arch/arm/mach-u300/include/mach/memory.h       |    6 +++---
> >  arch/arm/mach-u300/u300.c                      |    2 +-
> >  arch/arm/mach-ux500/include/mach/memory.h      |    2 +-
> >  arch/arm/mach-versatile/include/mach/memory.h  |    2 +-
> >  arch/arm/mach-vexpress/include/mach/memory.h   |    2 +-
> >  arch/arm/mach-w90x900/include/mach/memory.h    |    2 +-
> >  arch/arm/plat-omap/include/plat/memory.h       |    4 ++--
> >  arch/arm/plat-spear/include/plat/memory.h      |    2 +-
> >  arch/arm/plat-stmp3xxx/include/mach/memory.h   |    2 +-
> >  arch/arm/plat-tcc/include/mach/memory.h        |    2 +-
> >  63 files changed, 77 insertions(+), 75 deletions(-)
> You didn't touch arch/arm/plat-mxc/include/mach/memory.h which defines
> PHYS_OFFSET, too.  I assume you just missed these?

Grr.

That's because it didn't match the '#define *PHYS_OFFSET' regexp I used
to find all the definitions.  This is exactly why being different from
everyone else is a bad idea - you get missed.

^ permalink raw reply	[flat|nested] 72+ messages in thread

* [RFC 4/5] ARM: P2V: introduce phys_to_virt/virt_to_phys runtime patching
  2011-01-04 21:27   ` Nicolas Pitre
@ 2011-01-05  0:08     ` Russell King - ARM Linux
  2011-02-07 16:15       ` Tony Lindgren
  0 siblings, 1 reply; 72+ messages in thread
From: Russell King - ARM Linux @ 2011-01-05  0:08 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 04, 2011 at 04:27:37PM -0500, Nicolas Pitre wrote:
> On Tue, 4 Jan 2011, Russell King - ARM Linux wrote:
> > diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
> > index f67e682..7c5499d 100644
> > --- a/arch/arm/kernel/setup.c
> > +++ b/arch/arm/kernel/setup.c
> > @@ -804,7 +804,7 @@ void __init setup_arch(char **cmdline_p)
> >  	struct machine_desc *mdesc;
> >  	char *from = default_command_line;
> >  
> > -	tags->mem.start = PHYS_OFFSET;
> > +	init_tags.mem.start = PHYS_OFFSET;
> 
> Doesn't this belong in 2/5 instead?

It's actually the result of using interdiff with the original patch...
It'll get killed shortly.

^ permalink raw reply	[flat|nested] 72+ messages in thread

* [RFC 5/5] ARM: P2V: extend to 16-bit translation offsets
  2011-01-04 23:18   ` David Brown
@ 2011-01-05  0:13     ` Russell King - ARM Linux
  2011-02-07 16:19       ` Tony Lindgren
  0 siblings, 1 reply; 72+ messages in thread
From: Russell King - ARM Linux @ 2011-01-05  0:13 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 04, 2011 at 03:18:46PM -0800, David Brown wrote:
> On Tue, Jan 04 2011, Russell King - ARM Linux wrote:
> 
> > MSM's memory is aligned to 2MB, which is more than we can do with our
> > existing method as we're limited to the upper 8 bits.  Extend this by
> > using two instructions to 16 bits, automatically selected when MSM is
> > enabled.
> 
> I should also add that this series adds a warning to my build when
> CONFIG_ARM_PATCH_PHYS_VIRT is not defined:
> 
>   arch/arm/kernel/module.c:279: error: 'find_mod_section' defined but not used

Hmm, probably best to mark this with __maybe_unused.

Also note that I messed up the 16-23 bit shift value in this patch - it
needs:

-	orr	r0, r0, #0x400  @ mask in rotate right 8 bits
+	orr	r0, r0, #0x800  @ mask in rotate right 16 bits

^ permalink raw reply	[flat|nested] 72+ messages in thread

* [RFC 5/5] ARM: P2V: extend to 16-bit translation offsets
  2011-01-04 21:41   ` Nicolas Pitre
@ 2011-01-05  0:15     ` Russell King - ARM Linux
  0 siblings, 0 replies; 72+ messages in thread
From: Russell King - ARM Linux @ 2011-01-05  0:15 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 04, 2011 at 04:41:34PM -0500, Nicolas Pitre wrote:
> I'd suggest making the type argument into a mask instead, something 
> like:
> 
> 	__pv_stub(x, t, "add", 0xff000000);
> #ifdef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT
> 	__pv_stub(t, t, "add", 0x00ff0000);
> #endif
> 
> Reasons for this are multiple:
> 
>  - This would simplifies the patching code as the rotation bitfield in 
>    the instruction would already be set appropriately for the desired 
>    value by the assembler.  Would only suffice to test one bit in that 
>    field to determine the required constant to patch in.
> 
>  - For the Thumb2 build, we want the assembler to select the appropriate 
>    encoding flavor for the add instruction from all the possibilities.  
>    Giving it a constant with all bits set nicely solves this issue.
> 
> If further distinctions are needed in the future then we can use the 6 
> middle bits to encode alternatives.

Lets go with 0x81000000 and 0x0081000000 for the first then.  We can
count up with the 6-bit value from there.

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [RFC 1/5] ARM: P2V: separate PHYS_OFFSET from platform definitions
  2011-01-04 20:22   ` Russell King - ARM Linux
@ 2011-01-05  3:28     ` viresh kumar
  -1 siblings, 0 replies; 72+ messages in thread
From: viresh kumar @ 2011-01-05  3:28 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Srinidhi KASAGAR, Kevin Hilman, Anton Vorontsov,
	Lennert Buytenhek, Kukjin Kim, Erik Gilling, linux-sh,
	Vincent Sanders, Hans J. Koch, Magnus Damm, Marc Singer,
	Tony Lindgren, David Brown, Alessandro Rubini, Jiandong Zheng,
	Wan ZongShun, linux-arm-msm, Olof Johansson, Ryan Mallon,
	linux-samsung-soc, Ben Dooks, linux-t

On 01/05/2011 01:52 AM, Russell King - ARM Linux wrote:
> This uncouple PHYS_OFFSET from the platform definitions, thereby
> facilitating run-time computation of the physical memory offset.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> 
> diff --git a/arch/arm/plat-spear/include/plat/memory.h b/arch/arm/plat-spear/include/plat/memory.h
> index 27a4aba..7e3599e 100644
> --- a/arch/arm/plat-spear/include/plat/memory.h
> +++ b/arch/arm/plat-spear/include/plat/memory.h
> @@ -15,6 +15,6 @@
>  #define __PLAT_MEMORY_H
> 
>  /* Physical DRAM offset */
> -#define PHYS_OFFSET            UL(0x00000000)
> +#define PLAT_PHYS_OFFSET               UL(0x00000000)
> 
>  #endif /* __PLAT_MEMORY_H */

Acked-by: Viresh Kumar <viresh.kumar@st.com>

-- 
viresh

^ permalink raw reply	[flat|nested] 72+ messages in thread

* [RFC 1/5] ARM: P2V: separate PHYS_OFFSET from platform definitions
@ 2011-01-05  3:28     ` viresh kumar
  0 siblings, 0 replies; 72+ messages in thread
From: viresh kumar @ 2011-01-05  3:28 UTC (permalink / raw)
  To: linux-arm-kernel

On 01/05/2011 01:52 AM, Russell King - ARM Linux wrote:
> This uncouple PHYS_OFFSET from the platform definitions, thereby
> facilitating run-time computation of the physical memory offset.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> 
> diff --git a/arch/arm/plat-spear/include/plat/memory.h b/arch/arm/plat-spear/include/plat/memory.h
> index 27a4aba..7e3599e 100644
> --- a/arch/arm/plat-spear/include/plat/memory.h
> +++ b/arch/arm/plat-spear/include/plat/memory.h
> @@ -15,6 +15,6 @@
>  #define __PLAT_MEMORY_H
> 
>  /* Physical DRAM offset */
> -#define PHYS_OFFSET            UL(0x00000000)
> +#define PLAT_PHYS_OFFSET               UL(0x00000000)
> 
>  #endif /* __PLAT_MEMORY_H */

Acked-by: Viresh Kumar <viresh.kumar@st.com>

-- 
viresh

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [RFC 1/5] ARM: P2V: separate PHYS_OFFSET from platform definitions
  2011-01-05  0:04       ` Russell King - ARM Linux
@ 2011-01-05  6:25         ` Uwe Kleine-König
  -1 siblings, 0 replies; 72+ messages in thread
From: Uwe Kleine-König @ 2011-01-05  6:25 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Viresh Kumar, Srinidhi Kasagar, Kevin Hilman, Anton Vorontsov,
	Lennert Buytenhek, Kukjin Kim, linux-sh, Vincent Sanders,
	Hans J. Koch, Magnus Damm, Scott Branden, Marc Singer,
	Tony Lindgren, David Brown, Alessandro Rubini, Sascha Hauer,
	Wan ZongShun, linux-arm-msm, STEricsson, Ryan Mallon,
	linux-samsung-soc, Ben Dooks, linux-tegra, linux-omap

Hello Russell,

On Wed, Jan 05, 2011 at 12:04:44AM +0000, Russell King - ARM Linux wrote:
> On Tue, Jan 04, 2011 at 10:23:59PM +0100, Uwe Kleine-König wrote:
> > Hello Russell,
> > 
> > On Tue, Jan 04, 2011 at 08:22:17PM +0000, Russell King - ARM Linux wrote:
> > > This uncouple PHYS_OFFSET from the platform definitions, thereby
> > > facilitating run-time computation of the physical memory offset.
> > > 
> > > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> > > ---
> > >  arch/arm/include/asm/memory.h                  |    2 ++
> > >  arch/arm/kernel/tcm.c                          |    2 +-
> > >  arch/arm/mach-aaec2000/include/mach/memory.h   |    2 +-
> > >  arch/arm/mach-at91/include/mach/memory.h       |    2 +-
> > >  arch/arm/mach-bcmring/include/mach/hardware.h  |    2 +-
> > >  arch/arm/mach-bcmring/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-clps711x/include/mach/memory.h   |    2 +-
> > >  arch/arm/mach-cns3xxx/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-davinci/include/mach/memory.h    |    4 ++--
> > >  arch/arm/mach-dove/include/mach/memory.h       |    2 +-
> > >  arch/arm/mach-ebsa110/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-ep93xx/include/mach/memory.h     |   10 +++++-----
> > >  arch/arm/mach-footbridge/include/mach/memory.h |    2 +-
> > >  arch/arm/mach-h720x/include/mach/memory.h      |    2 +-
> > >  arch/arm/mach-integrator/include/mach/memory.h |    2 +-
> > >  arch/arm/mach-iop13xx/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-iop32x/include/mach/memory.h     |    2 +-
> > >  arch/arm/mach-iop33x/include/mach/memory.h     |    2 +-
> > >  arch/arm/mach-ixp2000/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-ixp23xx/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-ixp4xx/include/mach/memory.h     |    2 +-
> > >  arch/arm/mach-kirkwood/include/mach/memory.h   |    2 +-
> > >  arch/arm/mach-ks8695/include/mach/memory.h     |    2 +-
> > >  arch/arm/mach-lh7a40x/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-loki/include/mach/memory.h       |    2 +-
> > >  arch/arm/mach-lpc32xx/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-mmp/include/mach/memory.h        |    2 +-
> > >  arch/arm/mach-msm/board-msm7x30.c              |    2 +-
> > >  arch/arm/mach-msm/include/mach/memory.h        |   10 +++++-----
> > >  arch/arm/mach-mv78xx0/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-mx3/mach-kzm_arm11_01.c          |    2 +-
> > >  arch/arm/mach-netx/include/mach/memory.h       |    2 +-
> > >  arch/arm/mach-nomadik/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-ns9xxx/include/mach/memory.h     |    2 +-
> > >  arch/arm/mach-nuc93x/include/mach/memory.h     |    2 +-
> > >  arch/arm/mach-orion5x/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-pnx4008/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-pxa/include/mach/memory.h        |    2 +-
> > >  arch/arm/mach-realview/include/mach/memory.h   |    4 ++--
> > >  arch/arm/mach-rpc/include/mach/memory.h        |    2 +-
> > >  arch/arm/mach-s3c2400/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-s3c2410/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-s3c24a0/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-s3c64xx/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-s5p6442/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-s5p64x0/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-s5pc100/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-s5pv210/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-s5pv310/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-sa1100/include/mach/memory.h     |    2 +-
> > >  arch/arm/mach-shark/include/mach/memory.h      |    2 +-
> > >  arch/arm/mach-shmobile/include/mach/memory.h   |    2 +-
> > >  arch/arm/mach-tegra/include/mach/memory.h      |    2 +-
> > >  arch/arm/mach-u300/include/mach/memory.h       |    6 +++---
> > >  arch/arm/mach-u300/u300.c                      |    2 +-
> > >  arch/arm/mach-ux500/include/mach/memory.h      |    2 +-
> > >  arch/arm/mach-versatile/include/mach/memory.h  |    2 +-
> > >  arch/arm/mach-vexpress/include/mach/memory.h   |    2 +-
> > >  arch/arm/mach-w90x900/include/mach/memory.h    |    2 +-
> > >  arch/arm/plat-omap/include/plat/memory.h       |    4 ++--
> > >  arch/arm/plat-spear/include/plat/memory.h      |    2 +-
> > >  arch/arm/plat-stmp3xxx/include/mach/memory.h   |    2 +-
> > >  arch/arm/plat-tcc/include/mach/memory.h        |    2 +-
> > >  63 files changed, 77 insertions(+), 75 deletions(-)
> > You didn't touch arch/arm/plat-mxc/include/mach/memory.h which defines
> > PHYS_OFFSET, too.  I assume you just missed these?
> 
> Grr.
> 
> That's because it didn't match the '#define *PHYS_OFFSET' regexp I used
> to find all the definitions.  This is exactly why being different from
> everyone else is a bad idea - you get missed.
I'm sure now you already noticed for yourself you missed
arch/arm/mach-gemini/include/mach/memory.h, too.

(The command I used to find this is

	git grep -E '#[[:blank:]]*define[[:blank:]]+PHYS_OFFSET' arch/arm | grep -v '#define *PHYS_OFFSET'

in case someone used tabs after the define; doesn't seem to be the case
though.)

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 72+ messages in thread

* [RFC 1/5] ARM: P2V: separate PHYS_OFFSET from platform definitions
@ 2011-01-05  6:25         ` Uwe Kleine-König
  0 siblings, 0 replies; 72+ messages in thread
From: Uwe Kleine-König @ 2011-01-05  6:25 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Russell,

On Wed, Jan 05, 2011 at 12:04:44AM +0000, Russell King - ARM Linux wrote:
> On Tue, Jan 04, 2011 at 10:23:59PM +0100, Uwe Kleine-K?nig wrote:
> > Hello Russell,
> > 
> > On Tue, Jan 04, 2011 at 08:22:17PM +0000, Russell King - ARM Linux wrote:
> > > This uncouple PHYS_OFFSET from the platform definitions, thereby
> > > facilitating run-time computation of the physical memory offset.
> > > 
> > > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> > > ---
> > >  arch/arm/include/asm/memory.h                  |    2 ++
> > >  arch/arm/kernel/tcm.c                          |    2 +-
> > >  arch/arm/mach-aaec2000/include/mach/memory.h   |    2 +-
> > >  arch/arm/mach-at91/include/mach/memory.h       |    2 +-
> > >  arch/arm/mach-bcmring/include/mach/hardware.h  |    2 +-
> > >  arch/arm/mach-bcmring/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-clps711x/include/mach/memory.h   |    2 +-
> > >  arch/arm/mach-cns3xxx/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-davinci/include/mach/memory.h    |    4 ++--
> > >  arch/arm/mach-dove/include/mach/memory.h       |    2 +-
> > >  arch/arm/mach-ebsa110/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-ep93xx/include/mach/memory.h     |   10 +++++-----
> > >  arch/arm/mach-footbridge/include/mach/memory.h |    2 +-
> > >  arch/arm/mach-h720x/include/mach/memory.h      |    2 +-
> > >  arch/arm/mach-integrator/include/mach/memory.h |    2 +-
> > >  arch/arm/mach-iop13xx/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-iop32x/include/mach/memory.h     |    2 +-
> > >  arch/arm/mach-iop33x/include/mach/memory.h     |    2 +-
> > >  arch/arm/mach-ixp2000/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-ixp23xx/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-ixp4xx/include/mach/memory.h     |    2 +-
> > >  arch/arm/mach-kirkwood/include/mach/memory.h   |    2 +-
> > >  arch/arm/mach-ks8695/include/mach/memory.h     |    2 +-
> > >  arch/arm/mach-lh7a40x/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-loki/include/mach/memory.h       |    2 +-
> > >  arch/arm/mach-lpc32xx/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-mmp/include/mach/memory.h        |    2 +-
> > >  arch/arm/mach-msm/board-msm7x30.c              |    2 +-
> > >  arch/arm/mach-msm/include/mach/memory.h        |   10 +++++-----
> > >  arch/arm/mach-mv78xx0/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-mx3/mach-kzm_arm11_01.c          |    2 +-
> > >  arch/arm/mach-netx/include/mach/memory.h       |    2 +-
> > >  arch/arm/mach-nomadik/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-ns9xxx/include/mach/memory.h     |    2 +-
> > >  arch/arm/mach-nuc93x/include/mach/memory.h     |    2 +-
> > >  arch/arm/mach-orion5x/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-pnx4008/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-pxa/include/mach/memory.h        |    2 +-
> > >  arch/arm/mach-realview/include/mach/memory.h   |    4 ++--
> > >  arch/arm/mach-rpc/include/mach/memory.h        |    2 +-
> > >  arch/arm/mach-s3c2400/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-s3c2410/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-s3c24a0/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-s3c64xx/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-s5p6442/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-s5p64x0/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-s5pc100/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-s5pv210/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-s5pv310/include/mach/memory.h    |    2 +-
> > >  arch/arm/mach-sa1100/include/mach/memory.h     |    2 +-
> > >  arch/arm/mach-shark/include/mach/memory.h      |    2 +-
> > >  arch/arm/mach-shmobile/include/mach/memory.h   |    2 +-
> > >  arch/arm/mach-tegra/include/mach/memory.h      |    2 +-
> > >  arch/arm/mach-u300/include/mach/memory.h       |    6 +++---
> > >  arch/arm/mach-u300/u300.c                      |    2 +-
> > >  arch/arm/mach-ux500/include/mach/memory.h      |    2 +-
> > >  arch/arm/mach-versatile/include/mach/memory.h  |    2 +-
> > >  arch/arm/mach-vexpress/include/mach/memory.h   |    2 +-
> > >  arch/arm/mach-w90x900/include/mach/memory.h    |    2 +-
> > >  arch/arm/plat-omap/include/plat/memory.h       |    4 ++--
> > >  arch/arm/plat-spear/include/plat/memory.h      |    2 +-
> > >  arch/arm/plat-stmp3xxx/include/mach/memory.h   |    2 +-
> > >  arch/arm/plat-tcc/include/mach/memory.h        |    2 +-
> > >  63 files changed, 77 insertions(+), 75 deletions(-)
> > You didn't touch arch/arm/plat-mxc/include/mach/memory.h which defines
> > PHYS_OFFSET, too.  I assume you just missed these?
> 
> Grr.
> 
> That's because it didn't match the '#define *PHYS_OFFSET' regexp I used
> to find all the definitions.  This is exactly why being different from
> everyone else is a bad idea - you get missed.
I'm sure now you already noticed for yourself you missed
arch/arm/mach-gemini/include/mach/memory.h, too.

(The command I used to find this is

	git grep -E '#[[:blank:]]*define[[:blank:]]+PHYS_OFFSET' arch/arm | grep -v '#define *PHYS_OFFSET'

in case someone used tabs after the define; doesn't seem to be the case
though.)

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 72+ messages in thread

* RE: [RFC 1/5] ARM: P2V: separate PHYS_OFFSET from platform definitions
  2011-01-04 20:22   ` Russell King - ARM Linux
@ 2011-01-05 17:04     ` H Hartley Sweeten
  -1 siblings, 0 replies; 72+ messages in thread
From: H Hartley Sweeten @ 2011-01-05 17:04 UTC (permalink / raw)
  To: Russell King - ARM Linux, Nicolas Pitre
  Cc: Viresh Kumar, Srinidhi Kasagar, Kevin Hilman, Anton Vorontsov,
	Lennert Buytenhek, Kukjin Kim, Erik Gilling, linux-sh,
	Vincent Sanders, Hans J. Koch, Magnus Damm, Marc Singer,
	Tony Lindgren, David Brown, Alessandro Rubini, Jiandong Zheng,
	Wan ZongShun, linux-arm-msm, Olof Johansson, Ryan Mallon,
	linux-samsung-soc, Ben

On Tuesday, January 04, 2011 1:22 PM, Russell King wrote:
> This uncouple PHYS_OFFSET from the platform definitions, thereby
> facilitating run-time computation of the physical memory offset.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> 
> diff --git a/arch/arm/mach-ep93xx/include/mach/memory.h b/arch/arm/mach-ep93xx/include/mach/memory.h
> index 554064e..c9400cf 100644
> --- a/arch/arm/mach-ep93xx/include/mach/memory.h
> +++ b/arch/arm/mach-ep93xx/include/mach/memory.h
> @@ -6,15 +6,15 @@
>  #define __ASM_ARCH_MEMORY_H
>  
>  #if defined(CONFIG_EP93XX_SDCE3_SYNC_PHYS_OFFSET)
> -#define PHYS_OFFSET		UL(0x00000000)
> +#define PLAT_PHYS_OFFSET		UL(0x00000000)
>  #elif defined(CONFIG_EP93XX_SDCE0_PHYS_OFFSET)
> -#define PHYS_OFFSET		UL(0xc0000000)
> +#define PLAT_PHYS_OFFSET		UL(0xc0000000)
>  #elif defined(CONFIG_EP93XX_SDCE1_PHYS_OFFSET)
> -#define PHYS_OFFSET		UL(0xd0000000)
> +#define PLAT_PHYS_OFFSET		UL(0xd0000000)
>  #elif defined(CONFIG_EP93XX_SDCE2_PHYS_OFFSET)
> -#define PHYS_OFFSET		UL(0xe0000000)
> +#define PLAT_PHYS_OFFSET		UL(0xe0000000)
>  #elif defined(CONFIG_EP93XX_SDCE3_ASYNC_PHYS_OFFSET)
> -#define PHYS_OFFSET		UL(0xf0000000)
> +#define PLAT_PHYS_OFFSET		UL(0xf0000000)
>  #else
>  #error "Kconfig bug: No EP93xx PHYS_OFFSET set"
>  #endif

Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>

^ permalink raw reply	[flat|nested] 72+ messages in thread

* [RFC 1/5] ARM: P2V: separate PHYS_OFFSET from platform definitions
@ 2011-01-05 17:04     ` H Hartley Sweeten
  0 siblings, 0 replies; 72+ messages in thread
From: H Hartley Sweeten @ 2011-01-05 17:04 UTC (permalink / raw)
  To: linux-arm-kernel

On Tuesday, January 04, 2011 1:22 PM, Russell King wrote:
> This uncouple PHYS_OFFSET from the platform definitions, thereby
> facilitating run-time computation of the physical memory offset.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> 
> diff --git a/arch/arm/mach-ep93xx/include/mach/memory.h b/arch/arm/mach-ep93xx/include/mach/memory.h
> index 554064e..c9400cf 100644
> --- a/arch/arm/mach-ep93xx/include/mach/memory.h
> +++ b/arch/arm/mach-ep93xx/include/mach/memory.h
> @@ -6,15 +6,15 @@
>  #define __ASM_ARCH_MEMORY_H
>  
>  #if defined(CONFIG_EP93XX_SDCE3_SYNC_PHYS_OFFSET)
> -#define PHYS_OFFSET		UL(0x00000000)
> +#define PLAT_PHYS_OFFSET		UL(0x00000000)
>  #elif defined(CONFIG_EP93XX_SDCE0_PHYS_OFFSET)
> -#define PHYS_OFFSET		UL(0xc0000000)
> +#define PLAT_PHYS_OFFSET		UL(0xc0000000)
>  #elif defined(CONFIG_EP93XX_SDCE1_PHYS_OFFSET)
> -#define PHYS_OFFSET		UL(0xd0000000)
> +#define PLAT_PHYS_OFFSET		UL(0xd0000000)
>  #elif defined(CONFIG_EP93XX_SDCE2_PHYS_OFFSET)
> -#define PHYS_OFFSET		UL(0xe0000000)
> +#define PLAT_PHYS_OFFSET		UL(0xe0000000)
>  #elif defined(CONFIG_EP93XX_SDCE3_ASYNC_PHYS_OFFSET)
> -#define PHYS_OFFSET		UL(0xf0000000)
> +#define PLAT_PHYS_OFFSET		UL(0xf0000000)
>  #else
>  #error "Kconfig bug: No EP93xx PHYS_OFFSET set"
>  #endif

Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [RFC 1/5] ARM: P2V: separate PHYS_OFFSET from platform definitions
  2011-01-04 21:10     ` Nicolas Pitre
@ 2011-01-05 22:30       ` Russell King - ARM Linux
  -1 siblings, 0 replies; 72+ messages in thread
From: Russell King - ARM Linux @ 2011-01-05 22:30 UTC (permalink / raw)
  To: Nicolas Pitre
  Cc: Viresh Kumar, Srinidhi Kasagar, Kevin Hilman, Anton Vorontsov,
	Lennert Buytenhek, Kukjin Kim, Erik Gilling, linux-sh,
	Vincent Sanders, Hans J. Koch, Magnus Damm, Marc Singer,
	Tony Lindgren, David Brown, Alessandro Rubini, Jiandong Zheng,
	Wan ZongShun, linux-arm-msm, Olof Johansson, Ryan Mallon,
	linux-samsung-soc, Ben Dooks, linux-tegra, linux-omap,
	linux-arm-kernel

On Tue, Jan 04, 2011 at 04:10:44PM -0500, Nicolas Pitre wrote:
> On Tue, 4 Jan 2011, Russell King - ARM Linux wrote:
> 
> > This uncouple PHYS_OFFSET from the platform definitions, thereby
> > facilitating run-time computation of the physical memory offset.
> > 
> > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> 
> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
> 
> This might even be a good time to merge such patch now even if the later 
> patches don't make it into the next merge window as this would produce 
> fewer conflicts later.

I think waiting might be in order - MXC conflicts with this patch set
and needs rechecking to make sure it's right.  ATM, it's had no
visibility in linux-next.

However, it makes sense to get the likely to conflict bits in sooner
rather than later - or I need to publish them from my git tree in a
stable form so that people can include those changes in their patchsets.

^ permalink raw reply	[flat|nested] 72+ messages in thread

* [RFC 1/5] ARM: P2V: separate PHYS_OFFSET from platform definitions
@ 2011-01-05 22:30       ` Russell King - ARM Linux
  0 siblings, 0 replies; 72+ messages in thread
From: Russell King - ARM Linux @ 2011-01-05 22:30 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 04, 2011 at 04:10:44PM -0500, Nicolas Pitre wrote:
> On Tue, 4 Jan 2011, Russell King - ARM Linux wrote:
> 
> > This uncouple PHYS_OFFSET from the platform definitions, thereby
> > facilitating run-time computation of the physical memory offset.
> > 
> > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> 
> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
> 
> This might even be a good time to merge such patch now even if the later 
> patches don't make it into the next merge window as this would produce 
> fewer conflicts later.

I think waiting might be in order - MXC conflicts with this patch set
and needs rechecking to make sure it's right.  ATM, it's had no
visibility in linux-next.

However, it makes sense to get the likely to conflict bits in sooner
rather than later - or I need to publish them from my git tree in a
stable form so that people can include those changes in their patchsets.

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [RFC 1/5] ARM: P2V: separate PHYS_OFFSET from platform definitions
  2011-01-04 20:22   ` Russell King - ARM Linux
@ 2011-01-06  5:02     ` Magnus Damm
  -1 siblings, 0 replies; 72+ messages in thread
From: Magnus Damm @ 2011-01-06  5:02 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Viresh Kumar, Srinidhi Kasagar, Kevin Hilman, Anton Vorontsov,
	Lennert Buytenhek, Kukjin Kim, Erik Gilling, linux-sh,
	Vincent Sanders, Hans J. Koch, Marc Singer, Tony Lindgren,
	David Brown, Alessandro Rubini, Jiandong Zheng, Wan ZongShun,
	linux-arm-msm, Olof Johansson, Ryan Mallon, linux-samsung-soc,
	Ben Dooks, linux-tegra, linux-omap, linux-arm-kernel, Daniel

On Wed, Jan 5, 2011 at 5:22 AM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> This uncouple PHYS_OFFSET from the platform definitions, thereby
> facilitating run-time computation of the physical memory offset.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
>  arch/arm/include/asm/memory.h                  |    2 ++
>  arch/arm/kernel/tcm.c                          |    2 +-
...
>  arch/arm/mach-shmobile/include/mach/memory.h   |    2 +-

Applied on top of sh-2.6 git c422a5992e9ca072e8e472ee8f518649fb07470e
and successfully booted on a sh7372-based Mackerel board.

Acked-by: Magnus Damm <damm@opensource.se>

^ permalink raw reply	[flat|nested] 72+ messages in thread

* [RFC 1/5] ARM: P2V: separate PHYS_OFFSET from platform definitions
@ 2011-01-06  5:02     ` Magnus Damm
  0 siblings, 0 replies; 72+ messages in thread
From: Magnus Damm @ 2011-01-06  5:02 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jan 5, 2011 at 5:22 AM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> This uncouple PHYS_OFFSET from the platform definitions, thereby
> facilitating run-time computation of the physical memory offset.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
> ?arch/arm/include/asm/memory.h ? ? ? ? ? ? ? ? ?| ? ?2 ++
> ?arch/arm/kernel/tcm.c ? ? ? ? ? ? ? ? ? ? ? ? ?| ? ?2 +-
...
> ?arch/arm/mach-shmobile/include/mach/memory.h ? | ? ?2 +-

Applied on top of sh-2.6 git c422a5992e9ca072e8e472ee8f518649fb07470e
and successfully booted on a sh7372-based Mackerel board.

Acked-by: Magnus Damm <damm@opensource.se>

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [RFC 2/5] ARM: P2V: avoid initializers and assembly using PHYS_OFFSET
  2011-01-04 20:22   ` Russell King - ARM Linux
@ 2011-01-06  8:51     ` Sascha Hauer
  -1 siblings, 0 replies; 72+ messages in thread
From: Sascha Hauer @ 2011-01-06  8:51 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Nicolas Pitre, Daniel Walker, Eric Miao, linux-arm-msm,
	Hans J. Koch, linux-samsung-soc, Bryan Huntsman, Amit Kucheria,
	Sascha Hauer, Kukjin Kim, David Brown, linux-arm-kernel

On Tue, Jan 04, 2011 at 08:22:37PM +0000, Russell King - ARM Linux wrote:
> As PHYS_OFFSET will be becoming a variable, we can't have it used in
> initializers nor assembly code.  Replace those in generic code with
> a run-time initialization.  Replace those in platform code using the
> individual platform specific PLAT_PHYS_OFFSET.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
>  arch/arm/kernel/setup.c                  |    4 +++-
>  arch/arm/mach-msm/board-msm7x27.c        |    8 ++++----
>  arch/arm/mach-msm/board-msm7x30.c        |    6 +++---
>  arch/arm/mach-msm/board-qsd8x50.c        |    4 ++--
>  arch/arm/mach-msm/board-sapphire.c       |    2 +-
>  arch/arm/mach-mx5/board-cpuimx51.c       |    2 +-
>  arch/arm/mach-mx5/board-cpuimx51sd.c     |    2 +-
>  arch/arm/mach-mx5/board-mx51_3ds.c       |    2 +-
>  arch/arm/mach-pxa/balloon3.c             |    2 +-
>  arch/arm/mach-realview/realview_eb.c     |    2 +-
>  arch/arm/mach-realview/realview_pb1176.c |    2 +-
>  arch/arm/mach-realview/realview_pb11mp.c |    2 +-
>  arch/arm/mach-realview/realview_pba8.c   |    2 +-
>  arch/arm/mach-realview/realview_pbx.c    |    2 +-
>  arch/arm/mach-s5pv210/sleep.S            |    2 +-
>  arch/arm/mach-tcc8k/board-tcc8000-sdk.c  |    2 +-
>  arch/arm/mach-vexpress/ct-ca9x4.c        |    2 +-
>  17 files changed, 25 insertions(+), 23 deletions(-)
> 
> diff --git a/arch/arm/mach-mx5/board-cpuimx51.c b/arch/arm/mach-mx5/board-cpuimx51.c
> index 6a9792f..c4c3a9c 100644
> --- a/arch/arm/mach-mx5/board-cpuimx51.c
> +++ b/arch/arm/mach-mx5/board-cpuimx51.c
> @@ -292,7 +292,7 @@ static struct sys_timer mxc_timer = {
>  
>  MACHINE_START(EUKREA_CPUIMX51, "Eukrea CPUIMX51 Module")
>  	/* Maintainer: Eric B??nard <eric@eukrea.com> */
> -	.boot_params = PHYS_OFFSET + 0x100,
> +	.boot_params = PLAT_PHYS_OFFSET + 0x100,
>  	.map_io = mx51_map_io,
>  	.init_irq = mx51_init_irq,
>  	.init_machine = eukrea_cpuimx51_init,
> diff --git a/arch/arm/mach-mx5/board-cpuimx51sd.c b/arch/arm/mach-mx5/board-cpuimx51sd.c
> index 4b3a611..b887381 100644
> --- a/arch/arm/mach-mx5/board-cpuimx51sd.c
> +++ b/arch/arm/mach-mx5/board-cpuimx51sd.c
> @@ -323,7 +323,7 @@ static struct sys_timer mxc_timer = {
>  
>  MACHINE_START(EUKREA_CPUIMX51SD, "Eukrea CPUIMX51SD")
>  	/* Maintainer: Eric B??nard <eric@eukrea.com> */
> -	.boot_params = PHYS_OFFSET + 0x100,
> +	.boot_params = PLAT_PHYS_OFFSET + 0x100,
>  	.map_io = mx51_map_io,
>  	.init_irq = mx51_init_irq,
>  	.init_machine = eukrea_cpuimx51sd_init,
> diff --git a/arch/arm/mach-mx5/board-mx51_3ds.c b/arch/arm/mach-mx5/board-mx51_3ds.c
> index 79ce8dc..10e6ce3 100644
> --- a/arch/arm/mach-mx5/board-mx51_3ds.c
> +++ b/arch/arm/mach-mx5/board-mx51_3ds.c
> @@ -186,7 +186,7 @@ static struct sys_timer mxc_timer = {
>  
>  MACHINE_START(MX51_3DS, "Freescale MX51 3-Stack Board")
>  	/* Maintainer: Freescale Semiconductor, Inc. */
> -	.boot_params = PHYS_OFFSET + 0x100,
> +	.boot_params = PLAT_PHYS_OFFSET + 0x100,
>  	.map_io = mx51_map_io,
>  	.init_irq = mx51_init_irq,
>  	.init_machine = mxc_board_init,

As Russell noted this conflicts with the current i.MX branch. In current
i.MX branch we have:

-       .boot_params = PHYS_OFFSET + 0x100,
+       .boot_params = MX51_PHYS_OFFSET + 0x100,

PLAT_PHYS_OFFSET should be defined to MX51_PHYS_OFFSET, so it shouldn't
matter which solution to the conflict we choose.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

^ permalink raw reply	[flat|nested] 72+ messages in thread

* [RFC 2/5] ARM: P2V: avoid initializers and assembly using PHYS_OFFSET
@ 2011-01-06  8:51     ` Sascha Hauer
  0 siblings, 0 replies; 72+ messages in thread
From: Sascha Hauer @ 2011-01-06  8:51 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 04, 2011 at 08:22:37PM +0000, Russell King - ARM Linux wrote:
> As PHYS_OFFSET will be becoming a variable, we can't have it used in
> initializers nor assembly code.  Replace those in generic code with
> a run-time initialization.  Replace those in platform code using the
> individual platform specific PLAT_PHYS_OFFSET.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
>  arch/arm/kernel/setup.c                  |    4 +++-
>  arch/arm/mach-msm/board-msm7x27.c        |    8 ++++----
>  arch/arm/mach-msm/board-msm7x30.c        |    6 +++---
>  arch/arm/mach-msm/board-qsd8x50.c        |    4 ++--
>  arch/arm/mach-msm/board-sapphire.c       |    2 +-
>  arch/arm/mach-mx5/board-cpuimx51.c       |    2 +-
>  arch/arm/mach-mx5/board-cpuimx51sd.c     |    2 +-
>  arch/arm/mach-mx5/board-mx51_3ds.c       |    2 +-
>  arch/arm/mach-pxa/balloon3.c             |    2 +-
>  arch/arm/mach-realview/realview_eb.c     |    2 +-
>  arch/arm/mach-realview/realview_pb1176.c |    2 +-
>  arch/arm/mach-realview/realview_pb11mp.c |    2 +-
>  arch/arm/mach-realview/realview_pba8.c   |    2 +-
>  arch/arm/mach-realview/realview_pbx.c    |    2 +-
>  arch/arm/mach-s5pv210/sleep.S            |    2 +-
>  arch/arm/mach-tcc8k/board-tcc8000-sdk.c  |    2 +-
>  arch/arm/mach-vexpress/ct-ca9x4.c        |    2 +-
>  17 files changed, 25 insertions(+), 23 deletions(-)
> 
> diff --git a/arch/arm/mach-mx5/board-cpuimx51.c b/arch/arm/mach-mx5/board-cpuimx51.c
> index 6a9792f..c4c3a9c 100644
> --- a/arch/arm/mach-mx5/board-cpuimx51.c
> +++ b/arch/arm/mach-mx5/board-cpuimx51.c
> @@ -292,7 +292,7 @@ static struct sys_timer mxc_timer = {
>  
>  MACHINE_START(EUKREA_CPUIMX51, "Eukrea CPUIMX51 Module")
>  	/* Maintainer: Eric B??nard <eric@eukrea.com> */
> -	.boot_params = PHYS_OFFSET + 0x100,
> +	.boot_params = PLAT_PHYS_OFFSET + 0x100,
>  	.map_io = mx51_map_io,
>  	.init_irq = mx51_init_irq,
>  	.init_machine = eukrea_cpuimx51_init,
> diff --git a/arch/arm/mach-mx5/board-cpuimx51sd.c b/arch/arm/mach-mx5/board-cpuimx51sd.c
> index 4b3a611..b887381 100644
> --- a/arch/arm/mach-mx5/board-cpuimx51sd.c
> +++ b/arch/arm/mach-mx5/board-cpuimx51sd.c
> @@ -323,7 +323,7 @@ static struct sys_timer mxc_timer = {
>  
>  MACHINE_START(EUKREA_CPUIMX51SD, "Eukrea CPUIMX51SD")
>  	/* Maintainer: Eric B??nard <eric@eukrea.com> */
> -	.boot_params = PHYS_OFFSET + 0x100,
> +	.boot_params = PLAT_PHYS_OFFSET + 0x100,
>  	.map_io = mx51_map_io,
>  	.init_irq = mx51_init_irq,
>  	.init_machine = eukrea_cpuimx51sd_init,
> diff --git a/arch/arm/mach-mx5/board-mx51_3ds.c b/arch/arm/mach-mx5/board-mx51_3ds.c
> index 79ce8dc..10e6ce3 100644
> --- a/arch/arm/mach-mx5/board-mx51_3ds.c
> +++ b/arch/arm/mach-mx5/board-mx51_3ds.c
> @@ -186,7 +186,7 @@ static struct sys_timer mxc_timer = {
>  
>  MACHINE_START(MX51_3DS, "Freescale MX51 3-Stack Board")
>  	/* Maintainer: Freescale Semiconductor, Inc. */
> -	.boot_params = PHYS_OFFSET + 0x100,
> +	.boot_params = PLAT_PHYS_OFFSET + 0x100,
>  	.map_io = mx51_map_io,
>  	.init_irq = mx51_init_irq,
>  	.init_machine = mxc_board_init,

As Russell noted this conflicts with the current i.MX branch. In current
i.MX branch we have:

-       .boot_params = PHYS_OFFSET + 0x100,
+       .boot_params = MX51_PHYS_OFFSET + 0x100,

PLAT_PHYS_OFFSET should be defined to MX51_PHYS_OFFSET, so it shouldn't
matter which solution to the conflict we choose.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [RFC 2/5] ARM: P2V: avoid initializers and assembly using PHYS_OFFSET
  2011-01-06  8:51     ` Sascha Hauer
@ 2011-01-06  9:08       ` Russell King - ARM Linux
  -1 siblings, 0 replies; 72+ messages in thread
From: Russell King - ARM Linux @ 2011-01-06  9:08 UTC (permalink / raw)
  To: Sascha Hauer
  Cc: Nicolas Pitre, Daniel Walker, Eric Miao, linux-arm-msm,
	Hans J. Koch, linux-samsung-soc, Bryan Huntsman, Amit Kucheria,
	Sascha Hauer, Kukjin Kim, David Brown, linux-arm-kernel

On Thu, Jan 06, 2011 at 09:51:45AM +0100, Sascha Hauer wrote:
> As Russell noted this conflicts with the current i.MX branch. In current
> i.MX branch we have:
> 
> -       .boot_params = PHYS_OFFSET + 0x100,
> +       .boot_params = MX51_PHYS_OFFSET + 0x100,
> 
> PLAT_PHYS_OFFSET should be defined to MX51_PHYS_OFFSET, so it shouldn't
> matter which solution to the conflict we choose.

I've actually dropped my modifications to this files as your change
to them makes more sense longer term.

^ permalink raw reply	[flat|nested] 72+ messages in thread

* [RFC 2/5] ARM: P2V: avoid initializers and assembly using PHYS_OFFSET
@ 2011-01-06  9:08       ` Russell King - ARM Linux
  0 siblings, 0 replies; 72+ messages in thread
From: Russell King - ARM Linux @ 2011-01-06  9:08 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Jan 06, 2011 at 09:51:45AM +0100, Sascha Hauer wrote:
> As Russell noted this conflicts with the current i.MX branch. In current
> i.MX branch we have:
> 
> -       .boot_params = PHYS_OFFSET + 0x100,
> +       .boot_params = MX51_PHYS_OFFSET + 0x100,
> 
> PLAT_PHYS_OFFSET should be defined to MX51_PHYS_OFFSET, so it shouldn't
> matter which solution to the conflict we choose.

I've actually dropped my modifications to this files as your change
to them makes more sense longer term.

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [RFC 1/5] ARM: P2V: separate PHYS_OFFSET from platform definitions
  2011-01-06  5:02     ` Magnus Damm
@ 2011-02-07 15:57       ` Tony Lindgren
  -1 siblings, 0 replies; 72+ messages in thread
From: Tony Lindgren @ 2011-02-07 15:57 UTC (permalink / raw)
  To: Magnus Damm
  Cc: Viresh Kumar, Srinidhi Kasagar, Kevin Hilman, Anton Vorontsov,
	Lennert Buytenhek, Kukjin Kim, Russell King - ARM Linux,
	Erik Gilling, linux-sh, Vincent Sanders, Hans J. Koch,
	Marc Singer, David Brown, Alessandro Rubini, Jiandong Zheng,
	Wan ZongShun, linux-arm-msm, Olof Johansson, Ryan Mallon,
	linux-samsung-soc, Ben Dooks, linux-tegra, linux-omap,
	linux-arm-kernel

* Magnus Damm <magnus.damm@gmail.com> [110105 21:10]:
> On Wed, Jan 5, 2011 at 5:22 AM, Russell King - ARM Linux
> <linux@arm.linux.org.uk> wrote:
> > This uncouple PHYS_OFFSET from the platform definitions, thereby
> > facilitating run-time computation of the physical memory offset.
> >
> > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> > ---
> >  arch/arm/include/asm/memory.h                  |    2 ++
> >  arch/arm/kernel/tcm.c                          |    2 +-
> ...
> >  arch/arm/mach-shmobile/include/mach/memory.h   |    2 +-
> 
> Applied on top of sh-2.6 git c422a5992e9ca072e8e472ee8f518649fb07470e
> and successfully booted on a sh7372-based Mackerel board.
> 
> Acked-by: Magnus Damm <damm@opensource.se>

Acked-by: Tony Lindgren <tony@atomide.com>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 72+ messages in thread

* [RFC 1/5] ARM: P2V: separate PHYS_OFFSET from platform definitions
@ 2011-02-07 15:57       ` Tony Lindgren
  0 siblings, 0 replies; 72+ messages in thread
From: Tony Lindgren @ 2011-02-07 15:57 UTC (permalink / raw)
  To: linux-arm-kernel

* Magnus Damm <magnus.damm@gmail.com> [110105 21:10]:
> On Wed, Jan 5, 2011 at 5:22 AM, Russell King - ARM Linux
> <linux@arm.linux.org.uk> wrote:
> > This uncouple PHYS_OFFSET from the platform definitions, thereby
> > facilitating run-time computation of the physical memory offset.
> >
> > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> > ---
> > ?arch/arm/include/asm/memory.h ? ? ? ? ? ? ? ? ?| ? ?2 ++
> > ?arch/arm/kernel/tcm.c ? ? ? ? ? ? ? ? ? ? ? ? ?| ? ?2 +-
> ...
> > ?arch/arm/mach-shmobile/include/mach/memory.h ? | ? ?2 +-
> 
> Applied on top of sh-2.6 git c422a5992e9ca072e8e472ee8f518649fb07470e
> and successfully booted on a sh7372-based Mackerel board.
> 
> Acked-by: Magnus Damm <damm@opensource.se>

Acked-by: Tony Lindgren <tony@atomide.com>

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [RFC 2/5] ARM: P2V: avoid initializers and assembly using PHYS_OFFSET
  2011-01-06  9:08       ` Russell King - ARM Linux
@ 2011-02-07 15:59         ` Tony Lindgren
  -1 siblings, 0 replies; 72+ messages in thread
From: Tony Lindgren @ 2011-02-07 15:59 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Sascha Hauer, Daniel Walker, Eric Miao, Nicolas Pitre,
	linux-arm-msm, Hans J. Koch, Amit Kucheria, Bryan Huntsman,
	linux-samsung-soc, Sascha Hauer, Kukjin Kim, David Brown,
	linux-arm-kernel

* Russell King - ARM Linux <linux@arm.linux.org.uk> [110106 01:16]:
> On Thu, Jan 06, 2011 at 09:51:45AM +0100, Sascha Hauer wrote:
> > As Russell noted this conflicts with the current i.MX branch. In current
> > i.MX branch we have:
> > 
> > -       .boot_params = PHYS_OFFSET + 0x100,
> > +       .boot_params = MX51_PHYS_OFFSET + 0x100,
> > 
> > PLAT_PHYS_OFFSET should be defined to MX51_PHYS_OFFSET, so it shouldn't
> > matter which solution to the conflict we choose.
> 
> I've actually dropped my modifications to this files as your change
> to them makes more sense longer term.

Acked-by: Tony Lindgren <tony@atomide.com>

^ permalink raw reply	[flat|nested] 72+ messages in thread

* [RFC 2/5] ARM: P2V: avoid initializers and assembly using PHYS_OFFSET
@ 2011-02-07 15:59         ` Tony Lindgren
  0 siblings, 0 replies; 72+ messages in thread
From: Tony Lindgren @ 2011-02-07 15:59 UTC (permalink / raw)
  To: linux-arm-kernel

* Russell King - ARM Linux <linux@arm.linux.org.uk> [110106 01:16]:
> On Thu, Jan 06, 2011 at 09:51:45AM +0100, Sascha Hauer wrote:
> > As Russell noted this conflicts with the current i.MX branch. In current
> > i.MX branch we have:
> > 
> > -       .boot_params = PHYS_OFFSET + 0x100,
> > +       .boot_params = MX51_PHYS_OFFSET + 0x100,
> > 
> > PLAT_PHYS_OFFSET should be defined to MX51_PHYS_OFFSET, so it shouldn't
> > matter which solution to the conflict we choose.
> 
> I've actually dropped my modifications to this files as your change
> to them makes more sense longer term.

Acked-by: Tony Lindgren <tony@atomide.com>

^ permalink raw reply	[flat|nested] 72+ messages in thread

* [RFC 3/5] ARM: P2V: make head.S use PLAT_PHYS_OFFSET
  2011-01-04 21:13   ` Nicolas Pitre
@ 2011-02-07 16:12     ` Tony Lindgren
  0 siblings, 0 replies; 72+ messages in thread
From: Tony Lindgren @ 2011-02-07 16:12 UTC (permalink / raw)
  To: linux-arm-kernel

* Nicolas Pitre <nico@fluxnic.net> [110104 13:32]:
> On Tue, 4 Jan 2011, Russell King - ARM Linux wrote:
> 
> > head.S makes use of PHYS_OFFSET.  When it becomes a variable, the
> > assembler won't understand this.  Switch it to use PLAT_PHYS_OFFSET
> > for the time being, until this code is properly updated.
> > 
> > Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> 
> Right...  One thing at a time.
> 
> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>

With the omap DEBUG_LL fix the version of this in the p2v
branch works for omaps:

Tested-by: Tony Lindgren <tony@atomide.com>

^ permalink raw reply	[flat|nested] 72+ messages in thread

* [RFC 4/5] ARM: P2V: introduce phys_to_virt/virt_to_phys runtime patching
  2011-01-05  0:08     ` Russell King - ARM Linux
@ 2011-02-07 16:15       ` Tony Lindgren
  0 siblings, 0 replies; 72+ messages in thread
From: Tony Lindgren @ 2011-02-07 16:15 UTC (permalink / raw)
  To: linux-arm-kernel

* Russell King - ARM Linux <linux@arm.linux.org.uk> [110104 16:12]:
> On Tue, Jan 04, 2011 at 04:27:37PM -0500, Nicolas Pitre wrote:
> > On Tue, 4 Jan 2011, Russell King - ARM Linux wrote:
> > > diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
> > > index f67e682..7c5499d 100644
> > > --- a/arch/arm/kernel/setup.c
> > > +++ b/arch/arm/kernel/setup.c
> > > @@ -804,7 +804,7 @@ void __init setup_arch(char **cmdline_p)
> > >  	struct machine_desc *mdesc;
> > >  	char *from = default_command_line;
> > >  
> > > -	tags->mem.start = PHYS_OFFSET;
> > > +	init_tags.mem.start = PHYS_OFFSET;
> > 
> > Doesn't this belong in 2/5 instead?
> 
> It's actually the result of using interdiff with the original patch...
> It'll get killed shortly.

For the version in p2v branch:

Tested-by: Tony Lindgren <tony@atomide.com>

^ permalink raw reply	[flat|nested] 72+ messages in thread

* [RFC 5/5] ARM: P2V: extend to 16-bit translation offsets
  2011-01-05  0:13     ` Russell King - ARM Linux
@ 2011-02-07 16:19       ` Tony Lindgren
  0 siblings, 0 replies; 72+ messages in thread
From: Tony Lindgren @ 2011-02-07 16:19 UTC (permalink / raw)
  To: linux-arm-kernel

* Russell King - ARM Linux <linux@arm.linux.org.uk> [110104 16:27]:
> On Tue, Jan 04, 2011 at 03:18:46PM -0800, David Brown wrote:
> > On Tue, Jan 04 2011, Russell King - ARM Linux wrote:
> > 
> > > MSM's memory is aligned to 2MB, which is more than we can do with our
> > > existing method as we're limited to the upper 8 bits.  Extend this by
> > > using two instructions to 16 bits, automatically selected when MSM is
> > > enabled.
> > 
> > I should also add that this series adds a warning to my build when
> > CONFIG_ARM_PATCH_PHYS_VIRT is not defined:
> > 
> >   arch/arm/kernel/module.c:279: error: 'find_mod_section' defined but not used
> 
> Hmm, probably best to mark this with __maybe_unused.
> 
> Also note that I messed up the 16-23 bit shift value in this patch - it
> needs:
> 
> -	orr	r0, r0, #0x400  @ mask in rotate right 8 bits
> +	orr	r0, r0, #0x800  @ mask in rotate right 16 bits
> 

Can't really test this one, but things still keep working so:

Acked-by: Tony Lindgren <tony@atomide.com>

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [RFC 1/5] ARM: P2V: separate PHYS_OFFSET from platform definitions
  2011-01-04 20:22   ` Russell King - ARM Linux
@ 2011-02-07 16:36     ` Jean-Christophe PLAGNIOL-VILLARD
  -1 siblings, 0 replies; 72+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-02-07 16:36 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Viresh Kumar, Srinidhi Kasagar, Kevin Hilman, Anton Vorontsov,
	Lennert Buytenhek, Kukjin Kim, linux-sh, Vincent Sanders,
	Hans J. Koch, Magnus Damm, Scott Branden, Marc Singer,
	Tony Lindgren, David Brown, Alessandro Rubini, Sascha Hauer,
	Wan ZongShun, linux-arm-msm, STEricsson, Ryan Mallon,
	linux-samsung-soc, Ben Dooks, linux-tegra, linux-omap

On 20:22 Tue 04 Jan     , Russell King - ARM Linux wrote:
> This uncouple PHYS_OFFSET from the platform definitions, thereby
> facilitating run-time computation of the physical memory offset.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
>  arch/arm/include/asm/memory.h                  |    2 ++
>  arch/arm/kernel/tcm.c                          |    2 +-
>  arch/arm/mach-aaec2000/include/mach/memory.h   |    2 +-
>  arch/arm/mach-at91/include/mach/memory.h       |    2 +-
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

Best Regards,
J.

^ permalink raw reply	[flat|nested] 72+ messages in thread

* [RFC 1/5] ARM: P2V: separate PHYS_OFFSET from platform definitions
@ 2011-02-07 16:36     ` Jean-Christophe PLAGNIOL-VILLARD
  0 siblings, 0 replies; 72+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-02-07 16:36 UTC (permalink / raw)
  To: linux-arm-kernel

On 20:22 Tue 04 Jan     , Russell King - ARM Linux wrote:
> This uncouple PHYS_OFFSET from the platform definitions, thereby
> facilitating run-time computation of the physical memory offset.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
>  arch/arm/include/asm/memory.h                  |    2 ++
>  arch/arm/kernel/tcm.c                          |    2 +-
>  arch/arm/mach-aaec2000/include/mach/memory.h   |    2 +-
>  arch/arm/mach-at91/include/mach/memory.h       |    2 +-
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>

Best Regards,
J.

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [RFC 2/5] ARM: P2V: avoid initializers and assembly using PHYS_OFFSET
  2011-01-04 20:22   ` Russell King - ARM Linux
@ 2011-02-07 16:51     ` Uwe Kleine-König
  -1 siblings, 0 replies; 72+ messages in thread
From: Uwe Kleine-König @ 2011-02-07 16:51 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Nicolas Pitre, David Brown, Daniel Walker, Bryan Huntsman,
	Amit Kucheria, Sascha Hauer, Eric Miao, Kukjin Kim, Hans J. Koch,
	linux-arm-kernel, linux-arm-msm, linux-samsung-soc

Hi Russell,

On Tue, Jan 04, 2011 at 08:22:37PM +0000, Russell King - ARM Linux wrote:
> As PHYS_OFFSET will be becoming a variable, we can't have it used in
> initializers nor assembly code.  Replace those in generic code with
> a run-time initialization.  Replace those in platform code using the
> individual platform specific PLAT_PHYS_OFFSET.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
>  ....
>  arch/arm/mach-mx5/board-cpuimx51.c       |    2 +-
>  arch/arm/mach-mx5/board-cpuimx51sd.c     |    2 +-
>  arch/arm/mach-mx5/board-mx51_3ds.c       |    2 +-
> ...
> diff --git a/arch/arm/mach-mx5/board-cpuimx51.c b/arch/arm/mach-mx5/board-cpuimx51.c
> index 6a9792f..c4c3a9c 100644
> --- a/arch/arm/mach-mx5/board-cpuimx51.c
> +++ b/arch/arm/mach-mx5/board-cpuimx51.c
> @@ -292,7 +292,7 @@ static struct sys_timer mxc_timer = {
>  
>  MACHINE_START(EUKREA_CPUIMX51, "Eukrea CPUIMX51 Module")
>  	/* Maintainer: Eric B??nard <eric@eukrea.com> */
> -	.boot_params = PHYS_OFFSET + 0x100,
> +	.boot_params = PLAT_PHYS_OFFSET + 0x100,
>  	.map_io = mx51_map_io,
>  	.init_irq = mx51_init_irq,
>  	.init_machine = eukrea_cpuimx51_init,
> diff --git a/arch/arm/mach-mx5/board-cpuimx51sd.c b/arch/arm/mach-mx5/board-cpuimx51sd.c
> index 4b3a611..b887381 100644
> --- a/arch/arm/mach-mx5/board-cpuimx51sd.c
> +++ b/arch/arm/mach-mx5/board-cpuimx51sd.c
> @@ -323,7 +323,7 @@ static struct sys_timer mxc_timer = {
>  
>  MACHINE_START(EUKREA_CPUIMX51SD, "Eukrea CPUIMX51SD")
>  	/* Maintainer: Eric B??nard <eric@eukrea.com> */
> -	.boot_params = PHYS_OFFSET + 0x100,
> +	.boot_params = PLAT_PHYS_OFFSET + 0x100,
>  	.map_io = mx51_map_io,
>  	.init_irq = mx51_init_irq,
>  	.init_machine = eukrea_cpuimx51sd_init,
> diff --git a/arch/arm/mach-mx5/board-mx51_3ds.c b/arch/arm/mach-mx5/board-mx51_3ds.c
> index 79ce8dc..10e6ce3 100644
> --- a/arch/arm/mach-mx5/board-mx51_3ds.c
> +++ b/arch/arm/mach-mx5/board-mx51_3ds.c
> @@ -186,7 +186,7 @@ static struct sys_timer mxc_timer = {
>  
>  MACHINE_START(MX51_3DS, "Freescale MX51 3-Stack Board")
>  	/* Maintainer: Freescale Semiconductor, Inc. */
> -	.boot_params = PHYS_OFFSET + 0x100,
> +	.boot_params = PLAT_PHYS_OFFSET + 0x100,
>  	.map_io = mx51_map_io,
>  	.init_irq = mx51_init_irq,
>  	.init_machine = mxc_board_init,
nack.  7608d7d2b4a146f560436f5b99b1b93d30049e4e has a better fix.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 72+ messages in thread

* [RFC 2/5] ARM: P2V: avoid initializers and assembly using PHYS_OFFSET
@ 2011-02-07 16:51     ` Uwe Kleine-König
  0 siblings, 0 replies; 72+ messages in thread
From: Uwe Kleine-König @ 2011-02-07 16:51 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Russell,

On Tue, Jan 04, 2011 at 08:22:37PM +0000, Russell King - ARM Linux wrote:
> As PHYS_OFFSET will be becoming a variable, we can't have it used in
> initializers nor assembly code.  Replace those in generic code with
> a run-time initialization.  Replace those in platform code using the
> individual platform specific PLAT_PHYS_OFFSET.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
>  ....
>  arch/arm/mach-mx5/board-cpuimx51.c       |    2 +-
>  arch/arm/mach-mx5/board-cpuimx51sd.c     |    2 +-
>  arch/arm/mach-mx5/board-mx51_3ds.c       |    2 +-
> ...
> diff --git a/arch/arm/mach-mx5/board-cpuimx51.c b/arch/arm/mach-mx5/board-cpuimx51.c
> index 6a9792f..c4c3a9c 100644
> --- a/arch/arm/mach-mx5/board-cpuimx51.c
> +++ b/arch/arm/mach-mx5/board-cpuimx51.c
> @@ -292,7 +292,7 @@ static struct sys_timer mxc_timer = {
>  
>  MACHINE_START(EUKREA_CPUIMX51, "Eukrea CPUIMX51 Module")
>  	/* Maintainer: Eric B??nard <eric@eukrea.com> */
> -	.boot_params = PHYS_OFFSET + 0x100,
> +	.boot_params = PLAT_PHYS_OFFSET + 0x100,
>  	.map_io = mx51_map_io,
>  	.init_irq = mx51_init_irq,
>  	.init_machine = eukrea_cpuimx51_init,
> diff --git a/arch/arm/mach-mx5/board-cpuimx51sd.c b/arch/arm/mach-mx5/board-cpuimx51sd.c
> index 4b3a611..b887381 100644
> --- a/arch/arm/mach-mx5/board-cpuimx51sd.c
> +++ b/arch/arm/mach-mx5/board-cpuimx51sd.c
> @@ -323,7 +323,7 @@ static struct sys_timer mxc_timer = {
>  
>  MACHINE_START(EUKREA_CPUIMX51SD, "Eukrea CPUIMX51SD")
>  	/* Maintainer: Eric B??nard <eric@eukrea.com> */
> -	.boot_params = PHYS_OFFSET + 0x100,
> +	.boot_params = PLAT_PHYS_OFFSET + 0x100,
>  	.map_io = mx51_map_io,
>  	.init_irq = mx51_init_irq,
>  	.init_machine = eukrea_cpuimx51sd_init,
> diff --git a/arch/arm/mach-mx5/board-mx51_3ds.c b/arch/arm/mach-mx5/board-mx51_3ds.c
> index 79ce8dc..10e6ce3 100644
> --- a/arch/arm/mach-mx5/board-mx51_3ds.c
> +++ b/arch/arm/mach-mx5/board-mx51_3ds.c
> @@ -186,7 +186,7 @@ static struct sys_timer mxc_timer = {
>  
>  MACHINE_START(MX51_3DS, "Freescale MX51 3-Stack Board")
>  	/* Maintainer: Freescale Semiconductor, Inc. */
> -	.boot_params = PHYS_OFFSET + 0x100,
> +	.boot_params = PLAT_PHYS_OFFSET + 0x100,
>  	.map_io = mx51_map_io,
>  	.init_irq = mx51_init_irq,
>  	.init_machine = mxc_board_init,
nack.  7608d7d2b4a146f560436f5b99b1b93d30049e4e has a better fix.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [RFC 2/5] ARM: P2V: avoid initializers and assembly using PHYS_OFFSET
  2011-02-07 16:51     ` Uwe Kleine-König
@ 2011-02-07 16:52       ` Uwe Kleine-König
  -1 siblings, 0 replies; 72+ messages in thread
From: Uwe Kleine-König @ 2011-02-07 16:52 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Nicolas Pitre, David Brown, Daniel Walker, Bryan Huntsman,
	Amit Kucheria, Sascha Hauer, Eric Miao, Kukjin Kim, Hans J. Koch,
	linux-arm-kernel, linux-arm-msm, linux-samsung-soc

Hello again,

On Mon, Feb 07, 2011 at 05:51:50PM +0100, Uwe Kleine-König wrote:
> nack.  7608d7d2b4a146f560436f5b99b1b93d30049e4e has a better fix.
urgs, this was already pointed out, sorry.

Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 72+ messages in thread

* [RFC 2/5] ARM: P2V: avoid initializers and assembly using PHYS_OFFSET
@ 2011-02-07 16:52       ` Uwe Kleine-König
  0 siblings, 0 replies; 72+ messages in thread
From: Uwe Kleine-König @ 2011-02-07 16:52 UTC (permalink / raw)
  To: linux-arm-kernel

Hello again,

On Mon, Feb 07, 2011 at 05:51:50PM +0100, Uwe Kleine-K?nig wrote:
> nack.  7608d7d2b4a146f560436f5b99b1b93d30049e4e has a better fix.
urgs, this was already pointed out, sorry.

Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [RFC 1/5] ARM: P2V: separate PHYS_OFFSET from platform definitions
  2011-01-04 20:22   ` Russell King - ARM Linux
@ 2011-02-08 11:22     ` Wan ZongShun
  -1 siblings, 0 replies; 72+ messages in thread
From: Wan ZongShun @ 2011-02-08 11:22 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Viresh Kumar, Srinidhi Kasagar, Kevin Hilman, Anton Vorontsov,
	Lennert Buytenhek, Kukjin Kim, Erik Gilling, linux-sh,
	Vincent Sanders, Hans J. Koch, Magnus Damm, Marc Singer,
	Tony Lindgren, David Brown, Alessandro Rubini, Jiandong Zheng,
	linux-arm-msm, Olof Johansson, Ryan Mallon, linux-samsung-soc,
	Ben Dooks, linux-tegra, linux-omap, linux-arm-kernel, Daniel

2011/1/5 Russell King - ARM Linux <linux@arm.linux.org.uk>:
> This uncouple PHYS_OFFSET from the platform definitions, thereby
> facilitating run-time computation of the physical memory offset.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
>  arch/arm/include/asm/memory.h                  |    2 ++
>  arch/arm/kernel/tcm.c                          |    2 +-
>  arch/arm/mach-aaec2000/include/mach/memory.h   |    2 +-
>  arch/arm/mach-at91/include/mach/memory.h       |    2 +-
>  arch/arm/mach-bcmring/include/mach/hardware.h  |    2 +-
>  arch/arm/mach-bcmring/include/mach/memory.h    |    2 +-
>  arch/arm/mach-clps711x/include/mach/memory.h   |    2 +-
>  arch/arm/mach-cns3xxx/include/mach/memory.h    |    2 +-
>  arch/arm/mach-davinci/include/mach/memory.h    |    4 ++--
>  arch/arm/mach-dove/include/mach/memory.h       |    2 +-
>  arch/arm/mach-ebsa110/include/mach/memory.h    |    2 +-
>  arch/arm/mach-ep93xx/include/mach/memory.h     |   10 +++++-----
>  arch/arm/mach-footbridge/include/mach/memory.h |    2 +-
>  arch/arm/mach-h720x/include/mach/memory.h      |    2 +-
>  arch/arm/mach-integrator/include/mach/memory.h |    2 +-
>  arch/arm/mach-iop13xx/include/mach/memory.h    |    2 +-
>  arch/arm/mach-iop32x/include/mach/memory.h     |    2 +-
>  arch/arm/mach-iop33x/include/mach/memory.h     |    2 +-
>  arch/arm/mach-ixp2000/include/mach/memory.h    |    2 +-
>  arch/arm/mach-ixp23xx/include/mach/memory.h    |    2 +-
>  arch/arm/mach-ixp4xx/include/mach/memory.h     |    2 +-
>  arch/arm/mach-kirkwood/include/mach/memory.h   |    2 +-
>  arch/arm/mach-ks8695/include/mach/memory.h     |    2 +-
>  arch/arm/mach-lh7a40x/include/mach/memory.h    |    2 +-
>  arch/arm/mach-loki/include/mach/memory.h       |    2 +-
>  arch/arm/mach-lpc32xx/include/mach/memory.h    |    2 +-
>  arch/arm/mach-mmp/include/mach/memory.h        |    2 +-
>  arch/arm/mach-msm/board-msm7x30.c              |    2 +-
>  arch/arm/mach-msm/include/mach/memory.h        |   10 +++++-----
>  arch/arm/mach-mv78xx0/include/mach/memory.h    |    2 +-
>  arch/arm/mach-mx3/mach-kzm_arm11_01.c          |    2 +-
>  arch/arm/mach-netx/include/mach/memory.h       |    2 +-
>  arch/arm/mach-nomadik/include/mach/memory.h    |    2 +-
>  arch/arm/mach-ns9xxx/include/mach/memory.h     |    2 +-
>  arch/arm/mach-nuc93x/include/mach/memory.h     |    2 +-
>  arch/arm/mach-orion5x/include/mach/memory.h    |    2 +-
>  arch/arm/mach-pnx4008/include/mach/memory.h    |    2 +-
>  arch/arm/mach-pxa/include/mach/memory.h        |    2 +-
>  arch/arm/mach-realview/include/mach/memory.h   |    4 ++--
>  arch/arm/mach-rpc/include/mach/memory.h        |    2 +-
>  arch/arm/mach-s3c2400/include/mach/memory.h    |    2 +-
>  arch/arm/mach-s3c2410/include/mach/memory.h    |    2 +-
>  arch/arm/mach-s3c24a0/include/mach/memory.h    |    2 +-
>  arch/arm/mach-s3c64xx/include/mach/memory.h    |    2 +-
>  arch/arm/mach-s5p6442/include/mach/memory.h    |    2 +-
>  arch/arm/mach-s5p64x0/include/mach/memory.h    |    2 +-
>  arch/arm/mach-s5pc100/include/mach/memory.h    |    2 +-
>  arch/arm/mach-s5pv210/include/mach/memory.h    |    2 +-
>  arch/arm/mach-s5pv310/include/mach/memory.h    |    2 +-
>  arch/arm/mach-sa1100/include/mach/memory.h     |    2 +-
>  arch/arm/mach-shark/include/mach/memory.h      |    2 +-
>  arch/arm/mach-shmobile/include/mach/memory.h   |    2 +-
>  arch/arm/mach-tegra/include/mach/memory.h      |    2 +-
>  arch/arm/mach-u300/include/mach/memory.h       |    6 +++---
>  arch/arm/mach-u300/u300.c                      |    2 +-
>  arch/arm/mach-ux500/include/mach/memory.h      |    2 +-
>  arch/arm/mach-versatile/include/mach/memory.h  |    2 +-
>  arch/arm/mach-vexpress/include/mach/memory.h   |    2 +-
>  arch/arm/mach-w90x900/include/mach/memory.h    |    2 +-
>  arch/arm/plat-omap/include/plat/memory.h       |    4 ++--
>  arch/arm/plat-spear/include/plat/memory.h      |    2 +-
>  arch/arm/plat-stmp3xxx/include/mach/memory.h   |    2 +-
>  arch/arm/plat-tcc/include/mach/memory.h        |    2 +-
>  63 files changed, 77 insertions(+), 75 deletions(-)
>
> diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
> index 23c2e8e..00b04ae 100644
> --- a/arch/arm/include/asm/memory.h
> +++ b/arch/arm/include/asm/memory.h
> @@ -24,6 +24,8 @@
>  */
>  #define UL(x) _AC(x, UL)
>
> +#define PHYS_OFFSET    PLAT_PHYS_OFFSET
> +
>  #ifdef CONFIG_MMU
>
>  /*
> diff --git a/arch/arm/kernel/tcm.c b/arch/arm/kernel/tcm.c
> index 26685c2..f5cf660 100644
> --- a/arch/arm/kernel/tcm.c
> +++ b/arch/arm/kernel/tcm.c
> @@ -15,7 +15,7 @@
>  #include <linux/string.h> /* memcpy */
>  #include <asm/cputype.h>
>  #include <asm/mach/map.h>
> -#include <mach/memory.h>
> +#include <asm/memory.h>
>  #include "tcm.h"
>
>  static struct gen_pool *tcm_pool;
> diff --git a/arch/arm/mach-aaec2000/include/mach/memory.h b/arch/arm/mach-aaec2000/include/mach/memory.h
> index 4f93c56..4a10bf0 100644
> --- a/arch/arm/mach-aaec2000/include/mach/memory.h
> +++ b/arch/arm/mach-aaec2000/include/mach/memory.h
> @@ -12,6 +12,6 @@
>  #define __ASM_ARCH_MEMORY_H
>
>
> -#define PHYS_OFFSET    UL(0xf0000000)
> +#define PLAT_PHYS_OFFSET       UL(0xf0000000)
>
>  #endif /* __ASM_ARCH_MEMORY_H */
> diff --git a/arch/arm/mach-at91/include/mach/memory.h b/arch/arm/mach-at91/include/mach/memory.h
> index 14f4ef4..c2cfe50 100644
> --- a/arch/arm/mach-at91/include/mach/memory.h
> +++ b/arch/arm/mach-at91/include/mach/memory.h
> @@ -23,6 +23,6 @@
>
>  #include <mach/hardware.h>
>
> -#define PHYS_OFFSET    (AT91_SDRAM_BASE)
> +#define PLAT_PHYS_OFFSET       (AT91_SDRAM_BASE)
>
>  #endif
> diff --git a/arch/arm/mach-bcmring/include/mach/hardware.h b/arch/arm/mach-bcmring/include/mach/hardware.h
> index 447eb34..8bf3564 100644
> --- a/arch/arm/mach-bcmring/include/mach/hardware.h
> +++ b/arch/arm/mach-bcmring/include/mach/hardware.h
> @@ -31,7 +31,7 @@
>  *  *_SIZE  is the size of the region
>  *  *_BASE  is the virtual address
>  */
> -#define RAM_START               PHYS_OFFSET
> +#define RAM_START               PLAT_PHYS_OFFSET
>
>  #define RAM_SIZE                (CFG_GLOBAL_RAM_SIZE-CFG_GLOBAL_RAM_SIZE_RESERVED)
>  #define RAM_BASE                PAGE_OFFSET
> diff --git a/arch/arm/mach-bcmring/include/mach/memory.h b/arch/arm/mach-bcmring/include/mach/memory.h
> index 114f942..15162e4 100644
> --- a/arch/arm/mach-bcmring/include/mach/memory.h
> +++ b/arch/arm/mach-bcmring/include/mach/memory.h
> @@ -23,7 +23,7 @@
>  * files.  Use virt_to_phys/phys_to_virt/__pa/__va instead.
>  */
>
> -#define PHYS_OFFSET CFG_GLOBAL_RAM_BASE
> +#define PLAT_PHYS_OFFSET CFG_GLOBAL_RAM_BASE
>
>  /*
>  * Maximum DMA memory allowed is 14M
> diff --git a/arch/arm/mach-clps711x/include/mach/memory.h b/arch/arm/mach-clps711x/include/mach/memory.h
> index f45c8e8..3a032a6 100644
> --- a/arch/arm/mach-clps711x/include/mach/memory.h
> +++ b/arch/arm/mach-clps711x/include/mach/memory.h
> @@ -23,7 +23,7 @@
>  /*
>  * Physical DRAM offset.
>  */
> -#define PHYS_OFFSET    UL(0xc0000000)
> +#define PLAT_PHYS_OFFSET       UL(0xc0000000)
>
>  #if !defined(CONFIG_ARCH_CDB89712) && !defined (CONFIG_ARCH_AUTCPU12)
>
> diff --git a/arch/arm/mach-cns3xxx/include/mach/memory.h b/arch/arm/mach-cns3xxx/include/mach/memory.h
> index 3b6b769..dc16c5c 100644
> --- a/arch/arm/mach-cns3xxx/include/mach/memory.h
> +++ b/arch/arm/mach-cns3xxx/include/mach/memory.h
> @@ -13,7 +13,7 @@
>  /*
>  * Physical DRAM offset.
>  */
> -#define PHYS_OFFSET            UL(0x00000000)
> +#define PLAT_PHYS_OFFSET               UL(0x00000000)
>
>  #define __phys_to_bus(x)       ((x) + PHYS_OFFSET)
>  #define __bus_to_phys(x)       ((x) - PHYS_OFFSET)
> diff --git a/arch/arm/mach-davinci/include/mach/memory.h b/arch/arm/mach-davinci/include/mach/memory.h
> index 22eb97c..7882272 100644
> --- a/arch/arm/mach-davinci/include/mach/memory.h
> +++ b/arch/arm/mach-davinci/include/mach/memory.h
> @@ -26,9 +26,9 @@
>  #if defined(CONFIG_ARCH_DAVINCI_DA8XX) && defined(CONFIG_ARCH_DAVINCI_DMx)
>  #error Cannot enable DaVinci and DA8XX platforms concurrently
>  #elif defined(CONFIG_ARCH_DAVINCI_DA8XX)
> -#define PHYS_OFFSET DA8XX_DDR_BASE
> +#define PLAT_PHYS_OFFSET DA8XX_DDR_BASE
>  #else
> -#define PHYS_OFFSET DAVINCI_DDR_BASE
> +#define PLAT_PHYS_OFFSET DAVINCI_DDR_BASE
>  #endif
>
>  #define DDR2_SDRCR_OFFSET      0xc
> diff --git a/arch/arm/mach-dove/include/mach/memory.h b/arch/arm/mach-dove/include/mach/memory.h
> index d668720..bbc93fe 100644
> --- a/arch/arm/mach-dove/include/mach/memory.h
> +++ b/arch/arm/mach-dove/include/mach/memory.h
> @@ -5,6 +5,6 @@
>  #ifndef __ASM_ARCH_MEMORY_H
>  #define __ASM_ARCH_MEMORY_H
>
> -#define PHYS_OFFSET            UL(0x00000000)
> +#define PLAT_PHYS_OFFSET               UL(0x00000000)
>
>  #endif
> diff --git a/arch/arm/mach-ebsa110/include/mach/memory.h b/arch/arm/mach-ebsa110/include/mach/memory.h
> index 0ca66d0..8e49066 100644
> --- a/arch/arm/mach-ebsa110/include/mach/memory.h
> +++ b/arch/arm/mach-ebsa110/include/mach/memory.h
> @@ -19,7 +19,7 @@
>  /*
>  * Physical DRAM offset.
>  */
> -#define PHYS_OFFSET    UL(0x00000000)
> +#define PLAT_PHYS_OFFSET       UL(0x00000000)
>
>  /*
>  * Cache flushing area - SRAM
> diff --git a/arch/arm/mach-ep93xx/include/mach/memory.h b/arch/arm/mach-ep93xx/include/mach/memory.h
> index 554064e..c9400cf 100644
> --- a/arch/arm/mach-ep93xx/include/mach/memory.h
> +++ b/arch/arm/mach-ep93xx/include/mach/memory.h
> @@ -6,15 +6,15 @@
>  #define __ASM_ARCH_MEMORY_H
>
>  #if defined(CONFIG_EP93XX_SDCE3_SYNC_PHYS_OFFSET)
> -#define PHYS_OFFSET            UL(0x00000000)
> +#define PLAT_PHYS_OFFSET               UL(0x00000000)
>  #elif defined(CONFIG_EP93XX_SDCE0_PHYS_OFFSET)
> -#define PHYS_OFFSET            UL(0xc0000000)
> +#define PLAT_PHYS_OFFSET               UL(0xc0000000)
>  #elif defined(CONFIG_EP93XX_SDCE1_PHYS_OFFSET)
> -#define PHYS_OFFSET            UL(0xd0000000)
> +#define PLAT_PHYS_OFFSET               UL(0xd0000000)
>  #elif defined(CONFIG_EP93XX_SDCE2_PHYS_OFFSET)
> -#define PHYS_OFFSET            UL(0xe0000000)
> +#define PLAT_PHYS_OFFSET               UL(0xe0000000)
>  #elif defined(CONFIG_EP93XX_SDCE3_ASYNC_PHYS_OFFSET)
> -#define PHYS_OFFSET            UL(0xf0000000)
> +#define PLAT_PHYS_OFFSET               UL(0xf0000000)
>  #else
>  #error "Kconfig bug: No EP93xx PHYS_OFFSET set"
>  #endif
> diff --git a/arch/arm/mach-footbridge/include/mach/memory.h b/arch/arm/mach-footbridge/include/mach/memory.h
> index 8d64f45..5c6df37 100644
> --- a/arch/arm/mach-footbridge/include/mach/memory.h
> +++ b/arch/arm/mach-footbridge/include/mach/memory.h
> @@ -62,7 +62,7 @@ extern unsigned long __bus_to_pfn(unsigned long);
>  /*
>  * Physical DRAM offset.
>  */
> -#define PHYS_OFFSET            UL(0x00000000)
> +#define PLAT_PHYS_OFFSET               UL(0x00000000)
>
>  #define FLUSH_BASE_PHYS                0x50000000
>
> diff --git a/arch/arm/mach-h720x/include/mach/memory.h b/arch/arm/mach-h720x/include/mach/memory.h
> index ef4c1e2..9d36876 100644
> --- a/arch/arm/mach-h720x/include/mach/memory.h
> +++ b/arch/arm/mach-h720x/include/mach/memory.h
> @@ -7,7 +7,7 @@
>  #ifndef __ASM_ARCH_MEMORY_H
>  #define __ASM_ARCH_MEMORY_H
>
> -#define PHYS_OFFSET    UL(0x40000000)
> +#define PLAT_PHYS_OFFSET       UL(0x40000000)
>  /*
>  * This is the maximum DMA address that can be DMAd to.
>  * There should not be more than (0xd0000000 - 0xc0000000)
> diff --git a/arch/arm/mach-integrator/include/mach/memory.h b/arch/arm/mach-integrator/include/mach/memory.h
> index 991f24d..334d5e2 100644
> --- a/arch/arm/mach-integrator/include/mach/memory.h
> +++ b/arch/arm/mach-integrator/include/mach/memory.h
> @@ -23,7 +23,7 @@
>  /*
>  * Physical DRAM offset.
>  */
> -#define PHYS_OFFSET    UL(0x00000000)
> +#define PLAT_PHYS_OFFSET       UL(0x00000000)
>
>  #define BUS_OFFSET     UL(0x80000000)
>  #define __virt_to_bus(x)       ((x) - PAGE_OFFSET + BUS_OFFSET)
> diff --git a/arch/arm/mach-iop13xx/include/mach/memory.h b/arch/arm/mach-iop13xx/include/mach/memory.h
> index 3ad4553..1afa99e 100644
> --- a/arch/arm/mach-iop13xx/include/mach/memory.h
> +++ b/arch/arm/mach-iop13xx/include/mach/memory.h
> @@ -6,7 +6,7 @@
>  /*
>  * Physical DRAM offset.
>  */
> -#define PHYS_OFFSET    UL(0x00000000)
> +#define PLAT_PHYS_OFFSET       UL(0x00000000)
>
>  #ifndef __ASSEMBLY__
>
> diff --git a/arch/arm/mach-iop32x/include/mach/memory.h b/arch/arm/mach-iop32x/include/mach/memory.h
> index c30f645..169cc23 100644
> --- a/arch/arm/mach-iop32x/include/mach/memory.h
> +++ b/arch/arm/mach-iop32x/include/mach/memory.h
> @@ -8,6 +8,6 @@
>  /*
>  * Physical DRAM offset.
>  */
> -#define PHYS_OFFSET    UL(0xa0000000)
> +#define PLAT_PHYS_OFFSET       UL(0xa0000000)
>
>  #endif
> diff --git a/arch/arm/mach-iop33x/include/mach/memory.h b/arch/arm/mach-iop33x/include/mach/memory.h
> index a30a96a..8e1daf7 100644
> --- a/arch/arm/mach-iop33x/include/mach/memory.h
> +++ b/arch/arm/mach-iop33x/include/mach/memory.h
> @@ -8,6 +8,6 @@
>  /*
>  * Physical DRAM offset.
>  */
> -#define PHYS_OFFSET    UL(0x00000000)
> +#define PLAT_PHYS_OFFSET       UL(0x00000000)
>
>  #endif
> diff --git a/arch/arm/mach-ixp2000/include/mach/memory.h b/arch/arm/mach-ixp2000/include/mach/memory.h
> index 98e3471..5f0c4fd 100644
> --- a/arch/arm/mach-ixp2000/include/mach/memory.h
> +++ b/arch/arm/mach-ixp2000/include/mach/memory.h
> @@ -13,7 +13,7 @@
>  #ifndef __ASM_ARCH_MEMORY_H
>  #define __ASM_ARCH_MEMORY_H
>
> -#define PHYS_OFFSET    UL(0x00000000)
> +#define PLAT_PHYS_OFFSET       UL(0x00000000)
>
>  #include <mach/ixp2000-regs.h>
>
> diff --git a/arch/arm/mach-ixp23xx/include/mach/memory.h b/arch/arm/mach-ixp23xx/include/mach/memory.h
> index 6ef65d8..6cf0704 100644
> --- a/arch/arm/mach-ixp23xx/include/mach/memory.h
> +++ b/arch/arm/mach-ixp23xx/include/mach/memory.h
> @@ -17,7 +17,7 @@
>  /*
>  * Physical DRAM offset.
>  */
> -#define PHYS_OFFSET            (0x00000000)
> +#define PLAT_PHYS_OFFSET               (0x00000000)
>
>  #define IXP23XX_PCI_SDRAM_OFFSET (*((volatile int *)IXP23XX_PCI_SDRAM_BAR) & 0xfffffff0)
>
> diff --git a/arch/arm/mach-ixp4xx/include/mach/memory.h b/arch/arm/mach-ixp4xx/include/mach/memory.h
> index 0136eaa..6d388c9 100644
> --- a/arch/arm/mach-ixp4xx/include/mach/memory.h
> +++ b/arch/arm/mach-ixp4xx/include/mach/memory.h
> @@ -12,7 +12,7 @@
>  /*
>  * Physical DRAM offset.
>  */
> -#define PHYS_OFFSET    UL(0x00000000)
> +#define PLAT_PHYS_OFFSET       UL(0x00000000)
>
>  #if !defined(__ASSEMBLY__) && defined(CONFIG_PCI)
>
> diff --git a/arch/arm/mach-kirkwood/include/mach/memory.h b/arch/arm/mach-kirkwood/include/mach/memory.h
> index 45431e1..4600b44 100644
> --- a/arch/arm/mach-kirkwood/include/mach/memory.h
> +++ b/arch/arm/mach-kirkwood/include/mach/memory.h
> @@ -5,6 +5,6 @@
>  #ifndef __ASM_ARCH_MEMORY_H
>  #define __ASM_ARCH_MEMORY_H
>
> -#define PHYS_OFFSET            UL(0x00000000)
> +#define PLAT_PHYS_OFFSET               UL(0x00000000)
>
>  #endif
> diff --git a/arch/arm/mach-ks8695/include/mach/memory.h b/arch/arm/mach-ks8695/include/mach/memory.h
> index bace9a6..f7e1b9b 100644
> --- a/arch/arm/mach-ks8695/include/mach/memory.h
> +++ b/arch/arm/mach-ks8695/include/mach/memory.h
> @@ -18,7 +18,7 @@
>  /*
>  * Physical SRAM offset.
>  */
> -#define PHYS_OFFSET            KS8695_SDRAM_PA
> +#define PLAT_PHYS_OFFSET               KS8695_SDRAM_PA
>
>  #ifndef __ASSEMBLY__
>
> diff --git a/arch/arm/mach-lh7a40x/include/mach/memory.h b/arch/arm/mach-lh7a40x/include/mach/memory.h
> index edb8f5f..f77bde8 100644
> --- a/arch/arm/mach-lh7a40x/include/mach/memory.h
> +++ b/arch/arm/mach-lh7a40x/include/mach/memory.h
> @@ -17,7 +17,7 @@
>  /*
>  * Physical DRAM offset.
>  */
> -#define PHYS_OFFSET    UL(0xc0000000)
> +#define PLAT_PHYS_OFFSET       UL(0xc0000000)
>
>  /*
>  * Sparsemem version of the above
> diff --git a/arch/arm/mach-loki/include/mach/memory.h b/arch/arm/mach-loki/include/mach/memory.h
> index 2ed7e6e..6636665 100644
> --- a/arch/arm/mach-loki/include/mach/memory.h
> +++ b/arch/arm/mach-loki/include/mach/memory.h
> @@ -5,6 +5,6 @@
>  #ifndef __ASM_ARCH_MEMORY_H
>  #define __ASM_ARCH_MEMORY_H
>
> -#define PHYS_OFFSET            UL(0x00000000)
> +#define PLAT_PHYS_OFFSET               UL(0x00000000)
>
>  #endif
> diff --git a/arch/arm/mach-lpc32xx/include/mach/memory.h b/arch/arm/mach-lpc32xx/include/mach/memory.h
> index 044e1ac..a647dd6 100644
> --- a/arch/arm/mach-lpc32xx/include/mach/memory.h
> +++ b/arch/arm/mach-lpc32xx/include/mach/memory.h
> @@ -22,6 +22,6 @@
>  /*
>  * Physical DRAM offset of bank 0
>  */
> -#define PHYS_OFFSET    UL(0x80000000)
> +#define PLAT_PHYS_OFFSET       UL(0x80000000)
>
>  #endif
> diff --git a/arch/arm/mach-mmp/include/mach/memory.h b/arch/arm/mach-mmp/include/mach/memory.h
> index bdb21d7..d68b50a 100644
> --- a/arch/arm/mach-mmp/include/mach/memory.h
> +++ b/arch/arm/mach-mmp/include/mach/memory.h
> @@ -9,6 +9,6 @@
>  #ifndef __ASM_MACH_MEMORY_H
>  #define __ASM_MACH_MEMORY_H
>
> -#define PHYS_OFFSET    UL(0x00000000)
> +#define PLAT_PHYS_OFFSET       UL(0x00000000)
>
>  #endif /* __ASM_MACH_MEMORY_H */
> diff --git a/arch/arm/mach-msm/board-msm7x30.c b/arch/arm/mach-msm/board-msm7x30.c
> index 05241df..1931e07 100644
> --- a/arch/arm/mach-msm/board-msm7x30.c
> +++ b/arch/arm/mach-msm/board-msm7x30.c
> @@ -25,11 +25,11 @@
>
>  #include <asm/mach-types.h>
>  #include <asm/mach/arch.h>
> +#include <asm/memory.h>
>  #include <asm/setup.h>
>
>  #include <mach/gpio.h>
>  #include <mach/board.h>
> -#include <mach/memory.h>
>  #include <mach/msm_iomap.h>
>  #include <mach/dma.h>
>
> diff --git a/arch/arm/mach-msm/include/mach/memory.h b/arch/arm/mach-msm/include/mach/memory.h
> index 070e17d..176875d 100644
> --- a/arch/arm/mach-msm/include/mach/memory.h
> +++ b/arch/arm/mach-msm/include/mach/memory.h
> @@ -18,15 +18,15 @@
>
>  /* physical offset of RAM */
>  #if defined(CONFIG_ARCH_QSD8X50) && defined(CONFIG_MSM_SOC_REV_A)
> -#define PHYS_OFFSET            UL(0x00000000)
> +#define PLAT_PHYS_OFFSET               UL(0x00000000)
>  #elif defined(CONFIG_ARCH_QSD8X50)
> -#define PHYS_OFFSET            UL(0x20000000)
> +#define PLAT_PHYS_OFFSET               UL(0x20000000)
>  #elif defined(CONFIG_ARCH_MSM7X30)
> -#define PHYS_OFFSET            UL(0x00200000)
> +#define PLAT_PHYS_OFFSET               UL(0x00200000)
>  #elif defined(CONFIG_ARCH_MSM8X60)
> -#define PHYS_OFFSET            UL(0x40200000)
> +#define PLAT_PHYS_OFFSET               UL(0x40200000)
>  #else
> -#define PHYS_OFFSET            UL(0x10000000)
> +#define PLAT_PHYS_OFFSET               UL(0x10000000)
>  #endif
>
>  #endif
> diff --git a/arch/arm/mach-mv78xx0/include/mach/memory.h b/arch/arm/mach-mv78xx0/include/mach/memory.h
> index e663042..a648c51 100644
> --- a/arch/arm/mach-mv78xx0/include/mach/memory.h
> +++ b/arch/arm/mach-mv78xx0/include/mach/memory.h
> @@ -5,6 +5,6 @@
>  #ifndef __ASM_ARCH_MEMORY_H
>  #define __ASM_ARCH_MEMORY_H
>
> -#define PHYS_OFFSET            UL(0x00000000)
> +#define PLAT_PHYS_OFFSET               UL(0x00000000)
>
>  #endif
> diff --git a/arch/arm/mach-mx3/mach-kzm_arm11_01.c b/arch/arm/mach-mx3/mach-kzm_arm11_01.c
> index 042cd56..d8ebde8 100644
> --- a/arch/arm/mach-mx3/mach-kzm_arm11_01.c
> +++ b/arch/arm/mach-mx3/mach-kzm_arm11_01.c
> @@ -27,6 +27,7 @@
>
>  #include <asm/irq.h>
>  #include <asm/mach-types.h>
> +#include <asm/memory.h>
>  #include <asm/setup.h>
>  #include <asm/mach/arch.h>
>  #include <asm/mach/irq.h>
> @@ -36,7 +37,6 @@
>  #include <mach/clock.h>
>  #include <mach/common.h>
>  #include <mach/iomux-mx3.h>
> -#include <mach/memory.h>
>
>  #include "devices-imx31.h"
>  #include "devices.h"
> diff --git a/arch/arm/mach-netx/include/mach/memory.h b/arch/arm/mach-netx/include/mach/memory.h
> index 9a363f2..5956149 100644
> --- a/arch/arm/mach-netx/include/mach/memory.h
> +++ b/arch/arm/mach-netx/include/mach/memory.h
> @@ -20,7 +20,7 @@
>  #ifndef __ASM_ARCH_MEMORY_H
>  #define __ASM_ARCH_MEMORY_H
>
> -#define PHYS_OFFSET UL(0x80000000)
> +#define PLAT_PHYS_OFFSET UL(0x80000000)
>
>  #endif
>
> diff --git a/arch/arm/mach-nomadik/include/mach/memory.h b/arch/arm/mach-nomadik/include/mach/memory.h
> index 1e5689d..d332521 100644
> --- a/arch/arm/mach-nomadik/include/mach/memory.h
> +++ b/arch/arm/mach-nomadik/include/mach/memory.h
> @@ -23,6 +23,6 @@
>  /*
>  * Physical DRAM offset.
>  */
> -#define PHYS_OFFSET    UL(0x00000000)
> +#define PLAT_PHYS_OFFSET       UL(0x00000000)
>
>  #endif
> diff --git a/arch/arm/mach-ns9xxx/include/mach/memory.h b/arch/arm/mach-ns9xxx/include/mach/memory.h
> index 6107193..5c65aee 100644
> --- a/arch/arm/mach-ns9xxx/include/mach/memory.h
> +++ b/arch/arm/mach-ns9xxx/include/mach/memory.h
> @@ -19,6 +19,6 @@
>  #define NS9XXX_CS2STAT_LENGTH  UL(0x1000)
>  #define NS9XXX_CS3STAT_LENGTH  UL(0x1000)
>
> -#define PHYS_OFFSET    UL(0x00000000)
> +#define PLAT_PHYS_OFFSET       UL(0x00000000)
>
>  #endif
> diff --git a/arch/arm/mach-nuc93x/include/mach/memory.h b/arch/arm/mach-nuc93x/include/mach/memory.h
> index 323ab0d..ef9864b 100644
> --- a/arch/arm/mach-nuc93x/include/mach/memory.h
> +++ b/arch/arm/mach-nuc93x/include/mach/memory.h
> @@ -16,6 +16,6 @@
>  #ifndef __ASM_ARCH_MEMORY_H
>  #define __ASM_ARCH_MEMORY_H
>
> -#define PHYS_OFFSET    UL(0x00000000)
> +#define PLAT_PHYS_OFFSET       UL(0x00000000)
>
>  #endif
> diff --git a/arch/arm/mach-orion5x/include/mach/memory.h b/arch/arm/mach-orion5x/include/mach/memory.h
> index 52a2955..6769917 100644
> --- a/arch/arm/mach-orion5x/include/mach/memory.h
> +++ b/arch/arm/mach-orion5x/include/mach/memory.h
> @@ -7,6 +7,6 @@
>  #ifndef __ASM_ARCH_MEMORY_H
>  #define __ASM_ARCH_MEMORY_H
>
> -#define PHYS_OFFSET    UL(0x00000000)
> +#define PLAT_PHYS_OFFSET       UL(0x00000000)
>
>  #endif
> diff --git a/arch/arm/mach-pnx4008/include/mach/memory.h b/arch/arm/mach-pnx4008/include/mach/memory.h
> index 0e87700..1275db6 100644
> --- a/arch/arm/mach-pnx4008/include/mach/memory.h
> +++ b/arch/arm/mach-pnx4008/include/mach/memory.h
> @@ -16,6 +16,6 @@
>  /*
>  * Physical DRAM offset.
>  */
> -#define PHYS_OFFSET    UL(0x80000000)
> +#define PLAT_PHYS_OFFSET       UL(0x80000000)
>
>  #endif
> diff --git a/arch/arm/mach-pxa/include/mach/memory.h b/arch/arm/mach-pxa/include/mach/memory.h
> index 92361a6..7f68724 100644
> --- a/arch/arm/mach-pxa/include/mach/memory.h
> +++ b/arch/arm/mach-pxa/include/mach/memory.h
> @@ -15,7 +15,7 @@
>  /*
>  * Physical DRAM offset.
>  */
> -#define PHYS_OFFSET    UL(0xa0000000)
> +#define PLAT_PHYS_OFFSET       UL(0xa0000000)
>
>  #if !defined(__ASSEMBLY__) && defined(CONFIG_MACH_ARMCORE) && defined(CONFIG_PCI)
>  void cmx2xx_pci_adjust_zones(unsigned long *size, unsigned long *holes);
> diff --git a/arch/arm/mach-realview/include/mach/memory.h b/arch/arm/mach-realview/include/mach/memory.h
> index 5dafc15..e05fc2c 100644
> --- a/arch/arm/mach-realview/include/mach/memory.h
> +++ b/arch/arm/mach-realview/include/mach/memory.h
> @@ -24,9 +24,9 @@
>  * Physical DRAM offset.
>  */
>  #ifdef CONFIG_REALVIEW_HIGH_PHYS_OFFSET
> -#define PHYS_OFFSET            UL(0x70000000)
> +#define PLAT_PHYS_OFFSET               UL(0x70000000)
>  #else
> -#define PHYS_OFFSET            UL(0x00000000)
> +#define PLAT_PHYS_OFFSET               UL(0x00000000)
>  #endif
>
>  #if !defined(__ASSEMBLY__) && defined(CONFIG_ZONE_DMA)
> diff --git a/arch/arm/mach-rpc/include/mach/memory.h b/arch/arm/mach-rpc/include/mach/memory.h
> index 78191bf..18a2210 100644
> --- a/arch/arm/mach-rpc/include/mach/memory.h
> +++ b/arch/arm/mach-rpc/include/mach/memory.h
> @@ -21,7 +21,7 @@
>  /*
>  * Physical DRAM offset.
>  */
> -#define PHYS_OFFSET    UL(0x10000000)
> +#define PLAT_PHYS_OFFSET       UL(0x10000000)
>
>  /*
>  * Cache flushing area - ROM
> diff --git a/arch/arm/mach-s3c2400/include/mach/memory.h b/arch/arm/mach-s3c2400/include/mach/memory.h
> index cf5901f..3f33670 100644
> --- a/arch/arm/mach-s3c2400/include/mach/memory.h
> +++ b/arch/arm/mach-s3c2400/include/mach/memory.h
> @@ -15,6 +15,6 @@
>  #ifndef __ASM_ARCH_MEMORY_H
>  #define __ASM_ARCH_MEMORY_H
>
> -#define PHYS_OFFSET    UL(0x0C000000)
> +#define PLAT_PHYS_OFFSET       UL(0x0C000000)
>
>  #endif
> diff --git a/arch/arm/mach-s3c2410/include/mach/memory.h b/arch/arm/mach-s3c2410/include/mach/memory.h
> index 6f1e587..f92b97b 100644
> --- a/arch/arm/mach-s3c2410/include/mach/memory.h
> +++ b/arch/arm/mach-s3c2410/include/mach/memory.h
> @@ -11,6 +11,6 @@
>  #ifndef __ASM_ARCH_MEMORY_H
>  #define __ASM_ARCH_MEMORY_H
>
> -#define PHYS_OFFSET    UL(0x30000000)
> +#define PLAT_PHYS_OFFSET       UL(0x30000000)
>
>  #endif
> diff --git a/arch/arm/mach-s3c24a0/include/mach/memory.h b/arch/arm/mach-s3c24a0/include/mach/memory.h
> index 7d74fd5..7d208a7 100644
> --- a/arch/arm/mach-s3c24a0/include/mach/memory.h
> +++ b/arch/arm/mach-s3c24a0/include/mach/memory.h
> @@ -11,7 +11,7 @@
>  #ifndef __ASM_ARCH_24A0_MEMORY_H
>  #define __ASM_ARCH_24A0_MEMORY_H __FILE__
>
> -#define PHYS_OFFSET UL(0x10000000)
> +#define PLAT_PHYS_OFFSET UL(0x10000000)
>
>  #define __virt_to_bus(x) __virt_to_phys(x)
>  #define __bus_to_virt(x) __phys_to_virt(x)
> diff --git a/arch/arm/mach-s3c64xx/include/mach/memory.h b/arch/arm/mach-s3c64xx/include/mach/memory.h
> index 42cc54e..4760cda 100644
> --- a/arch/arm/mach-s3c64xx/include/mach/memory.h
> +++ b/arch/arm/mach-s3c64xx/include/mach/memory.h
> @@ -13,7 +13,7 @@
>  #ifndef __ASM_ARCH_MEMORY_H
>  #define __ASM_ARCH_MEMORY_H
>
> -#define PHYS_OFFSET     UL(0x50000000)
> +#define PLAT_PHYS_OFFSET     UL(0x50000000)
>
>  #define CONSISTENT_DMA_SIZE    SZ_8M
>
> diff --git a/arch/arm/mach-s5p6442/include/mach/memory.h b/arch/arm/mach-s5p6442/include/mach/memory.h
> index 9ddd877..cfe259d 100644
> --- a/arch/arm/mach-s5p6442/include/mach/memory.h
> +++ b/arch/arm/mach-s5p6442/include/mach/memory.h
> @@ -13,7 +13,7 @@
>  #ifndef __ASM_ARCH_MEMORY_H
>  #define __ASM_ARCH_MEMORY_H
>
> -#define PHYS_OFFSET            UL(0x20000000)
> +#define PLAT_PHYS_OFFSET               UL(0x20000000)
>  #define CONSISTENT_DMA_SIZE    SZ_8M
>
>  #endif /* __ASM_ARCH_MEMORY_H */
> diff --git a/arch/arm/mach-s5p64x0/include/mach/memory.h b/arch/arm/mach-s5p64x0/include/mach/memory.h
> index 1b036b0..365a6eb 100644
> --- a/arch/arm/mach-s5p64x0/include/mach/memory.h
> +++ b/arch/arm/mach-s5p64x0/include/mach/memory.h
> @@ -13,7 +13,7 @@
>  #ifndef __ASM_ARCH_MEMORY_H
>  #define __ASM_ARCH_MEMORY_H __FILE__
>
> -#define PHYS_OFFSET            UL(0x20000000)
> +#define PLAT_PHYS_OFFSET               UL(0x20000000)
>  #define CONSISTENT_DMA_SIZE    SZ_8M
>
>  #endif /* __ASM_ARCH_MEMORY_H */
> diff --git a/arch/arm/mach-s5pc100/include/mach/memory.h b/arch/arm/mach-s5pc100/include/mach/memory.h
> index 4b60d18..bda4e79 100644
> --- a/arch/arm/mach-s5pc100/include/mach/memory.h
> +++ b/arch/arm/mach-s5pc100/include/mach/memory.h
> @@ -13,6 +13,6 @@
>  #ifndef __ASM_ARCH_MEMORY_H
>  #define __ASM_ARCH_MEMORY_H
>
> -#define PHYS_OFFSET            UL(0x20000000)
> +#define PLAT_PHYS_OFFSET       UL(0x20000000)
>
>  #endif
> diff --git a/arch/arm/mach-s5pv210/include/mach/memory.h b/arch/arm/mach-s5pv210/include/mach/memory.h
> index d503e0c..7b5fcf0 100644
> --- a/arch/arm/mach-s5pv210/include/mach/memory.h
> +++ b/arch/arm/mach-s5pv210/include/mach/memory.h
> @@ -13,7 +13,7 @@
>  #ifndef __ASM_ARCH_MEMORY_H
>  #define __ASM_ARCH_MEMORY_H
>
> -#define PHYS_OFFSET            UL(0x20000000)
> +#define PLAT_PHYS_OFFSET               UL(0x20000000)
>  #define CONSISTENT_DMA_SIZE    (SZ_8M + SZ_4M + SZ_2M)
>
>  /*
> diff --git a/arch/arm/mach-s5pv310/include/mach/memory.h b/arch/arm/mach-s5pv310/include/mach/memory.h
> index 1dffb48..470b01b 100644
> --- a/arch/arm/mach-s5pv310/include/mach/memory.h
> +++ b/arch/arm/mach-s5pv310/include/mach/memory.h
> @@ -13,7 +13,7 @@
>  #ifndef __ASM_ARCH_MEMORY_H
>  #define __ASM_ARCH_MEMORY_H __FILE__
>
> -#define PHYS_OFFSET            UL(0x40000000)
> +#define PLAT_PHYS_OFFSET               UL(0x40000000)
>
>  /* Maximum of 256MiB in one bank */
>  #define MAX_PHYSMEM_BITS       32
> diff --git a/arch/arm/mach-sa1100/include/mach/memory.h b/arch/arm/mach-sa1100/include/mach/memory.h
> index 128a1df..a44da6a 100644
> --- a/arch/arm/mach-sa1100/include/mach/memory.h
> +++ b/arch/arm/mach-sa1100/include/mach/memory.h
> @@ -12,7 +12,7 @@
>  /*
>  * Physical DRAM offset is 0xc0000000 on the SA1100
>  */
> -#define PHYS_OFFSET    UL(0xc0000000)
> +#define PLAT_PHYS_OFFSET       UL(0xc0000000)
>
>  #ifndef __ASSEMBLY__
>
> diff --git a/arch/arm/mach-shark/include/mach/memory.h b/arch/arm/mach-shark/include/mach/memory.h
> index d9c4812..9afb170 100644
> --- a/arch/arm/mach-shark/include/mach/memory.h
> +++ b/arch/arm/mach-shark/include/mach/memory.h
> @@ -15,7 +15,7 @@
>  /*
>  * Physical DRAM offset.
>  */
> -#define PHYS_OFFSET     UL(0x08000000)
> +#define PLAT_PHYS_OFFSET     UL(0x08000000)
>
>  #ifndef __ASSEMBLY__
>
> diff --git a/arch/arm/mach-shmobile/include/mach/memory.h b/arch/arm/mach-shmobile/include/mach/memory.h
> index 377584e..ad00c3c 100644
> --- a/arch/arm/mach-shmobile/include/mach/memory.h
> +++ b/arch/arm/mach-shmobile/include/mach/memory.h
> @@ -1,7 +1,7 @@
>  #ifndef __ASM_MACH_MEMORY_H
>  #define __ASM_MACH_MEMORY_H
>
> -#define PHYS_OFFSET    UL(CONFIG_MEMORY_START)
> +#define PLAT_PHYS_OFFSET       UL(CONFIG_MEMORY_START)
>  #define MEM_SIZE       UL(CONFIG_MEMORY_SIZE)
>
>  /* DMA memory at 0xf6000000 - 0xffdfffff */
> diff --git a/arch/arm/mach-tegra/include/mach/memory.h b/arch/arm/mach-tegra/include/mach/memory.h
> index 6151bab..537db3a 100644
> --- a/arch/arm/mach-tegra/include/mach/memory.h
> +++ b/arch/arm/mach-tegra/include/mach/memory.h
> @@ -22,7 +22,7 @@
>  #define __MACH_TEGRA_MEMORY_H
>
>  /* physical offset of RAM */
> -#define PHYS_OFFSET            UL(0)
> +#define PLAT_PHYS_OFFSET               UL(0)
>
>  #endif
>
> diff --git a/arch/arm/mach-u300/include/mach/memory.h b/arch/arm/mach-u300/include/mach/memory.h
> index bf134bc..888e2e3 100644
> --- a/arch/arm/mach-u300/include/mach/memory.h
> +++ b/arch/arm/mach-u300/include/mach/memory.h
> @@ -15,17 +15,17 @@
>
>  #ifdef CONFIG_MACH_U300_DUAL_RAM
>
> -#define PHYS_OFFSET            UL(0x48000000)
> +#define PLAT_PHYS_OFFSET               UL(0x48000000)
>  #define BOOT_PARAMS_OFFSET     (PHYS_OFFSET + 0x100)
>
>  #else
>
>  #ifdef CONFIG_MACH_U300_2MB_ALIGNMENT_FIX
> -#define PHYS_OFFSET (0x28000000 + \
> +#define PLAT_PHYS_OFFSET (0x28000000 + \
>             (CONFIG_MACH_U300_ACCESS_MEM_SIZE - \
>             (CONFIG_MACH_U300_ACCESS_MEM_SIZE & 1))*1024*1024)
>  #else
> -#define PHYS_OFFSET (0x28000000 + \
> +#define PLAT_PHYS_OFFSET (0x28000000 + \
>             (CONFIG_MACH_U300_ACCESS_MEM_SIZE +        \
>             (CONFIG_MACH_U300_ACCESS_MEM_SIZE & 1))*1024*1024)
>  #endif
> diff --git a/arch/arm/mach-u300/u300.c b/arch/arm/mach-u300/u300.c
> index 07c35a8..48b3b7f 100644
> --- a/arch/arm/mach-u300/u300.c
> +++ b/arch/arm/mach-u300/u300.c
> @@ -19,9 +19,9 @@
>  #include <linux/io.h>
>  #include <mach/hardware.h>
>  #include <mach/platform.h>
> -#include <mach/memory.h>
>  #include <asm/mach-types.h>
>  #include <asm/mach/arch.h>
> +#include <asm/memory.h>
>
>  static void __init u300_reserve(void)
>  {
> diff --git a/arch/arm/mach-ux500/include/mach/memory.h b/arch/arm/mach-ux500/include/mach/memory.h
> index 510571a..2ef697a 100644
> --- a/arch/arm/mach-ux500/include/mach/memory.h
> +++ b/arch/arm/mach-ux500/include/mach/memory.h
> @@ -12,7 +12,7 @@
>  /*
>  * Physical DRAM offset.
>  */
> -#define PHYS_OFFSET    UL(0x00000000)
> +#define PLAT_PHYS_OFFSET       UL(0x00000000)
>  #define BUS_OFFSET     UL(0x00000000)
>
>  #endif
> diff --git a/arch/arm/mach-versatile/include/mach/memory.h b/arch/arm/mach-versatile/include/mach/memory.h
> index 79aeab8..dacc9d8 100644
> --- a/arch/arm/mach-versatile/include/mach/memory.h
> +++ b/arch/arm/mach-versatile/include/mach/memory.h
> @@ -23,6 +23,6 @@
>  /*
>  * Physical DRAM offset.
>  */
> -#define PHYS_OFFSET    UL(0x00000000)
> +#define PLAT_PHYS_OFFSET       UL(0x00000000)
>
>  #endif
> diff --git a/arch/arm/mach-vexpress/include/mach/memory.h b/arch/arm/mach-vexpress/include/mach/memory.h
> index be28232..5b7fcd4 100644
> --- a/arch/arm/mach-vexpress/include/mach/memory.h
> +++ b/arch/arm/mach-vexpress/include/mach/memory.h
> @@ -20,6 +20,6 @@
>  #ifndef __ASM_ARCH_MEMORY_H
>  #define __ASM_ARCH_MEMORY_H
>
> -#define PHYS_OFFSET            UL(0x60000000)
> +#define PLAT_PHYS_OFFSET               UL(0x60000000)
>
>  #endif
> diff --git a/arch/arm/mach-w90x900/include/mach/memory.h b/arch/arm/mach-w90x900/include/mach/memory.h
> index 971b807..f02905b 100644
> --- a/arch/arm/mach-w90x900/include/mach/memory.h
> +++ b/arch/arm/mach-w90x900/include/mach/memory.h
> @@ -18,6 +18,6 @@
>  #ifndef __ASM_ARCH_MEMORY_H
>  #define __ASM_ARCH_MEMORY_H
>
> -#define PHYS_OFFSET    UL(0x00000000)
> +#define PLAT_PHYS_OFFSET       UL(0x00000000)
>
>  #endif
> diff --git a/arch/arm/plat-omap/include/plat/memory.h b/arch/arm/plat-omap/include/plat/memory.h
> index f8d922f..e6720aa 100644
> --- a/arch/arm/plat-omap/include/plat/memory.h
> +++ b/arch/arm/plat-omap/include/plat/memory.h
> @@ -37,9 +37,9 @@
>  * Physical DRAM offset.
>  */
>  #if defined(CONFIG_ARCH_OMAP1)
> -#define PHYS_OFFSET            UL(0x10000000)
> +#define PLAT_PHYS_OFFSET               UL(0x10000000)
>  #else
> -#define PHYS_OFFSET            UL(0x80000000)
> +#define PLAT_PHYS_OFFSET               UL(0x80000000)
>  #endif
>
>  /*
> diff --git a/arch/arm/plat-spear/include/plat/memory.h b/arch/arm/plat-spear/include/plat/memory.h
> index 27a4aba..7e3599e 100644
> --- a/arch/arm/plat-spear/include/plat/memory.h
> +++ b/arch/arm/plat-spear/include/plat/memory.h
> @@ -15,6 +15,6 @@
>  #define __PLAT_MEMORY_H
>
>  /* Physical DRAM offset */
> -#define PHYS_OFFSET            UL(0x00000000)
> +#define PLAT_PHYS_OFFSET               UL(0x00000000)
>
>  #endif /* __PLAT_MEMORY_H */
> diff --git a/arch/arm/plat-stmp3xxx/include/mach/memory.h b/arch/arm/plat-stmp3xxx/include/mach/memory.h
> index 7b875a0..61fa548 100644
> --- a/arch/arm/plat-stmp3xxx/include/mach/memory.h
> +++ b/arch/arm/plat-stmp3xxx/include/mach/memory.h
> @@ -17,6 +17,6 @@
>  /*
>  * Physical DRAM offset.
>  */
> -#define PHYS_OFFSET    UL(0x40000000)
> +#define PLAT_PHYS_OFFSET       UL(0x40000000)
>
>  #endif
> diff --git a/arch/arm/plat-tcc/include/mach/memory.h b/arch/arm/plat-tcc/include/mach/memory.h
> index cd91ba8..28a6e0c 100644
> --- a/arch/arm/plat-tcc/include/mach/memory.h
> +++ b/arch/arm/plat-tcc/include/mach/memory.h
> @@ -13,6 +13,6 @@
>  /*
>  * Physical DRAM offset.
>  */
> -#define PHYS_OFFSET            UL(0x20000000)
> +#define PLAT_PHYS_OFFSET               UL(0x20000000)
>
>  #endif
> --
> 1.6.2.5
>
>

Acked-by: Wan ZongShun <mcuos.com@gmail.com>

Thanks!
-- 
*linux-arm-kernel mailing list
mail addr:linux-arm-kernel@lists.infradead.org
you can subscribe by:
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

* linux-arm-NUC900 mailing list
mail addr:NUC900@googlegroups.com
main web: https://groups.google.com/group/NUC900
you can subscribe it by sending me mail:
mcuos.com@gmail.com

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 72+ messages in thread

* [RFC 1/5] ARM: P2V: separate PHYS_OFFSET from platform definitions
@ 2011-02-08 11:22     ` Wan ZongShun
  0 siblings, 0 replies; 72+ messages in thread
From: Wan ZongShun @ 2011-02-08 11:22 UTC (permalink / raw)
  To: linux-arm-kernel

2011/1/5 Russell King - ARM Linux <linux@arm.linux.org.uk>:
> This uncouple PHYS_OFFSET from the platform definitions, thereby
> facilitating run-time computation of the physical memory offset.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
> ?arch/arm/include/asm/memory.h ? ? ? ? ? ? ? ? ?| ? ?2 ++
> ?arch/arm/kernel/tcm.c ? ? ? ? ? ? ? ? ? ? ? ? ?| ? ?2 +-
> ?arch/arm/mach-aaec2000/include/mach/memory.h ? | ? ?2 +-
> ?arch/arm/mach-at91/include/mach/memory.h ? ? ? | ? ?2 +-
> ?arch/arm/mach-bcmring/include/mach/hardware.h ?| ? ?2 +-
> ?arch/arm/mach-bcmring/include/mach/memory.h ? ?| ? ?2 +-
> ?arch/arm/mach-clps711x/include/mach/memory.h ? | ? ?2 +-
> ?arch/arm/mach-cns3xxx/include/mach/memory.h ? ?| ? ?2 +-
> ?arch/arm/mach-davinci/include/mach/memory.h ? ?| ? ?4 ++--
> ?arch/arm/mach-dove/include/mach/memory.h ? ? ? | ? ?2 +-
> ?arch/arm/mach-ebsa110/include/mach/memory.h ? ?| ? ?2 +-
> ?arch/arm/mach-ep93xx/include/mach/memory.h ? ? | ? 10 +++++-----
> ?arch/arm/mach-footbridge/include/mach/memory.h | ? ?2 +-
> ?arch/arm/mach-h720x/include/mach/memory.h ? ? ?| ? ?2 +-
> ?arch/arm/mach-integrator/include/mach/memory.h | ? ?2 +-
> ?arch/arm/mach-iop13xx/include/mach/memory.h ? ?| ? ?2 +-
> ?arch/arm/mach-iop32x/include/mach/memory.h ? ? | ? ?2 +-
> ?arch/arm/mach-iop33x/include/mach/memory.h ? ? | ? ?2 +-
> ?arch/arm/mach-ixp2000/include/mach/memory.h ? ?| ? ?2 +-
> ?arch/arm/mach-ixp23xx/include/mach/memory.h ? ?| ? ?2 +-
> ?arch/arm/mach-ixp4xx/include/mach/memory.h ? ? | ? ?2 +-
> ?arch/arm/mach-kirkwood/include/mach/memory.h ? | ? ?2 +-
> ?arch/arm/mach-ks8695/include/mach/memory.h ? ? | ? ?2 +-
> ?arch/arm/mach-lh7a40x/include/mach/memory.h ? ?| ? ?2 +-
> ?arch/arm/mach-loki/include/mach/memory.h ? ? ? | ? ?2 +-
> ?arch/arm/mach-lpc32xx/include/mach/memory.h ? ?| ? ?2 +-
> ?arch/arm/mach-mmp/include/mach/memory.h ? ? ? ?| ? ?2 +-
> ?arch/arm/mach-msm/board-msm7x30.c ? ? ? ? ? ? ?| ? ?2 +-
> ?arch/arm/mach-msm/include/mach/memory.h ? ? ? ?| ? 10 +++++-----
> ?arch/arm/mach-mv78xx0/include/mach/memory.h ? ?| ? ?2 +-
> ?arch/arm/mach-mx3/mach-kzm_arm11_01.c ? ? ? ? ?| ? ?2 +-
> ?arch/arm/mach-netx/include/mach/memory.h ? ? ? | ? ?2 +-
> ?arch/arm/mach-nomadik/include/mach/memory.h ? ?| ? ?2 +-
> ?arch/arm/mach-ns9xxx/include/mach/memory.h ? ? | ? ?2 +-
> ?arch/arm/mach-nuc93x/include/mach/memory.h ? ? | ? ?2 +-
> ?arch/arm/mach-orion5x/include/mach/memory.h ? ?| ? ?2 +-
> ?arch/arm/mach-pnx4008/include/mach/memory.h ? ?| ? ?2 +-
> ?arch/arm/mach-pxa/include/mach/memory.h ? ? ? ?| ? ?2 +-
> ?arch/arm/mach-realview/include/mach/memory.h ? | ? ?4 ++--
> ?arch/arm/mach-rpc/include/mach/memory.h ? ? ? ?| ? ?2 +-
> ?arch/arm/mach-s3c2400/include/mach/memory.h ? ?| ? ?2 +-
> ?arch/arm/mach-s3c2410/include/mach/memory.h ? ?| ? ?2 +-
> ?arch/arm/mach-s3c24a0/include/mach/memory.h ? ?| ? ?2 +-
> ?arch/arm/mach-s3c64xx/include/mach/memory.h ? ?| ? ?2 +-
> ?arch/arm/mach-s5p6442/include/mach/memory.h ? ?| ? ?2 +-
> ?arch/arm/mach-s5p64x0/include/mach/memory.h ? ?| ? ?2 +-
> ?arch/arm/mach-s5pc100/include/mach/memory.h ? ?| ? ?2 +-
> ?arch/arm/mach-s5pv210/include/mach/memory.h ? ?| ? ?2 +-
> ?arch/arm/mach-s5pv310/include/mach/memory.h ? ?| ? ?2 +-
> ?arch/arm/mach-sa1100/include/mach/memory.h ? ? | ? ?2 +-
> ?arch/arm/mach-shark/include/mach/memory.h ? ? ?| ? ?2 +-
> ?arch/arm/mach-shmobile/include/mach/memory.h ? | ? ?2 +-
> ?arch/arm/mach-tegra/include/mach/memory.h ? ? ?| ? ?2 +-
> ?arch/arm/mach-u300/include/mach/memory.h ? ? ? | ? ?6 +++---
> ?arch/arm/mach-u300/u300.c ? ? ? ? ? ? ? ? ? ? ?| ? ?2 +-
> ?arch/arm/mach-ux500/include/mach/memory.h ? ? ?| ? ?2 +-
> ?arch/arm/mach-versatile/include/mach/memory.h ?| ? ?2 +-
> ?arch/arm/mach-vexpress/include/mach/memory.h ? | ? ?2 +-
> ?arch/arm/mach-w90x900/include/mach/memory.h ? ?| ? ?2 +-
> ?arch/arm/plat-omap/include/plat/memory.h ? ? ? | ? ?4 ++--
> ?arch/arm/plat-spear/include/plat/memory.h ? ? ?| ? ?2 +-
> ?arch/arm/plat-stmp3xxx/include/mach/memory.h ? | ? ?2 +-
> ?arch/arm/plat-tcc/include/mach/memory.h ? ? ? ?| ? ?2 +-
> ?63 files changed, 77 insertions(+), 75 deletions(-)
>
> diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
> index 23c2e8e..00b04ae 100644
> --- a/arch/arm/include/asm/memory.h
> +++ b/arch/arm/include/asm/memory.h
> @@ -24,6 +24,8 @@
> ?*/
> ?#define UL(x) _AC(x, UL)
>
> +#define PHYS_OFFSET ? ?PLAT_PHYS_OFFSET
> +
> ?#ifdef CONFIG_MMU
>
> ?/*
> diff --git a/arch/arm/kernel/tcm.c b/arch/arm/kernel/tcm.c
> index 26685c2..f5cf660 100644
> --- a/arch/arm/kernel/tcm.c
> +++ b/arch/arm/kernel/tcm.c
> @@ -15,7 +15,7 @@
> ?#include <linux/string.h> /* memcpy */
> ?#include <asm/cputype.h>
> ?#include <asm/mach/map.h>
> -#include <mach/memory.h>
> +#include <asm/memory.h>
> ?#include "tcm.h"
>
> ?static struct gen_pool *tcm_pool;
> diff --git a/arch/arm/mach-aaec2000/include/mach/memory.h b/arch/arm/mach-aaec2000/include/mach/memory.h
> index 4f93c56..4a10bf0 100644
> --- a/arch/arm/mach-aaec2000/include/mach/memory.h
> +++ b/arch/arm/mach-aaec2000/include/mach/memory.h
> @@ -12,6 +12,6 @@
> ?#define __ASM_ARCH_MEMORY_H
>
>
> -#define PHYS_OFFSET ? ?UL(0xf0000000)
> +#define PLAT_PHYS_OFFSET ? ? ? UL(0xf0000000)
>
> ?#endif /* __ASM_ARCH_MEMORY_H */
> diff --git a/arch/arm/mach-at91/include/mach/memory.h b/arch/arm/mach-at91/include/mach/memory.h
> index 14f4ef4..c2cfe50 100644
> --- a/arch/arm/mach-at91/include/mach/memory.h
> +++ b/arch/arm/mach-at91/include/mach/memory.h
> @@ -23,6 +23,6 @@
>
> ?#include <mach/hardware.h>
>
> -#define PHYS_OFFSET ? ?(AT91_SDRAM_BASE)
> +#define PLAT_PHYS_OFFSET ? ? ? (AT91_SDRAM_BASE)
>
> ?#endif
> diff --git a/arch/arm/mach-bcmring/include/mach/hardware.h b/arch/arm/mach-bcmring/include/mach/hardware.h
> index 447eb34..8bf3564 100644
> --- a/arch/arm/mach-bcmring/include/mach/hardware.h
> +++ b/arch/arm/mach-bcmring/include/mach/hardware.h
> @@ -31,7 +31,7 @@
> ?* ?*_SIZE ?is the size of the region
> ?* ?*_BASE ?is the virtual address
> ?*/
> -#define RAM_START ? ? ? ? ? ? ? PHYS_OFFSET
> +#define RAM_START ? ? ? ? ? ? ? PLAT_PHYS_OFFSET
>
> ?#define RAM_SIZE ? ? ? ? ? ? ? ?(CFG_GLOBAL_RAM_SIZE-CFG_GLOBAL_RAM_SIZE_RESERVED)
> ?#define RAM_BASE ? ? ? ? ? ? ? ?PAGE_OFFSET
> diff --git a/arch/arm/mach-bcmring/include/mach/memory.h b/arch/arm/mach-bcmring/include/mach/memory.h
> index 114f942..15162e4 100644
> --- a/arch/arm/mach-bcmring/include/mach/memory.h
> +++ b/arch/arm/mach-bcmring/include/mach/memory.h
> @@ -23,7 +23,7 @@
> ?* files. ?Use virt_to_phys/phys_to_virt/__pa/__va instead.
> ?*/
>
> -#define PHYS_OFFSET CFG_GLOBAL_RAM_BASE
> +#define PLAT_PHYS_OFFSET CFG_GLOBAL_RAM_BASE
>
> ?/*
> ?* Maximum DMA memory allowed is 14M
> diff --git a/arch/arm/mach-clps711x/include/mach/memory.h b/arch/arm/mach-clps711x/include/mach/memory.h
> index f45c8e8..3a032a6 100644
> --- a/arch/arm/mach-clps711x/include/mach/memory.h
> +++ b/arch/arm/mach-clps711x/include/mach/memory.h
> @@ -23,7 +23,7 @@
> ?/*
> ?* Physical DRAM offset.
> ?*/
> -#define PHYS_OFFSET ? ?UL(0xc0000000)
> +#define PLAT_PHYS_OFFSET ? ? ? UL(0xc0000000)
>
> ?#if !defined(CONFIG_ARCH_CDB89712) && !defined (CONFIG_ARCH_AUTCPU12)
>
> diff --git a/arch/arm/mach-cns3xxx/include/mach/memory.h b/arch/arm/mach-cns3xxx/include/mach/memory.h
> index 3b6b769..dc16c5c 100644
> --- a/arch/arm/mach-cns3xxx/include/mach/memory.h
> +++ b/arch/arm/mach-cns3xxx/include/mach/memory.h
> @@ -13,7 +13,7 @@
> ?/*
> ?* Physical DRAM offset.
> ?*/
> -#define PHYS_OFFSET ? ? ? ? ? ?UL(0x00000000)
> +#define PLAT_PHYS_OFFSET ? ? ? ? ? ? ? UL(0x00000000)
>
> ?#define __phys_to_bus(x) ? ? ? ((x) + PHYS_OFFSET)
> ?#define __bus_to_phys(x) ? ? ? ((x) - PHYS_OFFSET)
> diff --git a/arch/arm/mach-davinci/include/mach/memory.h b/arch/arm/mach-davinci/include/mach/memory.h
> index 22eb97c..7882272 100644
> --- a/arch/arm/mach-davinci/include/mach/memory.h
> +++ b/arch/arm/mach-davinci/include/mach/memory.h
> @@ -26,9 +26,9 @@
> ?#if defined(CONFIG_ARCH_DAVINCI_DA8XX) && defined(CONFIG_ARCH_DAVINCI_DMx)
> ?#error Cannot enable DaVinci and DA8XX platforms concurrently
> ?#elif defined(CONFIG_ARCH_DAVINCI_DA8XX)
> -#define PHYS_OFFSET DA8XX_DDR_BASE
> +#define PLAT_PHYS_OFFSET DA8XX_DDR_BASE
> ?#else
> -#define PHYS_OFFSET DAVINCI_DDR_BASE
> +#define PLAT_PHYS_OFFSET DAVINCI_DDR_BASE
> ?#endif
>
> ?#define DDR2_SDRCR_OFFSET ? ? ?0xc
> diff --git a/arch/arm/mach-dove/include/mach/memory.h b/arch/arm/mach-dove/include/mach/memory.h
> index d668720..bbc93fe 100644
> --- a/arch/arm/mach-dove/include/mach/memory.h
> +++ b/arch/arm/mach-dove/include/mach/memory.h
> @@ -5,6 +5,6 @@
> ?#ifndef __ASM_ARCH_MEMORY_H
> ?#define __ASM_ARCH_MEMORY_H
>
> -#define PHYS_OFFSET ? ? ? ? ? ?UL(0x00000000)
> +#define PLAT_PHYS_OFFSET ? ? ? ? ? ? ? UL(0x00000000)
>
> ?#endif
> diff --git a/arch/arm/mach-ebsa110/include/mach/memory.h b/arch/arm/mach-ebsa110/include/mach/memory.h
> index 0ca66d0..8e49066 100644
> --- a/arch/arm/mach-ebsa110/include/mach/memory.h
> +++ b/arch/arm/mach-ebsa110/include/mach/memory.h
> @@ -19,7 +19,7 @@
> ?/*
> ?* Physical DRAM offset.
> ?*/
> -#define PHYS_OFFSET ? ?UL(0x00000000)
> +#define PLAT_PHYS_OFFSET ? ? ? UL(0x00000000)
>
> ?/*
> ?* Cache flushing area - SRAM
> diff --git a/arch/arm/mach-ep93xx/include/mach/memory.h b/arch/arm/mach-ep93xx/include/mach/memory.h
> index 554064e..c9400cf 100644
> --- a/arch/arm/mach-ep93xx/include/mach/memory.h
> +++ b/arch/arm/mach-ep93xx/include/mach/memory.h
> @@ -6,15 +6,15 @@
> ?#define __ASM_ARCH_MEMORY_H
>
> ?#if defined(CONFIG_EP93XX_SDCE3_SYNC_PHYS_OFFSET)
> -#define PHYS_OFFSET ? ? ? ? ? ?UL(0x00000000)
> +#define PLAT_PHYS_OFFSET ? ? ? ? ? ? ? UL(0x00000000)
> ?#elif defined(CONFIG_EP93XX_SDCE0_PHYS_OFFSET)
> -#define PHYS_OFFSET ? ? ? ? ? ?UL(0xc0000000)
> +#define PLAT_PHYS_OFFSET ? ? ? ? ? ? ? UL(0xc0000000)
> ?#elif defined(CONFIG_EP93XX_SDCE1_PHYS_OFFSET)
> -#define PHYS_OFFSET ? ? ? ? ? ?UL(0xd0000000)
> +#define PLAT_PHYS_OFFSET ? ? ? ? ? ? ? UL(0xd0000000)
> ?#elif defined(CONFIG_EP93XX_SDCE2_PHYS_OFFSET)
> -#define PHYS_OFFSET ? ? ? ? ? ?UL(0xe0000000)
> +#define PLAT_PHYS_OFFSET ? ? ? ? ? ? ? UL(0xe0000000)
> ?#elif defined(CONFIG_EP93XX_SDCE3_ASYNC_PHYS_OFFSET)
> -#define PHYS_OFFSET ? ? ? ? ? ?UL(0xf0000000)
> +#define PLAT_PHYS_OFFSET ? ? ? ? ? ? ? UL(0xf0000000)
> ?#else
> ?#error "Kconfig bug: No EP93xx PHYS_OFFSET set"
> ?#endif
> diff --git a/arch/arm/mach-footbridge/include/mach/memory.h b/arch/arm/mach-footbridge/include/mach/memory.h
> index 8d64f45..5c6df37 100644
> --- a/arch/arm/mach-footbridge/include/mach/memory.h
> +++ b/arch/arm/mach-footbridge/include/mach/memory.h
> @@ -62,7 +62,7 @@ extern unsigned long __bus_to_pfn(unsigned long);
> ?/*
> ?* Physical DRAM offset.
> ?*/
> -#define PHYS_OFFSET ? ? ? ? ? ?UL(0x00000000)
> +#define PLAT_PHYS_OFFSET ? ? ? ? ? ? ? UL(0x00000000)
>
> ?#define FLUSH_BASE_PHYS ? ? ? ? ? ? ? ?0x50000000
>
> diff --git a/arch/arm/mach-h720x/include/mach/memory.h b/arch/arm/mach-h720x/include/mach/memory.h
> index ef4c1e2..9d36876 100644
> --- a/arch/arm/mach-h720x/include/mach/memory.h
> +++ b/arch/arm/mach-h720x/include/mach/memory.h
> @@ -7,7 +7,7 @@
> ?#ifndef __ASM_ARCH_MEMORY_H
> ?#define __ASM_ARCH_MEMORY_H
>
> -#define PHYS_OFFSET ? ?UL(0x40000000)
> +#define PLAT_PHYS_OFFSET ? ? ? UL(0x40000000)
> ?/*
> ?* This is the maximum DMA address that can be DMAd to.
> ?* There should not be more than (0xd0000000 - 0xc0000000)
> diff --git a/arch/arm/mach-integrator/include/mach/memory.h b/arch/arm/mach-integrator/include/mach/memory.h
> index 991f24d..334d5e2 100644
> --- a/arch/arm/mach-integrator/include/mach/memory.h
> +++ b/arch/arm/mach-integrator/include/mach/memory.h
> @@ -23,7 +23,7 @@
> ?/*
> ?* Physical DRAM offset.
> ?*/
> -#define PHYS_OFFSET ? ?UL(0x00000000)
> +#define PLAT_PHYS_OFFSET ? ? ? UL(0x00000000)
>
> ?#define BUS_OFFSET ? ? UL(0x80000000)
> ?#define __virt_to_bus(x) ? ? ? ((x) - PAGE_OFFSET + BUS_OFFSET)
> diff --git a/arch/arm/mach-iop13xx/include/mach/memory.h b/arch/arm/mach-iop13xx/include/mach/memory.h
> index 3ad4553..1afa99e 100644
> --- a/arch/arm/mach-iop13xx/include/mach/memory.h
> +++ b/arch/arm/mach-iop13xx/include/mach/memory.h
> @@ -6,7 +6,7 @@
> ?/*
> ?* Physical DRAM offset.
> ?*/
> -#define PHYS_OFFSET ? ?UL(0x00000000)
> +#define PLAT_PHYS_OFFSET ? ? ? UL(0x00000000)
>
> ?#ifndef __ASSEMBLY__
>
> diff --git a/arch/arm/mach-iop32x/include/mach/memory.h b/arch/arm/mach-iop32x/include/mach/memory.h
> index c30f645..169cc23 100644
> --- a/arch/arm/mach-iop32x/include/mach/memory.h
> +++ b/arch/arm/mach-iop32x/include/mach/memory.h
> @@ -8,6 +8,6 @@
> ?/*
> ?* Physical DRAM offset.
> ?*/
> -#define PHYS_OFFSET ? ?UL(0xa0000000)
> +#define PLAT_PHYS_OFFSET ? ? ? UL(0xa0000000)
>
> ?#endif
> diff --git a/arch/arm/mach-iop33x/include/mach/memory.h b/arch/arm/mach-iop33x/include/mach/memory.h
> index a30a96a..8e1daf7 100644
> --- a/arch/arm/mach-iop33x/include/mach/memory.h
> +++ b/arch/arm/mach-iop33x/include/mach/memory.h
> @@ -8,6 +8,6 @@
> ?/*
> ?* Physical DRAM offset.
> ?*/
> -#define PHYS_OFFSET ? ?UL(0x00000000)
> +#define PLAT_PHYS_OFFSET ? ? ? UL(0x00000000)
>
> ?#endif
> diff --git a/arch/arm/mach-ixp2000/include/mach/memory.h b/arch/arm/mach-ixp2000/include/mach/memory.h
> index 98e3471..5f0c4fd 100644
> --- a/arch/arm/mach-ixp2000/include/mach/memory.h
> +++ b/arch/arm/mach-ixp2000/include/mach/memory.h
> @@ -13,7 +13,7 @@
> ?#ifndef __ASM_ARCH_MEMORY_H
> ?#define __ASM_ARCH_MEMORY_H
>
> -#define PHYS_OFFSET ? ?UL(0x00000000)
> +#define PLAT_PHYS_OFFSET ? ? ? UL(0x00000000)
>
> ?#include <mach/ixp2000-regs.h>
>
> diff --git a/arch/arm/mach-ixp23xx/include/mach/memory.h b/arch/arm/mach-ixp23xx/include/mach/memory.h
> index 6ef65d8..6cf0704 100644
> --- a/arch/arm/mach-ixp23xx/include/mach/memory.h
> +++ b/arch/arm/mach-ixp23xx/include/mach/memory.h
> @@ -17,7 +17,7 @@
> ?/*
> ?* Physical DRAM offset.
> ?*/
> -#define PHYS_OFFSET ? ? ? ? ? ?(0x00000000)
> +#define PLAT_PHYS_OFFSET ? ? ? ? ? ? ? (0x00000000)
>
> ?#define IXP23XX_PCI_SDRAM_OFFSET (*((volatile int *)IXP23XX_PCI_SDRAM_BAR) & 0xfffffff0)
>
> diff --git a/arch/arm/mach-ixp4xx/include/mach/memory.h b/arch/arm/mach-ixp4xx/include/mach/memory.h
> index 0136eaa..6d388c9 100644
> --- a/arch/arm/mach-ixp4xx/include/mach/memory.h
> +++ b/arch/arm/mach-ixp4xx/include/mach/memory.h
> @@ -12,7 +12,7 @@
> ?/*
> ?* Physical DRAM offset.
> ?*/
> -#define PHYS_OFFSET ? ?UL(0x00000000)
> +#define PLAT_PHYS_OFFSET ? ? ? UL(0x00000000)
>
> ?#if !defined(__ASSEMBLY__) && defined(CONFIG_PCI)
>
> diff --git a/arch/arm/mach-kirkwood/include/mach/memory.h b/arch/arm/mach-kirkwood/include/mach/memory.h
> index 45431e1..4600b44 100644
> --- a/arch/arm/mach-kirkwood/include/mach/memory.h
> +++ b/arch/arm/mach-kirkwood/include/mach/memory.h
> @@ -5,6 +5,6 @@
> ?#ifndef __ASM_ARCH_MEMORY_H
> ?#define __ASM_ARCH_MEMORY_H
>
> -#define PHYS_OFFSET ? ? ? ? ? ?UL(0x00000000)
> +#define PLAT_PHYS_OFFSET ? ? ? ? ? ? ? UL(0x00000000)
>
> ?#endif
> diff --git a/arch/arm/mach-ks8695/include/mach/memory.h b/arch/arm/mach-ks8695/include/mach/memory.h
> index bace9a6..f7e1b9b 100644
> --- a/arch/arm/mach-ks8695/include/mach/memory.h
> +++ b/arch/arm/mach-ks8695/include/mach/memory.h
> @@ -18,7 +18,7 @@
> ?/*
> ?* Physical SRAM offset.
> ?*/
> -#define PHYS_OFFSET ? ? ? ? ? ?KS8695_SDRAM_PA
> +#define PLAT_PHYS_OFFSET ? ? ? ? ? ? ? KS8695_SDRAM_PA
>
> ?#ifndef __ASSEMBLY__
>
> diff --git a/arch/arm/mach-lh7a40x/include/mach/memory.h b/arch/arm/mach-lh7a40x/include/mach/memory.h
> index edb8f5f..f77bde8 100644
> --- a/arch/arm/mach-lh7a40x/include/mach/memory.h
> +++ b/arch/arm/mach-lh7a40x/include/mach/memory.h
> @@ -17,7 +17,7 @@
> ?/*
> ?* Physical DRAM offset.
> ?*/
> -#define PHYS_OFFSET ? ?UL(0xc0000000)
> +#define PLAT_PHYS_OFFSET ? ? ? UL(0xc0000000)
>
> ?/*
> ?* Sparsemem version of the above
> diff --git a/arch/arm/mach-loki/include/mach/memory.h b/arch/arm/mach-loki/include/mach/memory.h
> index 2ed7e6e..6636665 100644
> --- a/arch/arm/mach-loki/include/mach/memory.h
> +++ b/arch/arm/mach-loki/include/mach/memory.h
> @@ -5,6 +5,6 @@
> ?#ifndef __ASM_ARCH_MEMORY_H
> ?#define __ASM_ARCH_MEMORY_H
>
> -#define PHYS_OFFSET ? ? ? ? ? ?UL(0x00000000)
> +#define PLAT_PHYS_OFFSET ? ? ? ? ? ? ? UL(0x00000000)
>
> ?#endif
> diff --git a/arch/arm/mach-lpc32xx/include/mach/memory.h b/arch/arm/mach-lpc32xx/include/mach/memory.h
> index 044e1ac..a647dd6 100644
> --- a/arch/arm/mach-lpc32xx/include/mach/memory.h
> +++ b/arch/arm/mach-lpc32xx/include/mach/memory.h
> @@ -22,6 +22,6 @@
> ?/*
> ?* Physical DRAM offset of bank 0
> ?*/
> -#define PHYS_OFFSET ? ?UL(0x80000000)
> +#define PLAT_PHYS_OFFSET ? ? ? UL(0x80000000)
>
> ?#endif
> diff --git a/arch/arm/mach-mmp/include/mach/memory.h b/arch/arm/mach-mmp/include/mach/memory.h
> index bdb21d7..d68b50a 100644
> --- a/arch/arm/mach-mmp/include/mach/memory.h
> +++ b/arch/arm/mach-mmp/include/mach/memory.h
> @@ -9,6 +9,6 @@
> ?#ifndef __ASM_MACH_MEMORY_H
> ?#define __ASM_MACH_MEMORY_H
>
> -#define PHYS_OFFSET ? ?UL(0x00000000)
> +#define PLAT_PHYS_OFFSET ? ? ? UL(0x00000000)
>
> ?#endif /* __ASM_MACH_MEMORY_H */
> diff --git a/arch/arm/mach-msm/board-msm7x30.c b/arch/arm/mach-msm/board-msm7x30.c
> index 05241df..1931e07 100644
> --- a/arch/arm/mach-msm/board-msm7x30.c
> +++ b/arch/arm/mach-msm/board-msm7x30.c
> @@ -25,11 +25,11 @@
>
> ?#include <asm/mach-types.h>
> ?#include <asm/mach/arch.h>
> +#include <asm/memory.h>
> ?#include <asm/setup.h>
>
> ?#include <mach/gpio.h>
> ?#include <mach/board.h>
> -#include <mach/memory.h>
> ?#include <mach/msm_iomap.h>
> ?#include <mach/dma.h>
>
> diff --git a/arch/arm/mach-msm/include/mach/memory.h b/arch/arm/mach-msm/include/mach/memory.h
> index 070e17d..176875d 100644
> --- a/arch/arm/mach-msm/include/mach/memory.h
> +++ b/arch/arm/mach-msm/include/mach/memory.h
> @@ -18,15 +18,15 @@
>
> ?/* physical offset of RAM */
> ?#if defined(CONFIG_ARCH_QSD8X50) && defined(CONFIG_MSM_SOC_REV_A)
> -#define PHYS_OFFSET ? ? ? ? ? ?UL(0x00000000)
> +#define PLAT_PHYS_OFFSET ? ? ? ? ? ? ? UL(0x00000000)
> ?#elif defined(CONFIG_ARCH_QSD8X50)
> -#define PHYS_OFFSET ? ? ? ? ? ?UL(0x20000000)
> +#define PLAT_PHYS_OFFSET ? ? ? ? ? ? ? UL(0x20000000)
> ?#elif defined(CONFIG_ARCH_MSM7X30)
> -#define PHYS_OFFSET ? ? ? ? ? ?UL(0x00200000)
> +#define PLAT_PHYS_OFFSET ? ? ? ? ? ? ? UL(0x00200000)
> ?#elif defined(CONFIG_ARCH_MSM8X60)
> -#define PHYS_OFFSET ? ? ? ? ? ?UL(0x40200000)
> +#define PLAT_PHYS_OFFSET ? ? ? ? ? ? ? UL(0x40200000)
> ?#else
> -#define PHYS_OFFSET ? ? ? ? ? ?UL(0x10000000)
> +#define PLAT_PHYS_OFFSET ? ? ? ? ? ? ? UL(0x10000000)
> ?#endif
>
> ?#endif
> diff --git a/arch/arm/mach-mv78xx0/include/mach/memory.h b/arch/arm/mach-mv78xx0/include/mach/memory.h
> index e663042..a648c51 100644
> --- a/arch/arm/mach-mv78xx0/include/mach/memory.h
> +++ b/arch/arm/mach-mv78xx0/include/mach/memory.h
> @@ -5,6 +5,6 @@
> ?#ifndef __ASM_ARCH_MEMORY_H
> ?#define __ASM_ARCH_MEMORY_H
>
> -#define PHYS_OFFSET ? ? ? ? ? ?UL(0x00000000)
> +#define PLAT_PHYS_OFFSET ? ? ? ? ? ? ? UL(0x00000000)
>
> ?#endif
> diff --git a/arch/arm/mach-mx3/mach-kzm_arm11_01.c b/arch/arm/mach-mx3/mach-kzm_arm11_01.c
> index 042cd56..d8ebde8 100644
> --- a/arch/arm/mach-mx3/mach-kzm_arm11_01.c
> +++ b/arch/arm/mach-mx3/mach-kzm_arm11_01.c
> @@ -27,6 +27,7 @@
>
> ?#include <asm/irq.h>
> ?#include <asm/mach-types.h>
> +#include <asm/memory.h>
> ?#include <asm/setup.h>
> ?#include <asm/mach/arch.h>
> ?#include <asm/mach/irq.h>
> @@ -36,7 +37,6 @@
> ?#include <mach/clock.h>
> ?#include <mach/common.h>
> ?#include <mach/iomux-mx3.h>
> -#include <mach/memory.h>
>
> ?#include "devices-imx31.h"
> ?#include "devices.h"
> diff --git a/arch/arm/mach-netx/include/mach/memory.h b/arch/arm/mach-netx/include/mach/memory.h
> index 9a363f2..5956149 100644
> --- a/arch/arm/mach-netx/include/mach/memory.h
> +++ b/arch/arm/mach-netx/include/mach/memory.h
> @@ -20,7 +20,7 @@
> ?#ifndef __ASM_ARCH_MEMORY_H
> ?#define __ASM_ARCH_MEMORY_H
>
> -#define PHYS_OFFSET UL(0x80000000)
> +#define PLAT_PHYS_OFFSET UL(0x80000000)
>
> ?#endif
>
> diff --git a/arch/arm/mach-nomadik/include/mach/memory.h b/arch/arm/mach-nomadik/include/mach/memory.h
> index 1e5689d..d332521 100644
> --- a/arch/arm/mach-nomadik/include/mach/memory.h
> +++ b/arch/arm/mach-nomadik/include/mach/memory.h
> @@ -23,6 +23,6 @@
> ?/*
> ?* Physical DRAM offset.
> ?*/
> -#define PHYS_OFFSET ? ?UL(0x00000000)
> +#define PLAT_PHYS_OFFSET ? ? ? UL(0x00000000)
>
> ?#endif
> diff --git a/arch/arm/mach-ns9xxx/include/mach/memory.h b/arch/arm/mach-ns9xxx/include/mach/memory.h
> index 6107193..5c65aee 100644
> --- a/arch/arm/mach-ns9xxx/include/mach/memory.h
> +++ b/arch/arm/mach-ns9xxx/include/mach/memory.h
> @@ -19,6 +19,6 @@
> ?#define NS9XXX_CS2STAT_LENGTH ?UL(0x1000)
> ?#define NS9XXX_CS3STAT_LENGTH ?UL(0x1000)
>
> -#define PHYS_OFFSET ? ?UL(0x00000000)
> +#define PLAT_PHYS_OFFSET ? ? ? UL(0x00000000)
>
> ?#endif
> diff --git a/arch/arm/mach-nuc93x/include/mach/memory.h b/arch/arm/mach-nuc93x/include/mach/memory.h
> index 323ab0d..ef9864b 100644
> --- a/arch/arm/mach-nuc93x/include/mach/memory.h
> +++ b/arch/arm/mach-nuc93x/include/mach/memory.h
> @@ -16,6 +16,6 @@
> ?#ifndef __ASM_ARCH_MEMORY_H
> ?#define __ASM_ARCH_MEMORY_H
>
> -#define PHYS_OFFSET ? ?UL(0x00000000)
> +#define PLAT_PHYS_OFFSET ? ? ? UL(0x00000000)
>
> ?#endif
> diff --git a/arch/arm/mach-orion5x/include/mach/memory.h b/arch/arm/mach-orion5x/include/mach/memory.h
> index 52a2955..6769917 100644
> --- a/arch/arm/mach-orion5x/include/mach/memory.h
> +++ b/arch/arm/mach-orion5x/include/mach/memory.h
> @@ -7,6 +7,6 @@
> ?#ifndef __ASM_ARCH_MEMORY_H
> ?#define __ASM_ARCH_MEMORY_H
>
> -#define PHYS_OFFSET ? ?UL(0x00000000)
> +#define PLAT_PHYS_OFFSET ? ? ? UL(0x00000000)
>
> ?#endif
> diff --git a/arch/arm/mach-pnx4008/include/mach/memory.h b/arch/arm/mach-pnx4008/include/mach/memory.h
> index 0e87700..1275db6 100644
> --- a/arch/arm/mach-pnx4008/include/mach/memory.h
> +++ b/arch/arm/mach-pnx4008/include/mach/memory.h
> @@ -16,6 +16,6 @@
> ?/*
> ?* Physical DRAM offset.
> ?*/
> -#define PHYS_OFFSET ? ?UL(0x80000000)
> +#define PLAT_PHYS_OFFSET ? ? ? UL(0x80000000)
>
> ?#endif
> diff --git a/arch/arm/mach-pxa/include/mach/memory.h b/arch/arm/mach-pxa/include/mach/memory.h
> index 92361a6..7f68724 100644
> --- a/arch/arm/mach-pxa/include/mach/memory.h
> +++ b/arch/arm/mach-pxa/include/mach/memory.h
> @@ -15,7 +15,7 @@
> ?/*
> ?* Physical DRAM offset.
> ?*/
> -#define PHYS_OFFSET ? ?UL(0xa0000000)
> +#define PLAT_PHYS_OFFSET ? ? ? UL(0xa0000000)
>
> ?#if !defined(__ASSEMBLY__) && defined(CONFIG_MACH_ARMCORE) && defined(CONFIG_PCI)
> ?void cmx2xx_pci_adjust_zones(unsigned long *size, unsigned long *holes);
> diff --git a/arch/arm/mach-realview/include/mach/memory.h b/arch/arm/mach-realview/include/mach/memory.h
> index 5dafc15..e05fc2c 100644
> --- a/arch/arm/mach-realview/include/mach/memory.h
> +++ b/arch/arm/mach-realview/include/mach/memory.h
> @@ -24,9 +24,9 @@
> ?* Physical DRAM offset.
> ?*/
> ?#ifdef CONFIG_REALVIEW_HIGH_PHYS_OFFSET
> -#define PHYS_OFFSET ? ? ? ? ? ?UL(0x70000000)
> +#define PLAT_PHYS_OFFSET ? ? ? ? ? ? ? UL(0x70000000)
> ?#else
> -#define PHYS_OFFSET ? ? ? ? ? ?UL(0x00000000)
> +#define PLAT_PHYS_OFFSET ? ? ? ? ? ? ? UL(0x00000000)
> ?#endif
>
> ?#if !defined(__ASSEMBLY__) && defined(CONFIG_ZONE_DMA)
> diff --git a/arch/arm/mach-rpc/include/mach/memory.h b/arch/arm/mach-rpc/include/mach/memory.h
> index 78191bf..18a2210 100644
> --- a/arch/arm/mach-rpc/include/mach/memory.h
> +++ b/arch/arm/mach-rpc/include/mach/memory.h
> @@ -21,7 +21,7 @@
> ?/*
> ?* Physical DRAM offset.
> ?*/
> -#define PHYS_OFFSET ? ?UL(0x10000000)
> +#define PLAT_PHYS_OFFSET ? ? ? UL(0x10000000)
>
> ?/*
> ?* Cache flushing area - ROM
> diff --git a/arch/arm/mach-s3c2400/include/mach/memory.h b/arch/arm/mach-s3c2400/include/mach/memory.h
> index cf5901f..3f33670 100644
> --- a/arch/arm/mach-s3c2400/include/mach/memory.h
> +++ b/arch/arm/mach-s3c2400/include/mach/memory.h
> @@ -15,6 +15,6 @@
> ?#ifndef __ASM_ARCH_MEMORY_H
> ?#define __ASM_ARCH_MEMORY_H
>
> -#define PHYS_OFFSET ? ?UL(0x0C000000)
> +#define PLAT_PHYS_OFFSET ? ? ? UL(0x0C000000)
>
> ?#endif
> diff --git a/arch/arm/mach-s3c2410/include/mach/memory.h b/arch/arm/mach-s3c2410/include/mach/memory.h
> index 6f1e587..f92b97b 100644
> --- a/arch/arm/mach-s3c2410/include/mach/memory.h
> +++ b/arch/arm/mach-s3c2410/include/mach/memory.h
> @@ -11,6 +11,6 @@
> ?#ifndef __ASM_ARCH_MEMORY_H
> ?#define __ASM_ARCH_MEMORY_H
>
> -#define PHYS_OFFSET ? ?UL(0x30000000)
> +#define PLAT_PHYS_OFFSET ? ? ? UL(0x30000000)
>
> ?#endif
> diff --git a/arch/arm/mach-s3c24a0/include/mach/memory.h b/arch/arm/mach-s3c24a0/include/mach/memory.h
> index 7d74fd5..7d208a7 100644
> --- a/arch/arm/mach-s3c24a0/include/mach/memory.h
> +++ b/arch/arm/mach-s3c24a0/include/mach/memory.h
> @@ -11,7 +11,7 @@
> ?#ifndef __ASM_ARCH_24A0_MEMORY_H
> ?#define __ASM_ARCH_24A0_MEMORY_H __FILE__
>
> -#define PHYS_OFFSET UL(0x10000000)
> +#define PLAT_PHYS_OFFSET UL(0x10000000)
>
> ?#define __virt_to_bus(x) __virt_to_phys(x)
> ?#define __bus_to_virt(x) __phys_to_virt(x)
> diff --git a/arch/arm/mach-s3c64xx/include/mach/memory.h b/arch/arm/mach-s3c64xx/include/mach/memory.h
> index 42cc54e..4760cda 100644
> --- a/arch/arm/mach-s3c64xx/include/mach/memory.h
> +++ b/arch/arm/mach-s3c64xx/include/mach/memory.h
> @@ -13,7 +13,7 @@
> ?#ifndef __ASM_ARCH_MEMORY_H
> ?#define __ASM_ARCH_MEMORY_H
>
> -#define PHYS_OFFSET ? ? UL(0x50000000)
> +#define PLAT_PHYS_OFFSET ? ? UL(0x50000000)
>
> ?#define CONSISTENT_DMA_SIZE ? ?SZ_8M
>
> diff --git a/arch/arm/mach-s5p6442/include/mach/memory.h b/arch/arm/mach-s5p6442/include/mach/memory.h
> index 9ddd877..cfe259d 100644
> --- a/arch/arm/mach-s5p6442/include/mach/memory.h
> +++ b/arch/arm/mach-s5p6442/include/mach/memory.h
> @@ -13,7 +13,7 @@
> ?#ifndef __ASM_ARCH_MEMORY_H
> ?#define __ASM_ARCH_MEMORY_H
>
> -#define PHYS_OFFSET ? ? ? ? ? ?UL(0x20000000)
> +#define PLAT_PHYS_OFFSET ? ? ? ? ? ? ? UL(0x20000000)
> ?#define CONSISTENT_DMA_SIZE ? ?SZ_8M
>
> ?#endif /* __ASM_ARCH_MEMORY_H */
> diff --git a/arch/arm/mach-s5p64x0/include/mach/memory.h b/arch/arm/mach-s5p64x0/include/mach/memory.h
> index 1b036b0..365a6eb 100644
> --- a/arch/arm/mach-s5p64x0/include/mach/memory.h
> +++ b/arch/arm/mach-s5p64x0/include/mach/memory.h
> @@ -13,7 +13,7 @@
> ?#ifndef __ASM_ARCH_MEMORY_H
> ?#define __ASM_ARCH_MEMORY_H __FILE__
>
> -#define PHYS_OFFSET ? ? ? ? ? ?UL(0x20000000)
> +#define PLAT_PHYS_OFFSET ? ? ? ? ? ? ? UL(0x20000000)
> ?#define CONSISTENT_DMA_SIZE ? ?SZ_8M
>
> ?#endif /* __ASM_ARCH_MEMORY_H */
> diff --git a/arch/arm/mach-s5pc100/include/mach/memory.h b/arch/arm/mach-s5pc100/include/mach/memory.h
> index 4b60d18..bda4e79 100644
> --- a/arch/arm/mach-s5pc100/include/mach/memory.h
> +++ b/arch/arm/mach-s5pc100/include/mach/memory.h
> @@ -13,6 +13,6 @@
> ?#ifndef __ASM_ARCH_MEMORY_H
> ?#define __ASM_ARCH_MEMORY_H
>
> -#define PHYS_OFFSET ? ? ? ? ? ?UL(0x20000000)
> +#define PLAT_PHYS_OFFSET ? ? ? UL(0x20000000)
>
> ?#endif
> diff --git a/arch/arm/mach-s5pv210/include/mach/memory.h b/arch/arm/mach-s5pv210/include/mach/memory.h
> index d503e0c..7b5fcf0 100644
> --- a/arch/arm/mach-s5pv210/include/mach/memory.h
> +++ b/arch/arm/mach-s5pv210/include/mach/memory.h
> @@ -13,7 +13,7 @@
> ?#ifndef __ASM_ARCH_MEMORY_H
> ?#define __ASM_ARCH_MEMORY_H
>
> -#define PHYS_OFFSET ? ? ? ? ? ?UL(0x20000000)
> +#define PLAT_PHYS_OFFSET ? ? ? ? ? ? ? UL(0x20000000)
> ?#define CONSISTENT_DMA_SIZE ? ?(SZ_8M + SZ_4M + SZ_2M)
>
> ?/*
> diff --git a/arch/arm/mach-s5pv310/include/mach/memory.h b/arch/arm/mach-s5pv310/include/mach/memory.h
> index 1dffb48..470b01b 100644
> --- a/arch/arm/mach-s5pv310/include/mach/memory.h
> +++ b/arch/arm/mach-s5pv310/include/mach/memory.h
> @@ -13,7 +13,7 @@
> ?#ifndef __ASM_ARCH_MEMORY_H
> ?#define __ASM_ARCH_MEMORY_H __FILE__
>
> -#define PHYS_OFFSET ? ? ? ? ? ?UL(0x40000000)
> +#define PLAT_PHYS_OFFSET ? ? ? ? ? ? ? UL(0x40000000)
>
> ?/* Maximum of 256MiB in one bank */
> ?#define MAX_PHYSMEM_BITS ? ? ? 32
> diff --git a/arch/arm/mach-sa1100/include/mach/memory.h b/arch/arm/mach-sa1100/include/mach/memory.h
> index 128a1df..a44da6a 100644
> --- a/arch/arm/mach-sa1100/include/mach/memory.h
> +++ b/arch/arm/mach-sa1100/include/mach/memory.h
> @@ -12,7 +12,7 @@
> ?/*
> ?* Physical DRAM offset is 0xc0000000 on the SA1100
> ?*/
> -#define PHYS_OFFSET ? ?UL(0xc0000000)
> +#define PLAT_PHYS_OFFSET ? ? ? UL(0xc0000000)
>
> ?#ifndef __ASSEMBLY__
>
> diff --git a/arch/arm/mach-shark/include/mach/memory.h b/arch/arm/mach-shark/include/mach/memory.h
> index d9c4812..9afb170 100644
> --- a/arch/arm/mach-shark/include/mach/memory.h
> +++ b/arch/arm/mach-shark/include/mach/memory.h
> @@ -15,7 +15,7 @@
> ?/*
> ?* Physical DRAM offset.
> ?*/
> -#define PHYS_OFFSET ? ? UL(0x08000000)
> +#define PLAT_PHYS_OFFSET ? ? UL(0x08000000)
>
> ?#ifndef __ASSEMBLY__
>
> diff --git a/arch/arm/mach-shmobile/include/mach/memory.h b/arch/arm/mach-shmobile/include/mach/memory.h
> index 377584e..ad00c3c 100644
> --- a/arch/arm/mach-shmobile/include/mach/memory.h
> +++ b/arch/arm/mach-shmobile/include/mach/memory.h
> @@ -1,7 +1,7 @@
> ?#ifndef __ASM_MACH_MEMORY_H
> ?#define __ASM_MACH_MEMORY_H
>
> -#define PHYS_OFFSET ? ?UL(CONFIG_MEMORY_START)
> +#define PLAT_PHYS_OFFSET ? ? ? UL(CONFIG_MEMORY_START)
> ?#define MEM_SIZE ? ? ? UL(CONFIG_MEMORY_SIZE)
>
> ?/* DMA memory at 0xf6000000 - 0xffdfffff */
> diff --git a/arch/arm/mach-tegra/include/mach/memory.h b/arch/arm/mach-tegra/include/mach/memory.h
> index 6151bab..537db3a 100644
> --- a/arch/arm/mach-tegra/include/mach/memory.h
> +++ b/arch/arm/mach-tegra/include/mach/memory.h
> @@ -22,7 +22,7 @@
> ?#define __MACH_TEGRA_MEMORY_H
>
> ?/* physical offset of RAM */
> -#define PHYS_OFFSET ? ? ? ? ? ?UL(0)
> +#define PLAT_PHYS_OFFSET ? ? ? ? ? ? ? UL(0)
>
> ?#endif
>
> diff --git a/arch/arm/mach-u300/include/mach/memory.h b/arch/arm/mach-u300/include/mach/memory.h
> index bf134bc..888e2e3 100644
> --- a/arch/arm/mach-u300/include/mach/memory.h
> +++ b/arch/arm/mach-u300/include/mach/memory.h
> @@ -15,17 +15,17 @@
>
> ?#ifdef CONFIG_MACH_U300_DUAL_RAM
>
> -#define PHYS_OFFSET ? ? ? ? ? ?UL(0x48000000)
> +#define PLAT_PHYS_OFFSET ? ? ? ? ? ? ? UL(0x48000000)
> ?#define BOOT_PARAMS_OFFSET ? ? (PHYS_OFFSET + 0x100)
>
> ?#else
>
> ?#ifdef CONFIG_MACH_U300_2MB_ALIGNMENT_FIX
> -#define PHYS_OFFSET (0x28000000 + \
> +#define PLAT_PHYS_OFFSET (0x28000000 + \
> ? ? ? ? ? ? (CONFIG_MACH_U300_ACCESS_MEM_SIZE - \
> ? ? ? ? ? ? (CONFIG_MACH_U300_ACCESS_MEM_SIZE & 1))*1024*1024)
> ?#else
> -#define PHYS_OFFSET (0x28000000 + \
> +#define PLAT_PHYS_OFFSET (0x28000000 + \
> ? ? ? ? ? ? (CONFIG_MACH_U300_ACCESS_MEM_SIZE + ? ? ? ?\
> ? ? ? ? ? ? (CONFIG_MACH_U300_ACCESS_MEM_SIZE & 1))*1024*1024)
> ?#endif
> diff --git a/arch/arm/mach-u300/u300.c b/arch/arm/mach-u300/u300.c
> index 07c35a8..48b3b7f 100644
> --- a/arch/arm/mach-u300/u300.c
> +++ b/arch/arm/mach-u300/u300.c
> @@ -19,9 +19,9 @@
> ?#include <linux/io.h>
> ?#include <mach/hardware.h>
> ?#include <mach/platform.h>
> -#include <mach/memory.h>
> ?#include <asm/mach-types.h>
> ?#include <asm/mach/arch.h>
> +#include <asm/memory.h>
>
> ?static void __init u300_reserve(void)
> ?{
> diff --git a/arch/arm/mach-ux500/include/mach/memory.h b/arch/arm/mach-ux500/include/mach/memory.h
> index 510571a..2ef697a 100644
> --- a/arch/arm/mach-ux500/include/mach/memory.h
> +++ b/arch/arm/mach-ux500/include/mach/memory.h
> @@ -12,7 +12,7 @@
> ?/*
> ?* Physical DRAM offset.
> ?*/
> -#define PHYS_OFFSET ? ?UL(0x00000000)
> +#define PLAT_PHYS_OFFSET ? ? ? UL(0x00000000)
> ?#define BUS_OFFSET ? ? UL(0x00000000)
>
> ?#endif
> diff --git a/arch/arm/mach-versatile/include/mach/memory.h b/arch/arm/mach-versatile/include/mach/memory.h
> index 79aeab8..dacc9d8 100644
> --- a/arch/arm/mach-versatile/include/mach/memory.h
> +++ b/arch/arm/mach-versatile/include/mach/memory.h
> @@ -23,6 +23,6 @@
> ?/*
> ?* Physical DRAM offset.
> ?*/
> -#define PHYS_OFFSET ? ?UL(0x00000000)
> +#define PLAT_PHYS_OFFSET ? ? ? UL(0x00000000)
>
> ?#endif
> diff --git a/arch/arm/mach-vexpress/include/mach/memory.h b/arch/arm/mach-vexpress/include/mach/memory.h
> index be28232..5b7fcd4 100644
> --- a/arch/arm/mach-vexpress/include/mach/memory.h
> +++ b/arch/arm/mach-vexpress/include/mach/memory.h
> @@ -20,6 +20,6 @@
> ?#ifndef __ASM_ARCH_MEMORY_H
> ?#define __ASM_ARCH_MEMORY_H
>
> -#define PHYS_OFFSET ? ? ? ? ? ?UL(0x60000000)
> +#define PLAT_PHYS_OFFSET ? ? ? ? ? ? ? UL(0x60000000)
>
> ?#endif
> diff --git a/arch/arm/mach-w90x900/include/mach/memory.h b/arch/arm/mach-w90x900/include/mach/memory.h
> index 971b807..f02905b 100644
> --- a/arch/arm/mach-w90x900/include/mach/memory.h
> +++ b/arch/arm/mach-w90x900/include/mach/memory.h
> @@ -18,6 +18,6 @@
> ?#ifndef __ASM_ARCH_MEMORY_H
> ?#define __ASM_ARCH_MEMORY_H
>
> -#define PHYS_OFFSET ? ?UL(0x00000000)
> +#define PLAT_PHYS_OFFSET ? ? ? UL(0x00000000)
>
> ?#endif
> diff --git a/arch/arm/plat-omap/include/plat/memory.h b/arch/arm/plat-omap/include/plat/memory.h
> index f8d922f..e6720aa 100644
> --- a/arch/arm/plat-omap/include/plat/memory.h
> +++ b/arch/arm/plat-omap/include/plat/memory.h
> @@ -37,9 +37,9 @@
> ?* Physical DRAM offset.
> ?*/
> ?#if defined(CONFIG_ARCH_OMAP1)
> -#define PHYS_OFFSET ? ? ? ? ? ?UL(0x10000000)
> +#define PLAT_PHYS_OFFSET ? ? ? ? ? ? ? UL(0x10000000)
> ?#else
> -#define PHYS_OFFSET ? ? ? ? ? ?UL(0x80000000)
> +#define PLAT_PHYS_OFFSET ? ? ? ? ? ? ? UL(0x80000000)
> ?#endif
>
> ?/*
> diff --git a/arch/arm/plat-spear/include/plat/memory.h b/arch/arm/plat-spear/include/plat/memory.h
> index 27a4aba..7e3599e 100644
> --- a/arch/arm/plat-spear/include/plat/memory.h
> +++ b/arch/arm/plat-spear/include/plat/memory.h
> @@ -15,6 +15,6 @@
> ?#define __PLAT_MEMORY_H
>
> ?/* Physical DRAM offset */
> -#define PHYS_OFFSET ? ? ? ? ? ?UL(0x00000000)
> +#define PLAT_PHYS_OFFSET ? ? ? ? ? ? ? UL(0x00000000)
>
> ?#endif /* __PLAT_MEMORY_H */
> diff --git a/arch/arm/plat-stmp3xxx/include/mach/memory.h b/arch/arm/plat-stmp3xxx/include/mach/memory.h
> index 7b875a0..61fa548 100644
> --- a/arch/arm/plat-stmp3xxx/include/mach/memory.h
> +++ b/arch/arm/plat-stmp3xxx/include/mach/memory.h
> @@ -17,6 +17,6 @@
> ?/*
> ?* Physical DRAM offset.
> ?*/
> -#define PHYS_OFFSET ? ?UL(0x40000000)
> +#define PLAT_PHYS_OFFSET ? ? ? UL(0x40000000)
>
> ?#endif
> diff --git a/arch/arm/plat-tcc/include/mach/memory.h b/arch/arm/plat-tcc/include/mach/memory.h
> index cd91ba8..28a6e0c 100644
> --- a/arch/arm/plat-tcc/include/mach/memory.h
> +++ b/arch/arm/plat-tcc/include/mach/memory.h
> @@ -13,6 +13,6 @@
> ?/*
> ?* Physical DRAM offset.
> ?*/
> -#define PHYS_OFFSET ? ? ? ? ? ?UL(0x20000000)
> +#define PLAT_PHYS_OFFSET ? ? ? ? ? ? ? UL(0x20000000)
>
> ?#endif
> --
> 1.6.2.5
>
>

Acked-by: Wan ZongShun <mcuos.com@gmail.com>

Thanks!
-- 
*linux-arm-kernel mailing list
mail addr:linux-arm-kernel at lists.infradead.org
you can subscribe by:
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

* linux-arm-NUC900 mailing list
mail addr:NUC900 at googlegroups.com
main web: https://groups.google.com/group/NUC900
you can subscribe it by sending me mail:
mcuos.com at gmail.com

^ permalink raw reply	[flat|nested] 72+ messages in thread

* [RFC 4/5] ARM: P2V: introduce phys_to_virt/virt_to_phys runtime patching
  2011-01-04 20:23 ` [RFC 4/5] ARM: P2V: introduce phys_to_virt/virt_to_phys runtime patching Russell King - ARM Linux
  2011-01-04 21:27   ` Nicolas Pitre
@ 2011-02-09 12:17   ` Jamie Iles
  2011-02-09 13:06     ` Russell King - ARM Linux
  1 sibling, 1 reply; 72+ messages in thread
From: Jamie Iles @ 2011-02-09 12:17 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Russell,

I haven't been using the runtime patching, but building picoxcell based 
off of todays next I'm seeing a pretty harmless warning.  Fixup below.

Jamie

On Tue, Jan 04, 2011 at 08:23:18PM +0000, Russell King - ARM Linux wrote:
> This idea came from Nicolas, Eric Miao produced an initial version,
> which was then rewritten into this.
> 
> Patch the physical to virtual translations at runtime.  As we modify
> the code, this makes it incompatible with XIP kernels, but on allows
> is to achieve this with minimal loss of performance.
> 
> As many translations are of the form:
> 
> 	physical = virtual + (PHYS_OFFSET - PAGE_OFFSET)
> 	virtual = physical - (PHYS_OFFSET - PAGE_OFFSET)
> 
> we generate an 'add' instruction for __virt_to_phys(), and a 'sub'
> instruction for __phys_to_virt().  We calculate at run time (PHYS_OFFSET
> - PAGE_OFFSET) by comparing the address prior to MMU initialization with
> where it should be once the MMU has been initialized, and place this
> constant into the above add/sub instructions.
> 
> Once we have (PHYS_OFFSET - PAGE_OFFSET), we can calcuate the real
> PHYS_OFFSET as PAGE_OFFSET is a build-time constant, and save this for
> the C-mode PHYS_OFFSET variable definition to use.
> 
> At present, we are unable to support Realview with Sparsemem enabled
> as this uses a complex mapping function, and MSM as this requires a
> constant which will not fit in our math instruction.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
>  arch/arm/Kconfig              |   14 +++++++++
>  arch/arm/include/asm/memory.h |   55 ++++++++++++++++++++++++++++--------
>  arch/arm/kernel/head.S        |   63 +++++++++++++++++++++++++++++++++++++++++
>  arch/arm/kernel/module.c      |   23 ++++++++++++++-
>  arch/arm/kernel/setup.c       |    2 +-
>  arch/arm/kernel/vmlinux.lds.S |    4 ++
>  6 files changed, 147 insertions(+), 14 deletions(-)
> 
[...]
> diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c
> index 0c1bb68..6a42e17 100644
> --- a/arch/arm/kernel/module.c
> +++ b/arch/arm/kernel/module.c
> @@ -276,12 +276,28 @@ struct mod_unwind_map {
>  	const Elf_Shdr *txt_sec;
>  };
>  
> +static const Elf_Shdr *find_mod_section(const Elf32_Ehdr *hdr,
> +	const Elf_Shdr *sechdrs, const char *name)
> +{
> +	const Elf_Shdr *s, *se;
> +	const char *secstrs = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;
> +
> +	for (s = sechdrs, se = sechdrs + hdr->e_shnum; s < se; s++)
> +		if (strcmp(name, secstrs + s->sh_name) == 0)
> +			return s;
> +
> +	return NULL;
> +}
> +
> +extern void fixup_pv_table(const void *, unsigned long);
> +
>  int module_finalize(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs,
>  		    struct module *mod)
>  {
> +	const Elf_Shdr *s = NULL;
>  #ifdef CONFIG_ARM_UNWIND
>  	const char *secstrs = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;
> -	const Elf_Shdr *s, *sechdrs_end = sechdrs + hdr->e_shnum;
> +	const Elf_Shdr *sechdrs_end = sechdrs + hdr->e_shnum;
>  	struct mod_unwind_map maps[ARM_SEC_MAX];
>  	int i;
>  
> @@ -323,6 +339,11 @@ int module_finalize(const Elf32_Ehdr *hdr, const Elf_Shdr *sechdrs,
>  					         maps[i].txt_sec->sh_addr,
>  					         maps[i].txt_sec->sh_size);
>  #endif
> +#ifdef CONFIG_ARM_PATCH_PHYS_VIRT
> +	s = find_mod_section(hdr, sechdrs, ".pv_table");
> +	if (s)
> +		fixup_pv_table((void *)s->sh_addr, s->sh_size);
> +#endif

If we don't have CONFIG_ARM_PATCH_PHYS_VIRT defined then we get:

arch/arm/kernel/module.c:272: warning: ?find_mod_section? defined but not used

8<------

diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c
index 74e25ab..ba65805 100644
--- a/arch/arm/kernel/module.c
+++ b/arch/arm/kernel/module.c
@@ -269,6 +269,7 @@ struct mod_unwind_map {
 	const Elf_Shdr *txt_sec;
 };
 
+#ifdef CONFIG_ARM_PATCH_PHYS_VIRT
 static const Elf_Shdr *find_mod_section(const Elf32_Ehdr *hdr,
 	const Elf_Shdr *sechdrs, const char *name)
 {
@@ -281,6 +282,7 @@ static const Elf_Shdr *find_mod_section(const Elf32_Ehdr *hdr,
 
 	return NULL;
 }
+#endif
 
 extern void fixup_pv_table(const void *, unsigned long);
 

^ permalink raw reply related	[flat|nested] 72+ messages in thread

* [RFC 4/5] ARM: P2V: introduce phys_to_virt/virt_to_phys runtime patching
  2011-02-09 12:17   ` Jamie Iles
@ 2011-02-09 13:06     ` Russell King - ARM Linux
  0 siblings, 0 replies; 72+ messages in thread
From: Russell King - ARM Linux @ 2011-02-09 13:06 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Feb 09, 2011 at 12:17:01PM +0000, Jamie Iles wrote:
> I haven't been using the runtime patching, but building picoxcell based 
> off of todays next I'm seeing a pretty harmless warning.  Fixup below.

One of the reasons I've not done this is that it turns out that we
need to do the smp-on-up fixups on modules when running with certain
configs.  That means we need this function in other circumstances too.

It's probably going to be better to mark it with __maybe_unused than
to surround stuff with complex ifdefs.

^ permalink raw reply	[flat|nested] 72+ messages in thread

* RE: [RFC 1/5] ARM: P2V: separate PHYS_OFFSET from platform definitions
  2011-01-04 20:22   ` Russell King - ARM Linux
@ 2011-02-17  5:33     ` Kukjin Kim
  -1 siblings, 0 replies; 72+ messages in thread
From: Kukjin Kim @ 2011-02-17  5:33 UTC (permalink / raw)
  To: 'Russell King - ARM Linux', 'Nicolas Pitre'
  Cc: 'Srinidhi Kasagar', 'Kevin Hilman',
	'Anton Vorontsov', 'Lennert Buytenhek',
	linux-samsung-soc, 'Erik Gilling',
	linux-sh, 'Vincent Sanders', 'Hans J. Koch',
	'Magnus Damm', 'Marc Singer',
	'Tony Lindgren', 'David Brown',
	'Alessandro Rubini', 'Jiandong Zheng',
	'Wan ZongShun', linux-arm-msm, 'Olof Johansson',
	'Ryan Mallon', 'Ben Dooks',
	linux-tegra, linux-omap, linux-arm-kernel, 'Daniel

Russell King - ARM Linux wrote:
> 
> This uncouple PHYS_OFFSET from the platform definitions, thereby
> facilitating run-time computation of the physical memory offset.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
>  arch/arm/include/asm/memory.h                  |    2 ++
>  arch/arm/kernel/tcm.c                          |    2 +-
>  arch/arm/mach-aaec2000/include/mach/memory.h   |    2 +-
>  arch/arm/mach-at91/include/mach/memory.h       |    2 +-
>  arch/arm/mach-bcmring/include/mach/hardware.h  |    2 +-
>  arch/arm/mach-bcmring/include/mach/memory.h    |    2 +-
>  arch/arm/mach-clps711x/include/mach/memory.h   |    2 +-
>  arch/arm/mach-cns3xxx/include/mach/memory.h    |    2 +-
>  arch/arm/mach-davinci/include/mach/memory.h    |    4 ++--
>  arch/arm/mach-dove/include/mach/memory.h       |    2 +-
>  arch/arm/mach-ebsa110/include/mach/memory.h    |    2 +-
>  arch/arm/mach-ep93xx/include/mach/memory.h     |   10 +++++-----
>  arch/arm/mach-footbridge/include/mach/memory.h |    2 +-
>  arch/arm/mach-h720x/include/mach/memory.h      |    2 +-
>  arch/arm/mach-integrator/include/mach/memory.h |    2 +-
>  arch/arm/mach-iop13xx/include/mach/memory.h    |    2 +-
>  arch/arm/mach-iop32x/include/mach/memory.h     |    2 +-
>  arch/arm/mach-iop33x/include/mach/memory.h     |    2 +-
>  arch/arm/mach-ixp2000/include/mach/memory.h    |    2 +-
>  arch/arm/mach-ixp23xx/include/mach/memory.h    |    2 +-
>  arch/arm/mach-ixp4xx/include/mach/memory.h     |    2 +-
>  arch/arm/mach-kirkwood/include/mach/memory.h   |    2 +-
>  arch/arm/mach-ks8695/include/mach/memory.h     |    2 +-
>  arch/arm/mach-lh7a40x/include/mach/memory.h    |    2 +-
>  arch/arm/mach-loki/include/mach/memory.h       |    2 +-
>  arch/arm/mach-lpc32xx/include/mach/memory.h    |    2 +-
>  arch/arm/mach-mmp/include/mach/memory.h        |    2 +-
>  arch/arm/mach-msm/board-msm7x30.c              |    2 +-
>  arch/arm/mach-msm/include/mach/memory.h        |   10 +++++-----
>  arch/arm/mach-mv78xx0/include/mach/memory.h    |    2 +-
>  arch/arm/mach-mx3/mach-kzm_arm11_01.c          |    2 +-
>  arch/arm/mach-netx/include/mach/memory.h       |    2 +-
>  arch/arm/mach-nomadik/include/mach/memory.h    |    2 +-
>  arch/arm/mach-ns9xxx/include/mach/memory.h     |    2 +-
>  arch/arm/mach-nuc93x/include/mach/memory.h     |    2 +-
>  arch/arm/mach-orion5x/include/mach/memory.h    |    2 +-
>  arch/arm/mach-pnx4008/include/mach/memory.h    |    2 +-
>  arch/arm/mach-pxa/include/mach/memory.h        |    2 +-
>  arch/arm/mach-realview/include/mach/memory.h   |    4 ++--
>  arch/arm/mach-rpc/include/mach/memory.h        |    2 +-
>  arch/arm/mach-s3c2400/include/mach/memory.h    |    2 +-
>  arch/arm/mach-s3c2410/include/mach/memory.h    |    2 +-
>  arch/arm/mach-s3c24a0/include/mach/memory.h    |    2 +-
>  arch/arm/mach-s3c64xx/include/mach/memory.h    |    2 +-
>  arch/arm/mach-s5p6442/include/mach/memory.h    |    2 +-
>  arch/arm/mach-s5p64x0/include/mach/memory.h    |    2 +-
>  arch/arm/mach-s5pc100/include/mach/memory.h    |    2 +-
>  arch/arm/mach-s5pv210/include/mach/memory.h    |    2 +-
>  arch/arm/mach-s5pv310/include/mach/memory.h    |    2 +-
>  arch/arm/mach-sa1100/include/mach/memory.h     |    2 +-
>  arch/arm/mach-shark/include/mach/memory.h      |    2 +-
>  arch/arm/mach-shmobile/include/mach/memory.h   |    2 +-
>  arch/arm/mach-tegra/include/mach/memory.h      |    2 +-
>  arch/arm/mach-u300/include/mach/memory.h       |    6 +++---
>  arch/arm/mach-u300/u300.c                      |    2 +-
>  arch/arm/mach-ux500/include/mach/memory.h      |    2 +-
>  arch/arm/mach-versatile/include/mach/memory.h  |    2 +-
>  arch/arm/mach-vexpress/include/mach/memory.h   |    2 +-
>  arch/arm/mach-w90x900/include/mach/memory.h    |    2 +-
>  arch/arm/plat-omap/include/plat/memory.h       |    4 ++--
>  arch/arm/plat-spear/include/plat/memory.h      |    2 +-
>  arch/arm/plat-stmp3xxx/include/mach/memory.h   |    2 +-
>  arch/arm/plat-tcc/include/mach/memory.h        |    2 +-
>  63 files changed, 77 insertions(+), 75 deletions(-)
> 
> diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
> index 23c2e8e..00b04ae 100644
> --- a/arch/arm/include/asm/memory.h
> +++ b/arch/arm/include/asm/memory.h
> @@ -24,6 +24,8 @@
>   */
>  #define UL(x) _AC(x, UL)
> 
> +#define PHYS_OFFSET	PLAT_PHYS_OFFSET
> +
>  #ifdef CONFIG_MMU
> 
>  /*
> diff --git a/arch/arm/kernel/tcm.c b/arch/arm/kernel/tcm.c
> index 26685c2..f5cf660 100644
> --- a/arch/arm/kernel/tcm.c
> +++ b/arch/arm/kernel/tcm.c
> @@ -15,7 +15,7 @@
>  #include <linux/string.h> /* memcpy */
>  #include <asm/cputype.h>
>  #include <asm/mach/map.h>
> -#include <mach/memory.h>
> +#include <asm/memory.h>
>  #include "tcm.h"
> 
>  static struct gen_pool *tcm_pool;

(snip)

> diff --git a/arch/arm/mach-s3c2400/include/mach/memory.h b/arch/arm/mach-
> s3c2400/include/mach/memory.h
> index cf5901f..3f33670 100644
> --- a/arch/arm/mach-s3c2400/include/mach/memory.h
> +++ b/arch/arm/mach-s3c2400/include/mach/memory.h
> @@ -15,6 +15,6 @@
>  #ifndef __ASM_ARCH_MEMORY_H
>  #define __ASM_ARCH_MEMORY_H
> 
> -#define PHYS_OFFSET	UL(0x0C000000)
> +#define PLAT_PHYS_OFFSET	UL(0x0C000000)
> 
>  #endif
> diff --git a/arch/arm/mach-s3c2410/include/mach/memory.h b/arch/arm/mach-
> s3c2410/include/mach/memory.h
> index 6f1e587..f92b97b 100644
> --- a/arch/arm/mach-s3c2410/include/mach/memory.h
> +++ b/arch/arm/mach-s3c2410/include/mach/memory.h
> @@ -11,6 +11,6 @@
>  #ifndef __ASM_ARCH_MEMORY_H
>  #define __ASM_ARCH_MEMORY_H
> 
> -#define PHYS_OFFSET	UL(0x30000000)
> +#define PLAT_PHYS_OFFSET	UL(0x30000000)
> 
>  #endif
> diff --git a/arch/arm/mach-s3c24a0/include/mach/memory.h b/arch/arm/mach-
> s3c24a0/include/mach/memory.h
> index 7d74fd5..7d208a7 100644
> --- a/arch/arm/mach-s3c24a0/include/mach/memory.h
> +++ b/arch/arm/mach-s3c24a0/include/mach/memory.h
> @@ -11,7 +11,7 @@
>  #ifndef __ASM_ARCH_24A0_MEMORY_H
>  #define __ASM_ARCH_24A0_MEMORY_H __FILE__
> 
> -#define PHYS_OFFSET UL(0x10000000)
> +#define PLAT_PHYS_OFFSET UL(0x10000000)
> 
>  #define __virt_to_bus(x) __virt_to_phys(x)
>  #define __bus_to_virt(x) __phys_to_virt(x)
> diff --git a/arch/arm/mach-s3c64xx/include/mach/memory.h b/arch/arm/mach-
> s3c64xx/include/mach/memory.h
> index 42cc54e..4760cda 100644
> --- a/arch/arm/mach-s3c64xx/include/mach/memory.h
> +++ b/arch/arm/mach-s3c64xx/include/mach/memory.h
> @@ -13,7 +13,7 @@
>  #ifndef __ASM_ARCH_MEMORY_H
>  #define __ASM_ARCH_MEMORY_H
> 
> -#define PHYS_OFFSET     UL(0x50000000)
> +#define PLAT_PHYS_OFFSET     UL(0x50000000)
> 
>  #define CONSISTENT_DMA_SIZE	SZ_8M
> 
> diff --git a/arch/arm/mach-s5p6442/include/mach/memory.h b/arch/arm/mach-
> s5p6442/include/mach/memory.h
> index 9ddd877..cfe259d 100644
> --- a/arch/arm/mach-s5p6442/include/mach/memory.h
> +++ b/arch/arm/mach-s5p6442/include/mach/memory.h
> @@ -13,7 +13,7 @@
>  #ifndef __ASM_ARCH_MEMORY_H
>  #define __ASM_ARCH_MEMORY_H
> 
> -#define PHYS_OFFSET		UL(0x20000000)
> +#define PLAT_PHYS_OFFSET		UL(0x20000000)
>  #define CONSISTENT_DMA_SIZE	SZ_8M
> 
>  #endif /* __ASM_ARCH_MEMORY_H */
> diff --git a/arch/arm/mach-s5p64x0/include/mach/memory.h b/arch/arm/mach-
> s5p64x0/include/mach/memory.h
> index 1b036b0..365a6eb 100644
> --- a/arch/arm/mach-s5p64x0/include/mach/memory.h
> +++ b/arch/arm/mach-s5p64x0/include/mach/memory.h
> @@ -13,7 +13,7 @@
>  #ifndef __ASM_ARCH_MEMORY_H
>  #define __ASM_ARCH_MEMORY_H __FILE__
> 
> -#define PHYS_OFFSET		UL(0x20000000)
> +#define PLAT_PHYS_OFFSET		UL(0x20000000)
>  #define CONSISTENT_DMA_SIZE	SZ_8M
> 
>  #endif /* __ASM_ARCH_MEMORY_H */
> diff --git a/arch/arm/mach-s5pc100/include/mach/memory.h b/arch/arm/mach-
> s5pc100/include/mach/memory.h
> index 4b60d18..bda4e79 100644
> --- a/arch/arm/mach-s5pc100/include/mach/memory.h
> +++ b/arch/arm/mach-s5pc100/include/mach/memory.h
> @@ -13,6 +13,6 @@
>  #ifndef __ASM_ARCH_MEMORY_H
>  #define __ASM_ARCH_MEMORY_H
> 
> -#define PHYS_OFFSET     	UL(0x20000000)
> +#define PLAT_PHYS_OFFSET     	UL(0x20000000)
> 
>  #endif
> diff --git a/arch/arm/mach-s5pv210/include/mach/memory.h b/arch/arm/mach-
> s5pv210/include/mach/memory.h
> index d503e0c..7b5fcf0 100644
> --- a/arch/arm/mach-s5pv210/include/mach/memory.h
> +++ b/arch/arm/mach-s5pv210/include/mach/memory.h
> @@ -13,7 +13,7 @@
>  #ifndef __ASM_ARCH_MEMORY_H
>  #define __ASM_ARCH_MEMORY_H
> 
> -#define PHYS_OFFSET		UL(0x20000000)
> +#define PLAT_PHYS_OFFSET		UL(0x20000000)
>  #define CONSISTENT_DMA_SIZE	(SZ_8M + SZ_4M + SZ_2M)
> 
>  /*
> diff --git a/arch/arm/mach-s5pv310/include/mach/memory.h b/arch/arm/mach-
> s5pv310/include/mach/memory.h
> index 1dffb48..470b01b 100644
> --- a/arch/arm/mach-s5pv310/include/mach/memory.h
> +++ b/arch/arm/mach-s5pv310/include/mach/memory.h
> @@ -13,7 +13,7 @@
>  #ifndef __ASM_ARCH_MEMORY_H
>  #define __ASM_ARCH_MEMORY_H __FILE__
> 
> -#define PHYS_OFFSET		UL(0x40000000)
> +#define PLAT_PHYS_OFFSET		UL(0x40000000)
> 
>  /* Maximum of 256MiB in one bank */
>  #define MAX_PHYSMEM_BITS	32

(snip)

> --
> 1.6.2.5

Acked-by: Kukjin Kim <kgene.kim@samsung.com>

Hmm...and as a note, submitted changing 'mach-exynos4' from 'mach-s5pv310'.
I know you can handle it later :)

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

^ permalink raw reply	[flat|nested] 72+ messages in thread

* [RFC 1/5] ARM: P2V: separate PHYS_OFFSET from platform definitions
@ 2011-02-17  5:33     ` Kukjin Kim
  0 siblings, 0 replies; 72+ messages in thread
From: Kukjin Kim @ 2011-02-17  5:33 UTC (permalink / raw)
  To: linux-arm-kernel

Russell King - ARM Linux wrote:
> 
> This uncouple PHYS_OFFSET from the platform definitions, thereby
> facilitating run-time computation of the physical memory offset.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
>  arch/arm/include/asm/memory.h                  |    2 ++
>  arch/arm/kernel/tcm.c                          |    2 +-
>  arch/arm/mach-aaec2000/include/mach/memory.h   |    2 +-
>  arch/arm/mach-at91/include/mach/memory.h       |    2 +-
>  arch/arm/mach-bcmring/include/mach/hardware.h  |    2 +-
>  arch/arm/mach-bcmring/include/mach/memory.h    |    2 +-
>  arch/arm/mach-clps711x/include/mach/memory.h   |    2 +-
>  arch/arm/mach-cns3xxx/include/mach/memory.h    |    2 +-
>  arch/arm/mach-davinci/include/mach/memory.h    |    4 ++--
>  arch/arm/mach-dove/include/mach/memory.h       |    2 +-
>  arch/arm/mach-ebsa110/include/mach/memory.h    |    2 +-
>  arch/arm/mach-ep93xx/include/mach/memory.h     |   10 +++++-----
>  arch/arm/mach-footbridge/include/mach/memory.h |    2 +-
>  arch/arm/mach-h720x/include/mach/memory.h      |    2 +-
>  arch/arm/mach-integrator/include/mach/memory.h |    2 +-
>  arch/arm/mach-iop13xx/include/mach/memory.h    |    2 +-
>  arch/arm/mach-iop32x/include/mach/memory.h     |    2 +-
>  arch/arm/mach-iop33x/include/mach/memory.h     |    2 +-
>  arch/arm/mach-ixp2000/include/mach/memory.h    |    2 +-
>  arch/arm/mach-ixp23xx/include/mach/memory.h    |    2 +-
>  arch/arm/mach-ixp4xx/include/mach/memory.h     |    2 +-
>  arch/arm/mach-kirkwood/include/mach/memory.h   |    2 +-
>  arch/arm/mach-ks8695/include/mach/memory.h     |    2 +-
>  arch/arm/mach-lh7a40x/include/mach/memory.h    |    2 +-
>  arch/arm/mach-loki/include/mach/memory.h       |    2 +-
>  arch/arm/mach-lpc32xx/include/mach/memory.h    |    2 +-
>  arch/arm/mach-mmp/include/mach/memory.h        |    2 +-
>  arch/arm/mach-msm/board-msm7x30.c              |    2 +-
>  arch/arm/mach-msm/include/mach/memory.h        |   10 +++++-----
>  arch/arm/mach-mv78xx0/include/mach/memory.h    |    2 +-
>  arch/arm/mach-mx3/mach-kzm_arm11_01.c          |    2 +-
>  arch/arm/mach-netx/include/mach/memory.h       |    2 +-
>  arch/arm/mach-nomadik/include/mach/memory.h    |    2 +-
>  arch/arm/mach-ns9xxx/include/mach/memory.h     |    2 +-
>  arch/arm/mach-nuc93x/include/mach/memory.h     |    2 +-
>  arch/arm/mach-orion5x/include/mach/memory.h    |    2 +-
>  arch/arm/mach-pnx4008/include/mach/memory.h    |    2 +-
>  arch/arm/mach-pxa/include/mach/memory.h        |    2 +-
>  arch/arm/mach-realview/include/mach/memory.h   |    4 ++--
>  arch/arm/mach-rpc/include/mach/memory.h        |    2 +-
>  arch/arm/mach-s3c2400/include/mach/memory.h    |    2 +-
>  arch/arm/mach-s3c2410/include/mach/memory.h    |    2 +-
>  arch/arm/mach-s3c24a0/include/mach/memory.h    |    2 +-
>  arch/arm/mach-s3c64xx/include/mach/memory.h    |    2 +-
>  arch/arm/mach-s5p6442/include/mach/memory.h    |    2 +-
>  arch/arm/mach-s5p64x0/include/mach/memory.h    |    2 +-
>  arch/arm/mach-s5pc100/include/mach/memory.h    |    2 +-
>  arch/arm/mach-s5pv210/include/mach/memory.h    |    2 +-
>  arch/arm/mach-s5pv310/include/mach/memory.h    |    2 +-
>  arch/arm/mach-sa1100/include/mach/memory.h     |    2 +-
>  arch/arm/mach-shark/include/mach/memory.h      |    2 +-
>  arch/arm/mach-shmobile/include/mach/memory.h   |    2 +-
>  arch/arm/mach-tegra/include/mach/memory.h      |    2 +-
>  arch/arm/mach-u300/include/mach/memory.h       |    6 +++---
>  arch/arm/mach-u300/u300.c                      |    2 +-
>  arch/arm/mach-ux500/include/mach/memory.h      |    2 +-
>  arch/arm/mach-versatile/include/mach/memory.h  |    2 +-
>  arch/arm/mach-vexpress/include/mach/memory.h   |    2 +-
>  arch/arm/mach-w90x900/include/mach/memory.h    |    2 +-
>  arch/arm/plat-omap/include/plat/memory.h       |    4 ++--
>  arch/arm/plat-spear/include/plat/memory.h      |    2 +-
>  arch/arm/plat-stmp3xxx/include/mach/memory.h   |    2 +-
>  arch/arm/plat-tcc/include/mach/memory.h        |    2 +-
>  63 files changed, 77 insertions(+), 75 deletions(-)
> 
> diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
> index 23c2e8e..00b04ae 100644
> --- a/arch/arm/include/asm/memory.h
> +++ b/arch/arm/include/asm/memory.h
> @@ -24,6 +24,8 @@
>   */
>  #define UL(x) _AC(x, UL)
> 
> +#define PHYS_OFFSET	PLAT_PHYS_OFFSET
> +
>  #ifdef CONFIG_MMU
> 
>  /*
> diff --git a/arch/arm/kernel/tcm.c b/arch/arm/kernel/tcm.c
> index 26685c2..f5cf660 100644
> --- a/arch/arm/kernel/tcm.c
> +++ b/arch/arm/kernel/tcm.c
> @@ -15,7 +15,7 @@
>  #include <linux/string.h> /* memcpy */
>  #include <asm/cputype.h>
>  #include <asm/mach/map.h>
> -#include <mach/memory.h>
> +#include <asm/memory.h>
>  #include "tcm.h"
> 
>  static struct gen_pool *tcm_pool;

(snip)

> diff --git a/arch/arm/mach-s3c2400/include/mach/memory.h b/arch/arm/mach-
> s3c2400/include/mach/memory.h
> index cf5901f..3f33670 100644
> --- a/arch/arm/mach-s3c2400/include/mach/memory.h
> +++ b/arch/arm/mach-s3c2400/include/mach/memory.h
> @@ -15,6 +15,6 @@
>  #ifndef __ASM_ARCH_MEMORY_H
>  #define __ASM_ARCH_MEMORY_H
> 
> -#define PHYS_OFFSET	UL(0x0C000000)
> +#define PLAT_PHYS_OFFSET	UL(0x0C000000)
> 
>  #endif
> diff --git a/arch/arm/mach-s3c2410/include/mach/memory.h b/arch/arm/mach-
> s3c2410/include/mach/memory.h
> index 6f1e587..f92b97b 100644
> --- a/arch/arm/mach-s3c2410/include/mach/memory.h
> +++ b/arch/arm/mach-s3c2410/include/mach/memory.h
> @@ -11,6 +11,6 @@
>  #ifndef __ASM_ARCH_MEMORY_H
>  #define __ASM_ARCH_MEMORY_H
> 
> -#define PHYS_OFFSET	UL(0x30000000)
> +#define PLAT_PHYS_OFFSET	UL(0x30000000)
> 
>  #endif
> diff --git a/arch/arm/mach-s3c24a0/include/mach/memory.h b/arch/arm/mach-
> s3c24a0/include/mach/memory.h
> index 7d74fd5..7d208a7 100644
> --- a/arch/arm/mach-s3c24a0/include/mach/memory.h
> +++ b/arch/arm/mach-s3c24a0/include/mach/memory.h
> @@ -11,7 +11,7 @@
>  #ifndef __ASM_ARCH_24A0_MEMORY_H
>  #define __ASM_ARCH_24A0_MEMORY_H __FILE__
> 
> -#define PHYS_OFFSET UL(0x10000000)
> +#define PLAT_PHYS_OFFSET UL(0x10000000)
> 
>  #define __virt_to_bus(x) __virt_to_phys(x)
>  #define __bus_to_virt(x) __phys_to_virt(x)
> diff --git a/arch/arm/mach-s3c64xx/include/mach/memory.h b/arch/arm/mach-
> s3c64xx/include/mach/memory.h
> index 42cc54e..4760cda 100644
> --- a/arch/arm/mach-s3c64xx/include/mach/memory.h
> +++ b/arch/arm/mach-s3c64xx/include/mach/memory.h
> @@ -13,7 +13,7 @@
>  #ifndef __ASM_ARCH_MEMORY_H
>  #define __ASM_ARCH_MEMORY_H
> 
> -#define PHYS_OFFSET     UL(0x50000000)
> +#define PLAT_PHYS_OFFSET     UL(0x50000000)
> 
>  #define CONSISTENT_DMA_SIZE	SZ_8M
> 
> diff --git a/arch/arm/mach-s5p6442/include/mach/memory.h b/arch/arm/mach-
> s5p6442/include/mach/memory.h
> index 9ddd877..cfe259d 100644
> --- a/arch/arm/mach-s5p6442/include/mach/memory.h
> +++ b/arch/arm/mach-s5p6442/include/mach/memory.h
> @@ -13,7 +13,7 @@
>  #ifndef __ASM_ARCH_MEMORY_H
>  #define __ASM_ARCH_MEMORY_H
> 
> -#define PHYS_OFFSET		UL(0x20000000)
> +#define PLAT_PHYS_OFFSET		UL(0x20000000)
>  #define CONSISTENT_DMA_SIZE	SZ_8M
> 
>  #endif /* __ASM_ARCH_MEMORY_H */
> diff --git a/arch/arm/mach-s5p64x0/include/mach/memory.h b/arch/arm/mach-
> s5p64x0/include/mach/memory.h
> index 1b036b0..365a6eb 100644
> --- a/arch/arm/mach-s5p64x0/include/mach/memory.h
> +++ b/arch/arm/mach-s5p64x0/include/mach/memory.h
> @@ -13,7 +13,7 @@
>  #ifndef __ASM_ARCH_MEMORY_H
>  #define __ASM_ARCH_MEMORY_H __FILE__
> 
> -#define PHYS_OFFSET		UL(0x20000000)
> +#define PLAT_PHYS_OFFSET		UL(0x20000000)
>  #define CONSISTENT_DMA_SIZE	SZ_8M
> 
>  #endif /* __ASM_ARCH_MEMORY_H */
> diff --git a/arch/arm/mach-s5pc100/include/mach/memory.h b/arch/arm/mach-
> s5pc100/include/mach/memory.h
> index 4b60d18..bda4e79 100644
> --- a/arch/arm/mach-s5pc100/include/mach/memory.h
> +++ b/arch/arm/mach-s5pc100/include/mach/memory.h
> @@ -13,6 +13,6 @@
>  #ifndef __ASM_ARCH_MEMORY_H
>  #define __ASM_ARCH_MEMORY_H
> 
> -#define PHYS_OFFSET     	UL(0x20000000)
> +#define PLAT_PHYS_OFFSET     	UL(0x20000000)
> 
>  #endif
> diff --git a/arch/arm/mach-s5pv210/include/mach/memory.h b/arch/arm/mach-
> s5pv210/include/mach/memory.h
> index d503e0c..7b5fcf0 100644
> --- a/arch/arm/mach-s5pv210/include/mach/memory.h
> +++ b/arch/arm/mach-s5pv210/include/mach/memory.h
> @@ -13,7 +13,7 @@
>  #ifndef __ASM_ARCH_MEMORY_H
>  #define __ASM_ARCH_MEMORY_H
> 
> -#define PHYS_OFFSET		UL(0x20000000)
> +#define PLAT_PHYS_OFFSET		UL(0x20000000)
>  #define CONSISTENT_DMA_SIZE	(SZ_8M + SZ_4M + SZ_2M)
> 
>  /*
> diff --git a/arch/arm/mach-s5pv310/include/mach/memory.h b/arch/arm/mach-
> s5pv310/include/mach/memory.h
> index 1dffb48..470b01b 100644
> --- a/arch/arm/mach-s5pv310/include/mach/memory.h
> +++ b/arch/arm/mach-s5pv310/include/mach/memory.h
> @@ -13,7 +13,7 @@
>  #ifndef __ASM_ARCH_MEMORY_H
>  #define __ASM_ARCH_MEMORY_H __FILE__
> 
> -#define PHYS_OFFSET		UL(0x40000000)
> +#define PLAT_PHYS_OFFSET		UL(0x40000000)
> 
>  /* Maximum of 256MiB in one bank */
>  #define MAX_PHYSMEM_BITS	32

(snip)

> --
> 1.6.2.5

Acked-by: Kukjin Kim <kgene.kim@samsung.com>

Hmm...and as a note, submitted changing 'mach-exynos4' from 'mach-s5pv310'.
I know you can handle it later :)

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

^ permalink raw reply	[flat|nested] 72+ messages in thread

* RE: [RFC 2/5] ARM: P2V: avoid initializers and assembly using PHYS_OFFSET
  2011-01-04 20:22   ` Russell King - ARM Linux
@ 2011-02-17  5:36     ` Kukjin Kim
  -1 siblings, 0 replies; 72+ messages in thread
From: Kukjin Kim @ 2011-02-17  5:36 UTC (permalink / raw)
  To: 'Russell King - ARM Linux', 'Nicolas Pitre'
  Cc: 'David Brown', 'Daniel Walker',
	'Bryan Huntsman', 'Amit Kucheria',
	'Sascha Hauer', 'Eric Miao',
	'Hans J. Koch',
	linux-arm-kernel, linux-arm-msm, linux-samsung-soc

Russell King - ARM Linux wrote:
> 
> As PHYS_OFFSET will be becoming a variable, we can't have it used in
> initializers nor assembly code.  Replace those in generic code with
> a run-time initialization.  Replace those in platform code using the
> individual platform specific PLAT_PHYS_OFFSET.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
>  arch/arm/kernel/setup.c                  |    4 +++-
>  arch/arm/mach-msm/board-msm7x27.c        |    8 ++++----
>  arch/arm/mach-msm/board-msm7x30.c        |    6 +++---
>  arch/arm/mach-msm/board-qsd8x50.c        |    4 ++--
>  arch/arm/mach-msm/board-sapphire.c       |    2 +-
>  arch/arm/mach-mx5/board-cpuimx51.c       |    2 +-
>  arch/arm/mach-mx5/board-cpuimx51sd.c     |    2 +-
>  arch/arm/mach-mx5/board-mx51_3ds.c       |    2 +-
>  arch/arm/mach-pxa/balloon3.c             |    2 +-
>  arch/arm/mach-realview/realview_eb.c     |    2 +-
>  arch/arm/mach-realview/realview_pb1176.c |    2 +-
>  arch/arm/mach-realview/realview_pb11mp.c |    2 +-
>  arch/arm/mach-realview/realview_pba8.c   |    2 +-
>  arch/arm/mach-realview/realview_pbx.c    |    2 +-
>  arch/arm/mach-s5pv210/sleep.S            |    2 +-
>  arch/arm/mach-tcc8k/board-tcc8000-sdk.c  |    2 +-
>  arch/arm/mach-vexpress/ct-ca9x4.c        |    2 +-
>  17 files changed, 25 insertions(+), 23 deletions(-)
> 
> diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
> index 3455ad3..f67e682 100644
> --- a/arch/arm/kernel/setup.c
> +++ b/arch/arm/kernel/setup.c
> @@ -705,7 +705,7 @@ static struct init_tags {
>  	{ tag_size(tag_core), ATAG_CORE },
>  	{ 1, PAGE_SIZE, 0xff },
>  	{ tag_size(tag_mem32), ATAG_MEM },
> -	{ MEM_SIZE, PHYS_OFFSET },
> +	{ MEM_SIZE },
>  	{ 0, ATAG_NONE }
>  };
> 
> @@ -804,6 +804,8 @@ void __init setup_arch(char **cmdline_p)
>  	struct machine_desc *mdesc;
>  	char *from = default_command_line;
> 
> +	tags->mem.start = PHYS_OFFSET;
> +
>  	unwind_init();
> 
>  	setup_processor();

(snip)

> diff --git a/arch/arm/mach-s5pv210/sleep.S b/arch/arm/mach-s5pv210/sleep.S
> index d4d222b..2737622 100644
> --- a/arch/arm/mach-s5pv210/sleep.S
> +++ b/arch/arm/mach-s5pv210/sleep.S
> @@ -65,7 +65,7 @@ resume_with_mmu:
>  	/*
>  	 * After MMU is turned on, restore the previous MMU table.
>  	 */
> -	ldr	r9 , =(PAGE_OFFSET - PHYS_OFFSET)
> +	ldr	r9 , =(PAGE_OFFSET - PLAT_PHYS_OFFSET)
>  	add	r4, r4, r9
>  	str	r12, [r4]
> 

(snip)

> --
> 1.6.2.5

Acked-by: Kukjin Kim <kgene.kim@samsung.com>

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

^ permalink raw reply	[flat|nested] 72+ messages in thread

* [RFC 2/5] ARM: P2V: avoid initializers and assembly using PHYS_OFFSET
@ 2011-02-17  5:36     ` Kukjin Kim
  0 siblings, 0 replies; 72+ messages in thread
From: Kukjin Kim @ 2011-02-17  5:36 UTC (permalink / raw)
  To: linux-arm-kernel

Russell King - ARM Linux wrote:
> 
> As PHYS_OFFSET will be becoming a variable, we can't have it used in
> initializers nor assembly code.  Replace those in generic code with
> a run-time initialization.  Replace those in platform code using the
> individual platform specific PLAT_PHYS_OFFSET.
> 
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
>  arch/arm/kernel/setup.c                  |    4 +++-
>  arch/arm/mach-msm/board-msm7x27.c        |    8 ++++----
>  arch/arm/mach-msm/board-msm7x30.c        |    6 +++---
>  arch/arm/mach-msm/board-qsd8x50.c        |    4 ++--
>  arch/arm/mach-msm/board-sapphire.c       |    2 +-
>  arch/arm/mach-mx5/board-cpuimx51.c       |    2 +-
>  arch/arm/mach-mx5/board-cpuimx51sd.c     |    2 +-
>  arch/arm/mach-mx5/board-mx51_3ds.c       |    2 +-
>  arch/arm/mach-pxa/balloon3.c             |    2 +-
>  arch/arm/mach-realview/realview_eb.c     |    2 +-
>  arch/arm/mach-realview/realview_pb1176.c |    2 +-
>  arch/arm/mach-realview/realview_pb11mp.c |    2 +-
>  arch/arm/mach-realview/realview_pba8.c   |    2 +-
>  arch/arm/mach-realview/realview_pbx.c    |    2 +-
>  arch/arm/mach-s5pv210/sleep.S            |    2 +-
>  arch/arm/mach-tcc8k/board-tcc8000-sdk.c  |    2 +-
>  arch/arm/mach-vexpress/ct-ca9x4.c        |    2 +-
>  17 files changed, 25 insertions(+), 23 deletions(-)
> 
> diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
> index 3455ad3..f67e682 100644
> --- a/arch/arm/kernel/setup.c
> +++ b/arch/arm/kernel/setup.c
> @@ -705,7 +705,7 @@ static struct init_tags {
>  	{ tag_size(tag_core), ATAG_CORE },
>  	{ 1, PAGE_SIZE, 0xff },
>  	{ tag_size(tag_mem32), ATAG_MEM },
> -	{ MEM_SIZE, PHYS_OFFSET },
> +	{ MEM_SIZE },
>  	{ 0, ATAG_NONE }
>  };
> 
> @@ -804,6 +804,8 @@ void __init setup_arch(char **cmdline_p)
>  	struct machine_desc *mdesc;
>  	char *from = default_command_line;
> 
> +	tags->mem.start = PHYS_OFFSET;
> +
>  	unwind_init();
> 
>  	setup_processor();

(snip)

> diff --git a/arch/arm/mach-s5pv210/sleep.S b/arch/arm/mach-s5pv210/sleep.S
> index d4d222b..2737622 100644
> --- a/arch/arm/mach-s5pv210/sleep.S
> +++ b/arch/arm/mach-s5pv210/sleep.S
> @@ -65,7 +65,7 @@ resume_with_mmu:
>  	/*
>  	 * After MMU is turned on, restore the previous MMU table.
>  	 */
> -	ldr	r9 , =(PAGE_OFFSET - PHYS_OFFSET)
> +	ldr	r9 , =(PAGE_OFFSET - PLAT_PHYS_OFFSET)
>  	add	r4, r4, r9
>  	str	r12, [r4]
> 

(snip)

> --
> 1.6.2.5

Acked-by: Kukjin Kim <kgene.kim@samsung.com>

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [RFC 2/5] ARM: P2V: avoid initializers and assembly using PHYS_OFFSET
  2011-01-04 20:22   ` Russell King - ARM Linux
@ 2011-02-17 14:11     ` Russell King - ARM Linux
  -1 siblings, 0 replies; 72+ messages in thread
From: Russell King - ARM Linux @ 2011-02-17 14:11 UTC (permalink / raw)
  To: Nicolas Pitre
  Cc: Daniel Walker, Eric Miao, linux-arm-msm, Hans J. Koch,
	linux-samsung-soc, Bryan Huntsman, Amit Kucheria, Sascha Hauer,
	Kukjin Kim, David Brown, linux-arm-kernel

On Tue, Jan 04, 2011 at 08:22:37PM +0000, Russell King - ARM Linux wrote:
> As PHYS_OFFSET will be becoming a variable, we can't have it used in
> initializers nor assembly code.  Replace those in generic code with
> a run-time initialization.  Replace those in platform code using the
> individual platform specific PLAT_PHYS_OFFSET.

I'm still missing acks for MSM, PXA and TCC8k stuff for this change.

^ permalink raw reply	[flat|nested] 72+ messages in thread

* [RFC 2/5] ARM: P2V: avoid initializers and assembly using PHYS_OFFSET
@ 2011-02-17 14:11     ` Russell King - ARM Linux
  0 siblings, 0 replies; 72+ messages in thread
From: Russell King - ARM Linux @ 2011-02-17 14:11 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 04, 2011 at 08:22:37PM +0000, Russell King - ARM Linux wrote:
> As PHYS_OFFSET will be becoming a variable, we can't have it used in
> initializers nor assembly code.  Replace those in generic code with
> a run-time initialization.  Replace those in platform code using the
> individual platform specific PLAT_PHYS_OFFSET.

I'm still missing acks for MSM, PXA and TCC8k stuff for this change.

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [RFC 0/5] runtime P2V translations
  2011-01-04 20:20 ` Russell King - ARM Linux
@ 2011-02-17 14:15   ` Russell King - ARM Linux
  -1 siblings, 0 replies; 72+ messages in thread
From: Russell King - ARM Linux @ 2011-02-17 14:15 UTC (permalink / raw)
  To: Nicolas Pitre
  Cc: linux-sh, Kevin Hilman, Anton Vorontsov, Lennert Buytenhek,
	Kukjin Kim, Erik Gilling, Vincent Sanders, Hans J. Koch,
	Magnus Damm, Marc Singer, Tony Lindgren, David Brown,
	Alessandro Rubini, Amit Kucheria, Jiandong Zheng, Wan ZongShun,
	linux-arm-msm, Olof Johansson, Ryan Mallon, linux-samsung-soc,
	Ben Dooks, linux-tegra, linux-omap, linux-arm-kernel,
	Daniel Walker

On Tue, Jan 04, 2011 at 08:20:52PM +0000, Russell King - ARM Linux wrote:
> Here's my solution to this, which should allow it to be used on almost
> all platforms, including MSM, with the exception of Realview when
> SPARSEMEM is enabled.

It is my intention to freeze the p2v branch against further changes to
existing commits this evening.  That means any further acks/tested-bys
or whatever else will be ignored.  Please ensure that you get any acks
etc or further comments to me by this evening, thanks.

^ permalink raw reply	[flat|nested] 72+ messages in thread

* [RFC 0/5] runtime P2V translations
@ 2011-02-17 14:15   ` Russell King - ARM Linux
  0 siblings, 0 replies; 72+ messages in thread
From: Russell King - ARM Linux @ 2011-02-17 14:15 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Jan 04, 2011 at 08:20:52PM +0000, Russell King - ARM Linux wrote:
> Here's my solution to this, which should allow it to be used on almost
> all platforms, including MSM, with the exception of Realview when
> SPARSEMEM is enabled.

It is my intention to freeze the p2v branch against further changes to
existing commits this evening.  That means any further acks/tested-bys
or whatever else will be ignored.  Please ensure that you get any acks
etc or further comments to me by this evening, thanks.

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [RFC 1/5] ARM: P2V: separate PHYS_OFFSET from platform definitions
  2011-01-04 20:22   ` Russell King - ARM Linux
@ 2011-02-17 15:16     ` Eric Miao
  -1 siblings, 0 replies; 72+ messages in thread
From: Eric Miao @ 2011-02-17 15:16 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Srinidhi Kasagar, Kevin Hilman, Anton Vorontsov,
	Lennert Buytenhek, Kukjin Kim, Erik Gilling, linux-sh,
	Vincent Sanders, Hans J. Koch, Magnus Damm, Marc Singer,
	Tony Lindgren, David Brown, Alessandro Rubini, Jiandong Zheng,
	Wan ZongShun, linux-arm-msm, Olof Johansson, Ryan Mallon,
	linux-samsung-soc, Ben Dooks, linux-tegra, linux-omap,
	linux-arm-kernel, Daniel

On Wed, Jan 5, 2011 at 4:22 AM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> This uncouple PHYS_OFFSET from the platform definitions, thereby
> facilitating run-time computation of the physical memory offset.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Acked-by: Eric Miao <eric.y.miao@gmail.com>

^ permalink raw reply	[flat|nested] 72+ messages in thread

* [RFC 1/5] ARM: P2V: separate PHYS_OFFSET from platform definitions
@ 2011-02-17 15:16     ` Eric Miao
  0 siblings, 0 replies; 72+ messages in thread
From: Eric Miao @ 2011-02-17 15:16 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jan 5, 2011 at 4:22 AM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> This uncouple PHYS_OFFSET from the platform definitions, thereby
> facilitating run-time computation of the physical memory offset.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Acked-by: Eric Miao <eric.y.miao@gmail.com>

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [RFC 2/5] ARM: P2V: avoid initializers and assembly using PHYS_OFFSET
  2011-01-04 20:22   ` Russell King - ARM Linux
@ 2011-02-17 15:16     ` Eric Miao
  -1 siblings, 0 replies; 72+ messages in thread
From: Eric Miao @ 2011-02-17 15:16 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Nicolas Pitre, David Brown, Daniel Walker, Bryan Huntsman,
	Amit Kucheria, Sascha Hauer, Kukjin Kim, Hans J. Koch,
	linux-arm-kernel, linux-arm-msm, linux-samsung-soc

On Wed, Jan 5, 2011 at 4:22 AM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> As PHYS_OFFSET will be becoming a variable, we can't have it used in
> initializers nor assembly code.  Replace those in generic code with
> a run-time initialization.  Replace those in platform code using the
> individual platform specific PLAT_PHYS_OFFSET.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Acked-by: Eric Miao <eric.y.miao@gmail.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 72+ messages in thread

* [RFC 2/5] ARM: P2V: avoid initializers and assembly using PHYS_OFFSET
@ 2011-02-17 15:16     ` Eric Miao
  0 siblings, 0 replies; 72+ messages in thread
From: Eric Miao @ 2011-02-17 15:16 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jan 5, 2011 at 4:22 AM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> As PHYS_OFFSET will be becoming a variable, we can't have it used in
> initializers nor assembly code. ?Replace those in generic code with
> a run-time initialization. ?Replace those in platform code using the
> individual platform specific PLAT_PHYS_OFFSET.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

Acked-by: Eric Miao <eric.y.miao@gmail.com>

^ permalink raw reply	[flat|nested] 72+ messages in thread

* Re: [RFC 2/5] ARM: P2V: avoid initializers and assembly using PHYS_OFFSET
  2011-02-17 14:11     ` Russell King - ARM Linux
@ 2011-02-17 16:19       ` David Brown
  -1 siblings, 0 replies; 72+ messages in thread
From: David Brown @ 2011-02-17 16:19 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Nicolas Pitre, Daniel Walker, Eric Miao, linux-arm-msm,
	Hans J. Koch, linux-samsung-soc, Bryan Huntsman, Amit Kucheria,
	Sascha Hauer, Kukjin Kim, linux-arm-kernel

On Thu, Feb 17 2011, Russell King - ARM Linux wrote:

> On Tue, Jan 04, 2011 at 08:22:37PM +0000, Russell King - ARM Linux wrote:
>> As PHYS_OFFSET will be becoming a variable, we can't have it used in
>> initializers nor assembly code.  Replace those in generic code with
>> a run-time initialization.  Replace those in platform code using the
>> individual platform specific PLAT_PHYS_OFFSET.
>
> I'm still missing acks for MSM, PXA and TCC8k stuff for this change.

Sorry, I did test it, but forgot an explicit Ack:

  Acked-by: David Brown <davidb@codeaurora.org>

David
-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

^ permalink raw reply	[flat|nested] 72+ messages in thread

* [RFC 2/5] ARM: P2V: avoid initializers and assembly using PHYS_OFFSET
@ 2011-02-17 16:19       ` David Brown
  0 siblings, 0 replies; 72+ messages in thread
From: David Brown @ 2011-02-17 16:19 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, Feb 17 2011, Russell King - ARM Linux wrote:

> On Tue, Jan 04, 2011 at 08:22:37PM +0000, Russell King - ARM Linux wrote:
>> As PHYS_OFFSET will be becoming a variable, we can't have it used in
>> initializers nor assembly code.  Replace those in generic code with
>> a run-time initialization.  Replace those in platform code using the
>> individual platform specific PLAT_PHYS_OFFSET.
>
> I'm still missing acks for MSM, PXA and TCC8k stuff for this change.

Sorry, I did test it, but forgot an explicit Ack:

  Acked-by: David Brown <davidb@codeaurora.org>

David
-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

^ permalink raw reply	[flat|nested] 72+ messages in thread

* RE: [RFC 1/5] ARM: P2V: separate PHYS_OFFSET from platform definitions
  2011-02-17 15:16     ` Eric Miao
@ 2011-02-17 18:07       ` JD (Jiandong) Zheng
  -1 siblings, 0 replies; 72+ messages in thread
From: JD (Jiandong) Zheng @ 2011-02-17 18:07 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Srinidhi Kasagar, Kevin Hilman, Anton Vorontsov,
	Lennert Buytenhek, Kukjin Kim, Erik Gilling, linux-sh,
	Vincent Sanders, Hans J. Koch, Magnus Damm, Marc Singer,
	Tony Lindgren, David Brown, Alessandro Rubini, Wan ZongShun,
	linux-arm-msm, Olof Johansson, Ryan Mallon, linux-samsung-soc,
	Ben Dooks, linux-tegra@vger.kernel.org

On Wed, Jan 5, 2011 at 4:22 AM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> This uncouple PHYS_OFFSET from the platform definitions, thereby
> facilitating run-time computation of the physical memory offset.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
> arch/arm/include/asm/memory.h                  |    2 ++
> arch/arm/kernel/tcm.c                          |    2 +-

> arch/arm/mach-bcmring/include/mach/hardware.h  |    2 +-
> arch/arm/mach-bcmring/include/mach/memory.h    |    2 +-

Acked-by: Jiandong Zheng <jdzheng@broadcom.com>

^ permalink raw reply	[flat|nested] 72+ messages in thread

* [RFC 1/5] ARM: P2V: separate PHYS_OFFSET from platform definitions
@ 2011-02-17 18:07       ` JD (Jiandong) Zheng
  0 siblings, 0 replies; 72+ messages in thread
From: JD (Jiandong) Zheng @ 2011-02-17 18:07 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Jan 5, 2011 at 4:22 AM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> This uncouple PHYS_OFFSET from the platform definitions, thereby
> facilitating run-time computation of the physical memory offset.
>
> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
> ---
> arch/arm/include/asm/memory.h                  |    2 ++
> arch/arm/kernel/tcm.c                          |    2 +-

> arch/arm/mach-bcmring/include/mach/hardware.h  |    2 +-
> arch/arm/mach-bcmring/include/mach/memory.h    |    2 +-

Acked-by: Jiandong Zheng <jdzheng@broadcom.com>

^ permalink raw reply	[flat|nested] 72+ messages in thread

end of thread, other threads:[~2011-02-17 18:07 UTC | newest]

Thread overview: 72+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-04 20:20 [RFC 0/5] runtime P2V translations Russell King - ARM Linux
2011-01-04 20:20 ` Russell King - ARM Linux
2011-01-04 20:22 ` [RFC 1/5] ARM: P2V: separate PHYS_OFFSET from platform definitions Russell King - ARM Linux
2011-01-04 20:22   ` Russell King - ARM Linux
2011-01-04 21:10   ` Nicolas Pitre
2011-01-04 21:10     ` Nicolas Pitre
2011-01-05 22:30     ` Russell King - ARM Linux
2011-01-05 22:30       ` Russell King - ARM Linux
2011-01-04 21:23   ` Uwe Kleine-König
2011-01-04 21:23     ` Uwe Kleine-König
2011-01-05  0:04     ` Russell King - ARM Linux
2011-01-05  0:04       ` Russell King - ARM Linux
2011-01-05  6:25       ` Uwe Kleine-König
2011-01-05  6:25         ` Uwe Kleine-König
2011-01-05  3:28   ` viresh kumar
2011-01-05  3:28     ` viresh kumar
2011-01-05 17:04   ` H Hartley Sweeten
2011-01-05 17:04     ` H Hartley Sweeten
2011-01-06  5:02   ` Magnus Damm
2011-01-06  5:02     ` Magnus Damm
2011-02-07 15:57     ` Tony Lindgren
2011-02-07 15:57       ` Tony Lindgren
2011-02-07 16:36   ` Jean-Christophe PLAGNIOL-VILLARD
2011-02-07 16:36     ` Jean-Christophe PLAGNIOL-VILLARD
2011-02-08 11:22   ` Wan ZongShun
2011-02-08 11:22     ` Wan ZongShun
2011-02-17  5:33   ` Kukjin Kim
2011-02-17  5:33     ` Kukjin Kim
2011-02-17 15:16   ` Eric Miao
2011-02-17 15:16     ` Eric Miao
2011-02-17 18:07     ` JD (Jiandong) Zheng
2011-02-17 18:07       ` JD (Jiandong) Zheng
2011-01-04 20:22 ` [RFC 2/5] ARM: P2V: avoid initializers and assembly using PHYS_OFFSET Russell King - ARM Linux
2011-01-04 20:22   ` Russell King - ARM Linux
2011-01-04 21:12   ` Nicolas Pitre
2011-01-04 21:12     ` Nicolas Pitre
2011-01-06  8:51   ` Sascha Hauer
2011-01-06  8:51     ` Sascha Hauer
2011-01-06  9:08     ` Russell King - ARM Linux
2011-01-06  9:08       ` Russell King - ARM Linux
2011-02-07 15:59       ` Tony Lindgren
2011-02-07 15:59         ` Tony Lindgren
2011-02-07 16:51   ` Uwe Kleine-König
2011-02-07 16:51     ` Uwe Kleine-König
2011-02-07 16:52     ` Uwe Kleine-König
2011-02-07 16:52       ` Uwe Kleine-König
2011-02-17  5:36   ` Kukjin Kim
2011-02-17  5:36     ` Kukjin Kim
2011-02-17 14:11   ` Russell King - ARM Linux
2011-02-17 14:11     ` Russell King - ARM Linux
2011-02-17 16:19     ` David Brown
2011-02-17 16:19       ` David Brown
2011-02-17 15:16   ` Eric Miao
2011-02-17 15:16     ` Eric Miao
2011-01-04 20:22 ` [RFC 3/5] ARM: P2V: make head.S use PLAT_PHYS_OFFSET Russell King - ARM Linux
2011-01-04 21:13   ` Nicolas Pitre
2011-02-07 16:12     ` Tony Lindgren
2011-01-04 20:23 ` [RFC 4/5] ARM: P2V: introduce phys_to_virt/virt_to_phys runtime patching Russell King - ARM Linux
2011-01-04 21:27   ` Nicolas Pitre
2011-01-05  0:08     ` Russell King - ARM Linux
2011-02-07 16:15       ` Tony Lindgren
2011-02-09 12:17   ` Jamie Iles
2011-02-09 13:06     ` Russell King - ARM Linux
2011-01-04 20:23 ` [RFC 5/5] ARM: P2V: extend to 16-bit translation offsets Russell King - ARM Linux
2011-01-04 21:41   ` Nicolas Pitre
2011-01-05  0:15     ` Russell King - ARM Linux
2011-01-04 23:14   ` David Brown
2011-01-04 23:18   ` David Brown
2011-01-05  0:13     ` Russell King - ARM Linux
2011-02-07 16:19       ` Tony Lindgren
2011-02-17 14:15 ` [RFC 0/5] runtime P2V translations Russell King - ARM Linux
2011-02-17 14:15   ` Russell King - ARM Linux

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.