linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/37] ARM: prepare for removal of a bunch of <mach/memory.h> files
@ 2011-07-06  3:29 Nicolas Pitre
  2011-07-06  3:29 ` [PATCH 02/37] ARM: mach-dove: remove include/mach/memory.h Nicolas Pitre
                   ` (36 more replies)
  0 siblings, 37 replies; 48+ messages in thread
From: Nicolas Pitre @ 2011-07-06  3:29 UTC (permalink / raw)
  To: linux-arm-kernel

When the CONFIG_NO_MACH_MEMORY_H symbol is selected by a particular
machine class, the machine specific memory.h include file is no longer
used and can be removed.  In that case the equivalent information can
be obtained dynamically at runtime by enabling CONFIG_ARM_PATCH_PHYS_VIRT
or by specifying the physical memory address at kernel configuration time.

If/when all instances of mach/memory.h are removed then this symbol could
be removed.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
---
 arch/arm/Kconfig              |   15 ++++++++++++++-
 arch/arm/include/asm/memory.h |    6 +++++-
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 9adc278..9fc052c 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -191,11 +191,17 @@ config VECTORS_BASE
 	help
 	  The base address of exception vectors.
 
+config NO_MACH_MEMORY_H
+	bool
+	help
+	  Select this when mach/memory.h is removed.
+
 config ARM_PATCH_PHYS_VIRT
 	bool "Patch physical to virtual translations at runtime (EXPERIMENTAL)"
-	depends on EXPERIMENTAL
+	depends on EXPERIMENTAL || NO_MACH_MEMORY_H
 	depends on !XIP_KERNEL && MMU
 	depends on !ARCH_REALVIEW || !SPARSEMEM
+	default y if NO_MACH_MEMORY_H
 	help
 	  Patch phys-to-virt and virt-to-phys translation functions at
 	  boot and module load time according to the position of the
@@ -213,6 +219,13 @@ config ARM_PATCH_PHYS_VIRT_16BIT
 	  to allow physical memory down to a theoretical minimum of 64K
 	  boundaries.
 
+config PHYS_OFFSET
+	hex "Physical address of main memory"
+	depends on !ARM_PATCH_PHYS_VIRT && NO_MACH_MEMORY_H
+	help
+	  Please provide the physical address corresponding to the
+	  location of main memory in your system.
+
 source "init/Kconfig"
 
 source "kernel/Kconfig.freezer"
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
index deb2eaa..2d21414 100644
--- a/arch/arm/include/asm/memory.h
+++ b/arch/arm/include/asm/memory.h
@@ -16,7 +16,6 @@
 #include <linux/compiler.h>
 #include <linux/const.h>
 #include <linux/types.h>
-#include <mach/memory.h>
 #include <asm/sizes.h>
 
 /*
@@ -200,8 +199,13 @@ static inline unsigned long __phys_to_virt(unsigned long x)
 #endif
 
 #ifndef PHYS_OFFSET
+#ifdef CONFIG_NO_MACH_MEMORY_H
+#define PHYS_OFFSET	UL(CONFIG_PHYS_OFFSET)
+#else
+#include <mach/memory.h>
 #define PHYS_OFFSET	PLAT_PHYS_OFFSET
 #endif
+#endif
 
 /*
  * The DMA mask corresponding to the maximum bus address allocatable
-- 
1.7.4

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

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

Thread overview: 48+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-06  3:29 [PATCH 01/37] ARM: prepare for removal of a bunch of <mach/memory.h> files Nicolas Pitre
2011-07-06  3:29 ` [PATCH 02/37] ARM: mach-dove: remove include/mach/memory.h Nicolas Pitre
2011-07-06  3:29 ` [PATCH 03/37] ARM: mach-kirkwood: remove mach/memory.h Nicolas Pitre
2011-07-06  3:29 ` [PATCH 04/37] ARM: mach-loki: " Nicolas Pitre
2011-07-06  3:29 ` [PATCH 05/37] ARM: mach-orion5x: " Nicolas Pitre
2011-07-06  3:29 ` [PATCH 06/37] ARM: plat-omap: remove CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE related code Nicolas Pitre
2011-07-07 14:30   ` Tony Lindgren
2011-07-06  3:29 ` [PATCH 07/37] ARM: OMAP: move OMAP1 memory config from plat/memory.h to its mach/memory.h Nicolas Pitre
2011-07-07 14:30   ` Tony Lindgren
2011-07-06  3:29 ` [PATCH 08/37] ARM: mach-omap2: remove mach/memory.h Nicolas Pitre
2011-07-07 14:29   ` Tony Lindgren
2011-07-07 15:08   ` Arnd Bergmann
2011-07-07 15:25     ` Nicolas Pitre
2011-07-07 15:46       ` Arnd Bergmann
2011-07-06  3:29 ` [PATCH 09/37] ARM: mach-iop33x: " Nicolas Pitre
2011-07-06  3:29 ` [PATCH 10/37] ARM: mach-ep93xx: remove mach/memory.h and Kconfig selection of SDRAM bank Nicolas Pitre
2011-07-07 16:46   ` H Hartley Sweeten
2011-07-07 17:18     ` Nicolas Pitre
2011-07-07 17:29       ` H Hartley Sweeten
2011-07-07 18:00         ` Nicolas Pitre
2011-07-06  3:29 ` [PATCH 11/37] ARM: mach-s3c2410: remove memory.h Nicolas Pitre
2011-07-06  3:29 ` [PATCH 12/37] ARM: mach-mv78xx0: remove mach/memory.h Nicolas Pitre
2011-07-06  3:29 ` [PATCH 13/37] ARM: mach-vexpress: " Nicolas Pitre
2011-07-06  3:29 ` [PATCH 14/37] ARM: mach-w90x900: " Nicolas Pitre
2011-07-06  3:29 ` [PATCH 15/37] ARM: mach-pnx4008: " Nicolas Pitre
2011-07-06  3:30 ` [PATCH 16/37] ARM: mach-iop32x: " Nicolas Pitre
2011-07-06  3:30 ` [PATCH 17/37] ARM: mach-nomadik: " Nicolas Pitre
2011-07-06  3:30 ` [PATCH 18/37] ARM: mach-ux500: " Nicolas Pitre
2011-07-06  3:30 ` [PATCH 19/37] ARM: mach-versatile: " Nicolas Pitre
2011-07-06  3:30 ` [PATCH 20/37] ARM: mach-netx: " Nicolas Pitre
2011-07-06  3:30 ` [PATCH 21/37] ARM: mach-lpc32xx: " Nicolas Pitre
2011-07-06  3:30 ` [PATCH 22/37] ARM: mach-gemini: " Nicolas Pitre
2011-07-06  3:30 ` [PATCH 23/37] ARM: mach-msm: " Nicolas Pitre
2011-07-06  3:30 ` [PATCH 24/37] ARM: spear: remove mach/memory.h and plat/memory.h Nicolas Pitre
2011-07-06  3:30 ` [PATCH 25/37] ARM: mach-mxs: remove mach/memory.h Nicolas Pitre
2011-07-06  3:30 ` [PATCH 26/37] ARM: mach-nuc93x: " Nicolas Pitre
2011-07-06  3:30 ` [PATCH 27/37] ARM: mach-cns3xxx: " Nicolas Pitre
2011-07-06  3:30 ` [PATCH 28/37] ARM: mach-mmp: " Nicolas Pitre
2011-07-06  3:30 ` [PATCH 29/37] ARM: plat-tcc: " Nicolas Pitre
2011-07-06  3:30 ` [PATCH 30/37] ARM: mach-tegra: " Nicolas Pitre
2011-07-06  3:30 ` [PATCH 31/37] ARM: mach-s5pc100: " Nicolas Pitre
2011-07-06  3:30 ` [PATCH 32/37] ARM: mach-vt8500: " Nicolas Pitre
2011-07-06  3:30 ` [PATCH 33/37] ARM: mach-shark: " Nicolas Pitre
2011-07-06  3:30 ` [PATCH 34/37] ARM: mach-ebsa110: " Nicolas Pitre
2011-07-06  3:30 ` [PATCH 35/37] ARM: mach-h720x: " Nicolas Pitre
2011-07-06  3:30 ` [PATCH 36/37] ARM: mach-ixp4xx: " Nicolas Pitre
2011-07-06  3:30 ` [PATCH 37/37] ARM: mach-pxa: " Nicolas Pitre
2011-07-06  6:38 ` [PATCH 01/37] ARM: prepare for removal of a bunch of <mach/memory.h> files Barry Song

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).