linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/23] mach/vmalloc.h removal, and ioremap optimization
@ 2011-11-16  5:48 Nicolas Pitre
  2011-11-16  5:48 ` [PATCH 01/23] ARM: mach-dove: remove inclusion of <mach/vmalloc.h> Nicolas Pitre
                   ` (24 more replies)
  0 siblings, 25 replies; 42+ messages in thread
From: Nicolas Pitre @ 2011-11-16  5:48 UTC (permalink / raw)
  To: linux-arm-kernel

This patch series removes all instances of mach/vmalloc.h in order to
have a more unified memory map across all ARM architectures.  To do so,
the static mappings are moved inside the vmalloc area.  And finally this
allows for a generic optimization to ioremap where static mappings are
reused whenever possible, using common code instead of having this
duplicated in a couple places.

This series provides a net reduction of more than 1200 lines of code.

One regression was discovered on shmobile during testing because that
platform asks for 158MB of consistent DMA memory while the documented
maximum is 14MB.  Inspection of the code doesn't tell why this is
required, and listed maintainers did not respond yet, two months
after repeated inquiries.  So a temporary exception to the definition
of VMALLOC_END was added for CONFIG_SHMOBILE and a noisy warning to
get those maintainers' attention.

This patch series was initially submitted for inclusion for v3.1, and
withdrawn due to too many problems found on OMAP.  Those problems are
now fixed in current mainline.  This is therefore rebased on v3.2-rc2.

This series is also available from the following Git repository:

	git://git.linaro.org/people/nico/linux vmalloc

[PATCH 01/23] ARM: mach-dove: remove inclusion of <mach/vmalloc.h>
[PATCH 02/23] ARM: mach-prima2: don't define SIRFSOC_VA in terms of
[PATCH 03/23] ARM: plat-mxc: remove inclusion of <mach/vmalloc.h>
[PATCH 04/23] ARM: mach-at91: remove arch specific special handling
[PATCH 05/23] ARM: mach-davinci: remove arch specific special
[PATCH 06/23] ARM: mach-tegra: remove arch specific special handling
[PATCH 07/23] ARM: plat-omap: remove arch specific special handling
[PATCH 08/23] ARM: mach-bcmring: use proper constant to identify DMA
[PATCH 09/23] ARM: mach-orion5x: remove arch specific special
[PATCH 10/23] ARM: mach-kirkwood: remove arch specific special
[PATCH 11/23] ARM: mach-ixp23xx: remove arch specific special
[PATCH 12/23] ARM: plat-iop: remove arch specific special handling
[PATCH 13/23] ARM: versatile: remove overlapping map_desc entry
[PATCH 14/23] ARM: realview: fix map_desc alignment
[PATCH 15/23] ARM: realview-eb11mp: fix map_desc alignment
[PATCH 16/23] ARM: sort the meminfo array earlier
[PATCH 17/23] ARM: move initialization of the high_memory variable
[PATCH 18/23] mm: add vm_area_add_early()
[PATCH 19/23] ARM: move iotable mappings within the vmalloc region
[PATCH 20/23] ARM: simplify __iounmap() when dealing with section
[PATCH 21/23] ARM: add generic ioremap optimization by reusing
[PATCH 22/23] ARM: big removal of now unused vmalloc.h files
[PATCH 23/23] ARM: move VMALLOC_END down temporarily for shmobile

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

* [PATCH 01/23] ARM: mach-dove: remove inclusion of <mach/vmalloc.h>
  2011-11-16  5:48 [PATCH 0/23] mach/vmalloc.h removal, and ioremap optimization Nicolas Pitre
@ 2011-11-16  5:48 ` Nicolas Pitre
  2011-11-16  5:48 ` [PATCH 02/23] ARM: mach-prima2: don't define SIRFSOC_VA in terms of VMALLOC_END Nicolas Pitre
                   ` (23 subsequent siblings)
  24 siblings, 0 replies; 42+ messages in thread
From: Nicolas Pitre @ 2011-11-16  5:48 UTC (permalink / raw)
  To: linux-arm-kernel

From: Nicolas Pitre <nicolas.pitre@linaro.org>

This include is unnecessary.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
---
 arch/arm/mach-dove/include/mach/dove.h |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-dove/include/mach/dove.h b/arch/arm/mach-dove/include/mach/dove.h
index b20ec9af78..ad1165d488 100644
--- a/arch/arm/mach-dove/include/mach/dove.h
+++ b/arch/arm/mach-dove/include/mach/dove.h
@@ -11,8 +11,6 @@
 #ifndef __ASM_ARCH_DOVE_H
 #define __ASM_ARCH_DOVE_H
 
-#include <mach/vmalloc.h>
-
 /*
  * Marvell Dove address maps.
  *
-- 
1.7.7.1.431.g10b2a

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

* [PATCH 02/23] ARM: mach-prima2: don't define SIRFSOC_VA in terms of VMALLOC_END
  2011-11-16  5:48 [PATCH 0/23] mach/vmalloc.h removal, and ioremap optimization Nicolas Pitre
  2011-11-16  5:48 ` [PATCH 01/23] ARM: mach-dove: remove inclusion of <mach/vmalloc.h> Nicolas Pitre
@ 2011-11-16  5:48 ` Nicolas Pitre
  2011-11-16  5:48 ` [PATCH 03/23] ARM: plat-mxc: remove inclusion of <mach/vmalloc.h> Nicolas Pitre
                   ` (22 subsequent siblings)
  24 siblings, 0 replies; 42+ messages in thread
From: Nicolas Pitre @ 2011-11-16  5:48 UTC (permalink / raw)
  To: linux-arm-kernel

From: Nicolas Pitre <nicolas.pitre@linaro.org>

... since it is going to change.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Tested-by: Barry Song <baohua.song@csr.com>
---
 arch/arm/mach-prima2/include/mach/map.h |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-prima2/include/mach/map.h b/arch/arm/mach-prima2/include/mach/map.h
index 66b1ae2e55..6f24353257 100644
--- a/arch/arm/mach-prima2/include/mach/map.h
+++ b/arch/arm/mach-prima2/include/mach/map.h
@@ -9,8 +9,10 @@
 #ifndef __MACH_PRIMA2_MAP_H__
 #define __MACH_PRIMA2_MAP_H__
 
-#include <mach/vmalloc.h>
+#include <linux/const.h>
 
-#define SIRFSOC_VA(x)			(VMALLOC_END + ((x) & 0x00FFF000))
+#define SIRFSOC_VA_BASE		_AC(0xFEC00000, UL)
+
+#define SIRFSOC_VA(x)		(SIRFSOC_VA_BASE + ((x) & 0x00FFF000))
 
 #endif
-- 
1.7.7.1.431.g10b2a

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

* [PATCH 03/23] ARM: plat-mxc: remove inclusion of <mach/vmalloc.h>
  2011-11-16  5:48 [PATCH 0/23] mach/vmalloc.h removal, and ioremap optimization Nicolas Pitre
  2011-11-16  5:48 ` [PATCH 01/23] ARM: mach-dove: remove inclusion of <mach/vmalloc.h> Nicolas Pitre
  2011-11-16  5:48 ` [PATCH 02/23] ARM: mach-prima2: don't define SIRFSOC_VA in terms of VMALLOC_END Nicolas Pitre
@ 2011-11-16  5:48 ` Nicolas Pitre
  2011-11-16  5:48 ` [PATCH 04/23] ARM: mach-at91: remove arch specific special handling for ioremap Nicolas Pitre
                   ` (21 subsequent siblings)
  24 siblings, 0 replies; 42+ messages in thread
From: Nicolas Pitre @ 2011-11-16  5:48 UTC (permalink / raw)
  To: linux-arm-kernel

From: Nicolas Pitre <nicolas.pitre@linaro.org>

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
---
 arch/arm/plat-mxc/include/mach/mx1.h |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/arch/arm/plat-mxc/include/mach/mx1.h b/arch/arm/plat-mxc/include/mach/mx1.h
index 97b19e7800..2b7c08d13e 100644
--- a/arch/arm/plat-mxc/include/mach/mx1.h
+++ b/arch/arm/plat-mxc/include/mach/mx1.h
@@ -12,8 +12,6 @@
 #ifndef __MACH_MX1_H__
 #define __MACH_MX1_H__
 
-#include <mach/vmalloc.h>
-
 /*
  * Memory map
  */
-- 
1.7.7.1.431.g10b2a

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

* [PATCH 04/23] ARM: mach-at91: remove arch specific special handling for ioremap
  2011-11-16  5:48 [PATCH 0/23] mach/vmalloc.h removal, and ioremap optimization Nicolas Pitre
                   ` (2 preceding siblings ...)
  2011-11-16  5:48 ` [PATCH 03/23] ARM: plat-mxc: remove inclusion of <mach/vmalloc.h> Nicolas Pitre
@ 2011-11-16  5:48 ` Nicolas Pitre
  2011-11-16  5:48 ` [PATCH 05/23] ARM: mach-davinci: " Nicolas Pitre
                   ` (20 subsequent siblings)
  24 siblings, 0 replies; 42+ messages in thread
From: Nicolas Pitre @ 2011-11-16  5:48 UTC (permalink / raw)
  To: linux-arm-kernel

From: Nicolas Pitre <nicolas.pitre@linaro.org>

A generic version should replace this later.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
---
 arch/arm/mach-at91/include/mach/io.h |    8 --------
 arch/arm/mach-at91/setup.c           |   18 ------------------
 2 files changed, 0 insertions(+), 26 deletions(-)

diff --git a/arch/arm/mach-at91/include/mach/io.h b/arch/arm/mach-at91/include/mach/io.h
index 4298e7806c..4ca09ef7ca 100644
--- a/arch/arm/mach-at91/include/mach/io.h
+++ b/arch/arm/mach-at91/include/mach/io.h
@@ -30,14 +30,6 @@
 
 #ifndef __ASSEMBLY__
 
-#ifndef CONFIG_ARCH_AT91X40
-#define __arch_ioremap	at91_ioremap
-#define __arch_iounmap	at91_iounmap
-#endif
-
-void __iomem *at91_ioremap(unsigned long phys, size_t size, unsigned int type);
-void at91_iounmap(volatile void __iomem *addr);
-
 static inline unsigned int at91_sys_read(unsigned int reg_offset)
 {
 	void __iomem *addr = (void __iomem *)AT91_VA_BASE_SYS;
diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c
index aa64294c7d..cf98a8f94d 100644
--- a/arch/arm/mach-at91/setup.c
+++ b/arch/arm/mach-at91/setup.c
@@ -73,24 +73,6 @@ static struct map_desc at91_io_desc __initdata = {
 	.type		= MT_DEVICE,
 };
 
-void __iomem *at91_ioremap(unsigned long p, size_t size, unsigned int type)
-{
-	if (p >= AT91_BASE_SYS && p <= (AT91_BASE_SYS + SZ_16K - 1))
-		return (void __iomem *)AT91_IO_P2V(p);
-
-	return __arm_ioremap_caller(p, size, type, __builtin_return_address(0));
-}
-EXPORT_SYMBOL(at91_ioremap);
-
-void at91_iounmap(volatile void __iomem *addr)
-{
-	unsigned long virt = (unsigned long)addr;
-
-	if (virt >= VMALLOC_START && virt < VMALLOC_END)
-		__iounmap(addr);
-}
-EXPORT_SYMBOL(at91_iounmap);
-
 #define AT91_DBGU0	0xfffff200
 #define AT91_DBGU1	0xffffee00
 
-- 
1.7.7.1.431.g10b2a

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

* [PATCH 05/23] ARM: mach-davinci: remove arch specific special handling for ioremap
  2011-11-16  5:48 [PATCH 0/23] mach/vmalloc.h removal, and ioremap optimization Nicolas Pitre
                   ` (3 preceding siblings ...)
  2011-11-16  5:48 ` [PATCH 04/23] ARM: mach-at91: remove arch specific special handling for ioremap Nicolas Pitre
@ 2011-11-16  5:48 ` Nicolas Pitre
  2011-11-16  5:48 ` [PATCH 06/23] ARM: mach-tegra: " Nicolas Pitre
                   ` (19 subsequent siblings)
  24 siblings, 0 replies; 42+ messages in thread
From: Nicolas Pitre @ 2011-11-16  5:48 UTC (permalink / raw)
  To: linux-arm-kernel

From: Nicolas Pitre <nicolas.pitre@linaro.org>

A generic version should replace this later.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
---
 arch/arm/mach-davinci/Makefile          |    2 +-
 arch/arm/mach-davinci/include/mach/io.h |    8 -----
 arch/arm/mach-davinci/io.c              |   48 -------------------------------
 3 files changed, 1 insertions(+), 57 deletions(-)
 delete mode 100644 arch/arm/mach-davinci/io.c

diff --git a/arch/arm/mach-davinci/Makefile b/arch/arm/mach-davinci/Makefile
index 495e31306f..2db78bd5c8 100644
--- a/arch/arm/mach-davinci/Makefile
+++ b/arch/arm/mach-davinci/Makefile
@@ -4,7 +4,7 @@
 #
 
 # Common objects
-obj-y 			:= time.o clock.o serial.o io.o psc.o \
+obj-y 			:= time.o clock.o serial.o psc.o \
 			   dma.o usb.o common.o sram.o aemif.o
 
 obj-$(CONFIG_DAVINCI_MUX)		+= mux.o
diff --git a/arch/arm/mach-davinci/include/mach/io.h b/arch/arm/mach-davinci/include/mach/io.h
index d1b954955c..b2267d1e1a 100644
--- a/arch/arm/mach-davinci/include/mach/io.h
+++ b/arch/arm/mach-davinci/include/mach/io.h
@@ -21,12 +21,4 @@
 #define __mem_pci(a)		(a)
 #define __mem_isa(a)		(a)
 
-#ifndef __ASSEMBLER__
-#define __arch_ioremap		davinci_ioremap
-#define __arch_iounmap		davinci_iounmap
-
-void __iomem *davinci_ioremap(unsigned long phys, size_t size,
-			      unsigned int type);
-void davinci_iounmap(volatile void __iomem *addr);
-#endif
 #endif /* __ASM_ARCH_IO_H */
diff --git a/arch/arm/mach-davinci/io.c b/arch/arm/mach-davinci/io.c
deleted file mode 100644
index 8ea60a8b24..0000000000
--- a/arch/arm/mach-davinci/io.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * DaVinci I/O mapping code
- *
- * Copyright (C) 2005-2006 Texas Instruments
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#include <linux/module.h>
-#include <linux/io.h>
-
-#include <asm/tlb.h>
-#include <asm/mach/map.h>
-
-#include <mach/common.h>
-
-/*
- * Intercept ioremap() requests for addresses in our fixed mapping regions.
- */
-void __iomem *davinci_ioremap(unsigned long p, size_t size, unsigned int type)
-{
-	struct map_desc *desc = davinci_soc_info.io_desc;
-	int desc_num = davinci_soc_info.io_desc_num;
-	int i;
-
-	for (i = 0; i < desc_num; i++, desc++) {
-		unsigned long iophys = __pfn_to_phys(desc->pfn);
-		unsigned long iosize = desc->length;
-
-		if (p >= iophys && (p + size) <= (iophys + iosize))
-			return __io(desc->virtual + p - iophys);
-	}
-
-	return __arm_ioremap_caller(p, size, type,
-					__builtin_return_address(0));
-}
-EXPORT_SYMBOL(davinci_ioremap);
-
-void davinci_iounmap(volatile void __iomem *addr)
-{
-	unsigned long virt = (unsigned long)addr;
-
-	if (virt >= VMALLOC_START && virt < VMALLOC_END)
-		__iounmap(addr);
-}
-EXPORT_SYMBOL(davinci_iounmap);
-- 
1.7.7.1.431.g10b2a

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

* [PATCH 06/23] ARM: mach-tegra: remove arch specific special handling for ioremap
  2011-11-16  5:48 [PATCH 0/23] mach/vmalloc.h removal, and ioremap optimization Nicolas Pitre
                   ` (4 preceding siblings ...)
  2011-11-16  5:48 ` [PATCH 05/23] ARM: mach-davinci: " Nicolas Pitre
@ 2011-11-16  5:48 ` Nicolas Pitre
  2011-11-16  5:48 ` [PATCH 07/23] ARM: plat-omap: " Nicolas Pitre
                   ` (18 subsequent siblings)
  24 siblings, 0 replies; 42+ messages in thread
From: Nicolas Pitre @ 2011-11-16  5:48 UTC (permalink / raw)
  To: linux-arm-kernel

From: Nicolas Pitre <nicolas.pitre@linaro.org>

A generic version should replace this later.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
---
 arch/arm/mach-tegra/include/mach/io.h |    6 ------
 arch/arm/mach-tegra/io.c              |   21 ---------------------
 2 files changed, 0 insertions(+), 27 deletions(-)

diff --git a/arch/arm/mach-tegra/include/mach/io.h b/arch/arm/mach-tegra/include/mach/io.h
index 35a011fbc4..f15defffb5 100644
--- a/arch/arm/mach-tegra/include/mach/io.h
+++ b/arch/arm/mach-tegra/include/mach/io.h
@@ -71,12 +71,6 @@
 
 #ifndef __ASSEMBLER__
 
-#define __arch_ioremap		tegra_ioremap
-#define __arch_iounmap		tegra_iounmap
-
-void __iomem *tegra_ioremap(unsigned long phys, size_t size, unsigned int type);
-void tegra_iounmap(volatile void __iomem *addr);
-
 #define IO_ADDRESS(n) (IO_TO_VIRT(n))
 
 #ifdef CONFIG_TEGRA_PCI
diff --git a/arch/arm/mach-tegra/io.c b/arch/arm/mach-tegra/io.c
index 5489f8b5d6..d23ee2db28 100644
--- a/arch/arm/mach-tegra/io.c
+++ b/arch/arm/mach-tegra/io.c
@@ -60,24 +60,3 @@ void __init tegra_map_common_io(void)
 {
 	iotable_init(tegra_io_desc, ARRAY_SIZE(tegra_io_desc));
 }
-
-/*
- * Intercept ioremap() requests for addresses in our fixed mapping regions.
- */
-void __iomem *tegra_ioremap(unsigned long p, size_t size, unsigned int type)
-{
-	void __iomem *v = IO_ADDRESS(p);
-	if (v == NULL)
-		v = __arm_ioremap(p, size, type);
-	return v;
-}
-EXPORT_SYMBOL(tegra_ioremap);
-
-void tegra_iounmap(volatile void __iomem *addr)
-{
-	unsigned long virt = (unsigned long)addr;
-
-	if (virt >= VMALLOC_START && virt < VMALLOC_END)
-		__iounmap(addr);
-}
-EXPORT_SYMBOL(tegra_iounmap);
-- 
1.7.7.1.431.g10b2a

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

* [PATCH 07/23] ARM: plat-omap: remove arch specific special handling for ioremap
  2011-11-16  5:48 [PATCH 0/23] mach/vmalloc.h removal, and ioremap optimization Nicolas Pitre
                   ` (5 preceding siblings ...)
  2011-11-16  5:48 ` [PATCH 06/23] ARM: mach-tegra: " Nicolas Pitre
@ 2011-11-16  5:48 ` Nicolas Pitre
  2011-11-18 18:39   ` Kevin Hilman
  2011-12-02 20:21   ` Tony Lindgren
  2011-11-16  5:48 ` [PATCH 08/23] ARM: mach-bcmring: use proper constant to identify DMA memory area Nicolas Pitre
                   ` (17 subsequent siblings)
  24 siblings, 2 replies; 42+ messages in thread
From: Nicolas Pitre @ 2011-11-16  5:48 UTC (permalink / raw)
  To: linux-arm-kernel

From: Nicolas Pitre <nicolas.pitre@linaro.org>

A generic version should replace this later.

As io.c has become nearly empty, omap_init_consistent_dma_size() is moved
into common.c so that io.c can be removed entirely.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
---
 arch/arm/mach-omap1/io.c             |    1 -
 arch/arm/mach-omap2/io.c             |    1 -
 arch/arm/plat-omap/Makefile          |    2 +-
 arch/arm/plat-omap/common.c          |    7 ++
 arch/arm/plat-omap/include/plat/io.h |    8 --
 arch/arm/plat-omap/io.c              |  159 ----------------------------------
 6 files changed, 8 insertions(+), 170 deletions(-)
 delete mode 100644 arch/arm/plat-omap/io.c

diff --git a/arch/arm/mach-omap1/io.c b/arch/arm/mach-omap1/io.c
index 7969cfda44..8e55b6fb34 100644
--- a/arch/arm/mach-omap1/io.c
+++ b/arch/arm/mach-omap1/io.c
@@ -121,7 +121,6 @@ void __init omap16xx_map_io(void)
 void omap1_init_early(void)
 {
 	omap_check_revision();
-	omap_ioremap_init();
 
 	/* REVISIT: Refer to OMAP5910 Errata, Advisory SYS_1: "Timeout Abort
 	 * on a Posted Write in the TIPB Bridge".
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index 25d20ced03..58ba784dc9 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -322,7 +322,6 @@ void __iomem *omap_irq_base;
 static void __init omap_common_init_early(void)
 {
 	omap2_check_revision();
-	omap_ioremap_init();
 	omap_init_consistent_dma_size();
 }
 
diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile
index 985262242f..3df04d944e 100644
--- a/arch/arm/plat-omap/Makefile
+++ b/arch/arm/plat-omap/Makefile
@@ -4,7 +4,7 @@
 
 # Common support
 obj-y := common.o sram.o clock.o devices.o dma.o mux.o \
-	 usb.o fb.o io.o counter_32k.o
+	 usb.o fb.o counter_32k.o
 obj-m :=
 obj-n :=
 obj-  :=
diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c
index d9f10a31e6..7a4578be9e 100644
--- a/arch/arm/plat-omap/common.c
+++ b/arch/arm/plat-omap/common.c
@@ -66,3 +66,10 @@ void __init omap_reserve(void)
 	omap_vram_reserve_sdram_memblock();
 	omap_dsp_reserve_sdram_memblock();
 }
+
+void __init omap_init_consistent_dma_size(void)
+{
+#ifdef CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE
+	init_consistent_dma_size(CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE << 20);
+#endif
+}
diff --git a/arch/arm/plat-omap/include/plat/io.h b/arch/arm/plat-omap/include/plat/io.h
index 7f2969eadb..27d3897f2b 100644
--- a/arch/arm/plat-omap/include/plat/io.h
+++ b/arch/arm/plat-omap/include/plat/io.h
@@ -247,8 +247,6 @@
  * NOTE: Please use ioremap + __raw_read/write where possible instead of these
  */
 
-void omap_ioremap_init(void);
-
 extern u8 omap_readb(u32 pa);
 extern u16 omap_readw(u32 pa);
 extern u32 omap_readl(u32 pa);
@@ -328,12 +326,6 @@ extern void omap2_init_common_infrastructure(void);
 extern void omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0,
 				      struct omap_sdrc_params *sdrc_cs1);
 
-#define __arch_ioremap	omap_ioremap
-#define __arch_iounmap	omap_iounmap
-
-void __iomem *omap_ioremap(unsigned long phys, size_t size, unsigned int type);
-void omap_iounmap(volatile void __iomem *addr);
-
 extern void __init omap_init_consistent_dma_size(void);
 
 #endif
diff --git a/arch/arm/plat-omap/io.c b/arch/arm/plat-omap/io.c
deleted file mode 100644
index 333871f599..0000000000
--- a/arch/arm/plat-omap/io.c
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Common io.c file
- * This file is created by Russell King <rmk+kernel@arm.linux.org.uk>
- *
- * Copyright (C) 2009 Texas Instruments
- * Added OMAP4 support - Santosh Shilimkar <santosh.shilimkar@ti.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-#include <linux/module.h>
-#include <linux/io.h>
-#include <linux/mm.h>
-#include <linux/dma-mapping.h>
-
-#include <plat/omap7xx.h>
-#include <plat/omap1510.h>
-#include <plat/omap16xx.h>
-#include <plat/omap24xx.h>
-#include <plat/omap34xx.h>
-#include <plat/omap44xx.h>
-
-#define BETWEEN(p,st,sz)	((p) >= (st) && (p) < ((st) + (sz)))
-#define XLATE(p,pst,vst)	((void __iomem *)((p) - (pst) + (vst)))
-
-static int initialized;
-
-/*
- * Intercept ioremap() requests for addresses in our fixed mapping regions.
- */
-void __iomem *omap_ioremap(unsigned long p, size_t size, unsigned int type)
-{
-
-	WARN(!initialized, "Do not use ioremap before init_early\n");
-
-#ifdef CONFIG_ARCH_OMAP1
-	if (cpu_class_is_omap1()) {
-		if (BETWEEN(p, OMAP1_IO_PHYS, OMAP1_IO_SIZE))
-			return XLATE(p, OMAP1_IO_PHYS, OMAP1_IO_VIRT);
-	}
-	if (cpu_is_omap7xx()) {
-		if (BETWEEN(p, OMAP7XX_DSP_BASE, OMAP7XX_DSP_SIZE))
-			return XLATE(p, OMAP7XX_DSP_BASE, OMAP7XX_DSP_START);
-
-		if (BETWEEN(p, OMAP7XX_DSPREG_BASE, OMAP7XX_DSPREG_SIZE))
-			return XLATE(p, OMAP7XX_DSPREG_BASE,
-					OMAP7XX_DSPREG_START);
-	}
-	if (cpu_is_omap15xx()) {
-		if (BETWEEN(p, OMAP1510_DSP_BASE, OMAP1510_DSP_SIZE))
-			return XLATE(p, OMAP1510_DSP_BASE, OMAP1510_DSP_START);
-
-		if (BETWEEN(p, OMAP1510_DSPREG_BASE, OMAP1510_DSPREG_SIZE))
-			return XLATE(p, OMAP1510_DSPREG_BASE,
-					OMAP1510_DSPREG_START);
-	}
-	if (cpu_is_omap16xx()) {
-		if (BETWEEN(p, OMAP16XX_DSP_BASE, OMAP16XX_DSP_SIZE))
-			return XLATE(p, OMAP16XX_DSP_BASE, OMAP16XX_DSP_START);
-
-		if (BETWEEN(p, OMAP16XX_DSPREG_BASE, OMAP16XX_DSPREG_SIZE))
-			return XLATE(p, OMAP16XX_DSPREG_BASE,
-					OMAP16XX_DSPREG_START);
-	}
-#endif
-#ifdef CONFIG_ARCH_OMAP2
-	if (cpu_is_omap24xx()) {
-		if (BETWEEN(p, L3_24XX_PHYS, L3_24XX_SIZE))
-			return XLATE(p, L3_24XX_PHYS, L3_24XX_VIRT);
-		if (BETWEEN(p, L4_24XX_PHYS, L4_24XX_SIZE))
-			return XLATE(p, L4_24XX_PHYS, L4_24XX_VIRT);
-	}
-	if (cpu_is_omap2420()) {
-		if (BETWEEN(p, DSP_MEM_2420_PHYS, DSP_MEM_2420_SIZE))
-			return XLATE(p, DSP_MEM_2420_PHYS, DSP_MEM_2420_VIRT);
-		if (BETWEEN(p, DSP_IPI_2420_PHYS, DSP_IPI_2420_SIZE))
-			return XLATE(p, DSP_IPI_2420_PHYS, DSP_IPI_2420_SIZE);
-		if (BETWEEN(p, DSP_MMU_2420_PHYS, DSP_MMU_2420_SIZE))
-			return XLATE(p, DSP_MMU_2420_PHYS, DSP_MMU_2420_VIRT);
-	}
-	if (cpu_is_omap2430()) {
-		if (BETWEEN(p, L4_WK_243X_PHYS, L4_WK_243X_SIZE))
-			return XLATE(p, L4_WK_243X_PHYS, L4_WK_243X_VIRT);
-		if (BETWEEN(p, OMAP243X_GPMC_PHYS, OMAP243X_GPMC_SIZE))
-			return XLATE(p, OMAP243X_GPMC_PHYS, OMAP243X_GPMC_VIRT);
-		if (BETWEEN(p, OMAP243X_SDRC_PHYS, OMAP243X_SDRC_SIZE))
-			return XLATE(p, OMAP243X_SDRC_PHYS, OMAP243X_SDRC_VIRT);
-		if (BETWEEN(p, OMAP243X_SMS_PHYS, OMAP243X_SMS_SIZE))
-			return XLATE(p, OMAP243X_SMS_PHYS, OMAP243X_SMS_VIRT);
-	}
-#endif
-#ifdef CONFIG_ARCH_OMAP3
-	if (cpu_is_ti816x()) {
-		if (BETWEEN(p, L4_34XX_PHYS, L4_34XX_SIZE))
-			return XLATE(p, L4_34XX_PHYS, L4_34XX_VIRT);
-	} else if (cpu_is_omap34xx()) {
-		if (BETWEEN(p, L3_34XX_PHYS, L3_34XX_SIZE))
-			return XLATE(p, L3_34XX_PHYS, L3_34XX_VIRT);
-		if (BETWEEN(p, L4_34XX_PHYS, L4_34XX_SIZE))
-			return XLATE(p, L4_34XX_PHYS, L4_34XX_VIRT);
-		if (BETWEEN(p, OMAP34XX_GPMC_PHYS, OMAP34XX_GPMC_SIZE))
-			return XLATE(p, OMAP34XX_GPMC_PHYS, OMAP34XX_GPMC_VIRT);
-		if (BETWEEN(p, OMAP343X_SMS_PHYS, OMAP343X_SMS_SIZE))
-			return XLATE(p, OMAP343X_SMS_PHYS, OMAP343X_SMS_VIRT);
-		if (BETWEEN(p, OMAP343X_SDRC_PHYS, OMAP343X_SDRC_SIZE))
-			return XLATE(p, OMAP343X_SDRC_PHYS, OMAP343X_SDRC_VIRT);
-		if (BETWEEN(p, L4_PER_34XX_PHYS, L4_PER_34XX_SIZE))
-			return XLATE(p, L4_PER_34XX_PHYS, L4_PER_34XX_VIRT);
-		if (BETWEEN(p, L4_EMU_34XX_PHYS, L4_EMU_34XX_SIZE))
-			return XLATE(p, L4_EMU_34XX_PHYS, L4_EMU_34XX_VIRT);
-	}
-#endif
-#ifdef CONFIG_ARCH_OMAP4
-	if (cpu_is_omap44xx()) {
-		if (BETWEEN(p, L3_44XX_PHYS, L3_44XX_SIZE))
-			return XLATE(p, L3_44XX_PHYS, L3_44XX_VIRT);
-		if (BETWEEN(p, L4_44XX_PHYS, L4_44XX_SIZE))
-			return XLATE(p, L4_44XX_PHYS, L4_44XX_VIRT);
-		if (BETWEEN(p, OMAP44XX_GPMC_PHYS, OMAP44XX_GPMC_SIZE))
-			return XLATE(p, OMAP44XX_GPMC_PHYS, OMAP44XX_GPMC_VIRT);
-		if (BETWEEN(p, OMAP44XX_EMIF1_PHYS, OMAP44XX_EMIF1_SIZE))
-			return XLATE(p, OMAP44XX_EMIF1_PHYS,		\
-							OMAP44XX_EMIF1_VIRT);
-		if (BETWEEN(p, OMAP44XX_EMIF2_PHYS, OMAP44XX_EMIF2_SIZE))
-			return XLATE(p, OMAP44XX_EMIF2_PHYS,		\
-							OMAP44XX_EMIF2_VIRT);
-		if (BETWEEN(p, OMAP44XX_DMM_PHYS, OMAP44XX_DMM_SIZE))
-			return XLATE(p, OMAP44XX_DMM_PHYS, OMAP44XX_DMM_VIRT);
-		if (BETWEEN(p, L4_PER_44XX_PHYS, L4_PER_44XX_SIZE))
-			return XLATE(p, L4_PER_44XX_PHYS, L4_PER_44XX_VIRT);
-		if (BETWEEN(p, L4_EMU_44XX_PHYS, L4_EMU_44XX_SIZE))
-			return XLATE(p, L4_EMU_44XX_PHYS, L4_EMU_44XX_VIRT);
-	}
-#endif
-	return __arm_ioremap_caller(p, size, type, __builtin_return_address(0));
-}
-EXPORT_SYMBOL(omap_ioremap);
-
-void omap_iounmap(volatile void __iomem *addr)
-{
-	unsigned long virt = (unsigned long)addr;
-
-	if (virt >= VMALLOC_START && virt < VMALLOC_END)
-		__iounmap(addr);
-}
-EXPORT_SYMBOL(omap_iounmap);
-
-void __init omap_init_consistent_dma_size(void)
-{
-#ifdef CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE
-	init_consistent_dma_size(CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE << 20);
-#endif
-}
-
-void __init omap_ioremap_init(void)
-{
-	initialized++;
-}
-- 
1.7.7.1.431.g10b2a

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

* [PATCH 08/23] ARM: mach-bcmring: use proper constant to identify DMA memory area
  2011-11-16  5:48 [PATCH 0/23] mach/vmalloc.h removal, and ioremap optimization Nicolas Pitre
                   ` (6 preceding siblings ...)
  2011-11-16  5:48 ` [PATCH 07/23] ARM: plat-omap: " Nicolas Pitre
@ 2011-11-16  5:48 ` Nicolas Pitre
  2011-11-16  5:48 ` [PATCH 09/23] ARM: mach-orion5x: remove arch specific special handling for ioremap Nicolas Pitre
                   ` (16 subsequent siblings)
  24 siblings, 0 replies; 42+ messages in thread
From: Nicolas Pitre @ 2011-11-16  5:48 UTC (permalink / raw)
  To: linux-arm-kernel

From: Nicolas Pitre <nicolas.pitre@linaro.org>

Using VMALLOC_END implies a presumption about the layout which is best
avoided, even if in practice this would not change much.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
---
 arch/arm/mach-bcmring/dma.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-bcmring/dma.c b/arch/arm/mach-bcmring/dma.c
index b52b8de91b..8751582a6c 100644
--- a/arch/arm/mach-bcmring/dma.c
+++ b/arch/arm/mach-bcmring/dma.c
@@ -1614,7 +1614,7 @@ DMA_MemType_t dma_mem_type(void *addr)
 {
 	unsigned long addrVal = (unsigned long)addr;
 
-	if (addrVal >= VMALLOC_END) {
+	if (addrVal >= CONSISTENT_BASE) {
 		/* NOTE: DMA virtual memory space starts at 0xFFxxxxxx */
 
 		/* dma_alloc_xxx pages are physically and virtually contiguous */
-- 
1.7.7.1.431.g10b2a

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

* [PATCH 09/23] ARM: mach-orion5x: remove arch specific special handling for ioremap
  2011-11-16  5:48 [PATCH 0/23] mach/vmalloc.h removal, and ioremap optimization Nicolas Pitre
                   ` (7 preceding siblings ...)
  2011-11-16  5:48 ` [PATCH 08/23] ARM: mach-bcmring: use proper constant to identify DMA memory area Nicolas Pitre
@ 2011-11-16  5:48 ` Nicolas Pitre
  2011-11-16  5:48 ` [PATCH 10/23] ARM: mach-kirkwood: " Nicolas Pitre
                   ` (15 subsequent siblings)
  24 siblings, 0 replies; 42+ messages in thread
From: Nicolas Pitre @ 2011-11-16  5:48 UTC (permalink / raw)
  To: linux-arm-kernel

From: Nicolas Pitre <nicolas.pitre@linaro.org>

A generic version should replace this later.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
---
 arch/arm/mach-orion5x/include/mach/io.h |   25 -------------------------
 1 files changed, 0 insertions(+), 25 deletions(-)

diff --git a/arch/arm/mach-orion5x/include/mach/io.h b/arch/arm/mach-orion5x/include/mach/io.h
index c5196101a2..e9d9afdc26 100644
--- a/arch/arm/mach-orion5x/include/mach/io.h
+++ b/arch/arm/mach-orion5x/include/mach/io.h
@@ -15,31 +15,6 @@
 
 #define IO_SPACE_LIMIT		0xffffffff
 
-static inline void __iomem *
-__arch_ioremap(unsigned long paddr, size_t size, unsigned int mtype)
-{
-	void __iomem *retval;
-	unsigned long offs = paddr - ORION5X_REGS_PHYS_BASE;
-	if (mtype == MT_DEVICE && size && offs < ORION5X_REGS_SIZE &&
-	    size <= ORION5X_REGS_SIZE && offs + size <= ORION5X_REGS_SIZE) {
-		retval = (void __iomem *)ORION5X_REGS_VIRT_BASE + offs;
-	} else {
-		retval = __arm_ioremap(paddr, size, mtype);
-	}
-
-	return retval;
-}
-
-static inline void
-__arch_iounmap(void __iomem *addr)
-{
-	if (addr < (void __iomem *)ORION5X_REGS_VIRT_BASE ||
-	    addr >= (void __iomem *)(ORION5X_REGS_VIRT_BASE + ORION5X_REGS_SIZE))
-		__iounmap(addr);
-}
-
-#define __arch_ioremap		__arch_ioremap
-#define __arch_iounmap		__arch_iounmap
 #define __io(a)			__typesafe_io(a)
 #define __mem_pci(a)		(a)
 
-- 
1.7.7.1.431.g10b2a

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

* [PATCH 10/23] ARM: mach-kirkwood: remove arch specific special handling for ioremap
  2011-11-16  5:48 [PATCH 0/23] mach/vmalloc.h removal, and ioremap optimization Nicolas Pitre
                   ` (8 preceding siblings ...)
  2011-11-16  5:48 ` [PATCH 09/23] ARM: mach-orion5x: remove arch specific special handling for ioremap Nicolas Pitre
@ 2011-11-16  5:48 ` Nicolas Pitre
  2011-11-16  5:48 ` [PATCH 11/23] ARM: mach-ixp23xx: " Nicolas Pitre
                   ` (14 subsequent siblings)
  24 siblings, 0 replies; 42+ messages in thread
From: Nicolas Pitre @ 2011-11-16  5:48 UTC (permalink / raw)
  To: linux-arm-kernel

From: Nicolas Pitre <nicolas.pitre@linaro.org>

A generic version should replace this later.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
---
 arch/arm/mach-kirkwood/include/mach/io.h |   25 -------------------------
 1 files changed, 0 insertions(+), 25 deletions(-)

diff --git a/arch/arm/mach-kirkwood/include/mach/io.h b/arch/arm/mach-kirkwood/include/mach/io.h
index 1aaddc364f..49dd0cb5e1 100644
--- a/arch/arm/mach-kirkwood/include/mach/io.h
+++ b/arch/arm/mach-kirkwood/include/mach/io.h
@@ -19,31 +19,6 @@ static inline void __iomem *__io(unsigned long addr)
 					+ KIRKWOOD_PCIE_IO_VIRT_BASE);
 }
 
-static inline void __iomem *
-__arch_ioremap(unsigned long paddr, size_t size, unsigned int mtype)
-{
-	void __iomem *retval;
-	unsigned long offs = paddr - KIRKWOOD_REGS_PHYS_BASE;
-	if (mtype == MT_DEVICE && size && offs < KIRKWOOD_REGS_SIZE &&
-	    size <= KIRKWOOD_REGS_SIZE && offs + size <= KIRKWOOD_REGS_SIZE) {
-		retval = (void __iomem *)KIRKWOOD_REGS_VIRT_BASE + offs;
-	} else {
-		retval = __arm_ioremap(paddr, size, mtype);
-	}
-
-	return retval;
-}
-
-static inline void
-__arch_iounmap(void __iomem *addr)
-{
-	if (addr < (void __iomem *)KIRKWOOD_REGS_VIRT_BASE ||
-	    addr >= (void __iomem *)(KIRKWOOD_REGS_VIRT_BASE + KIRKWOOD_REGS_SIZE))
-		__iounmap(addr);
-}
-
-#define __arch_ioremap		__arch_ioremap
-#define __arch_iounmap		__arch_iounmap
 #define __io(a)			__io(a)
 #define __mem_pci(a)		(a)
 
-- 
1.7.7.1.431.g10b2a

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

* [PATCH 11/23] ARM: mach-ixp23xx: remove arch specific special handling for ioremap
  2011-11-16  5:48 [PATCH 0/23] mach/vmalloc.h removal, and ioremap optimization Nicolas Pitre
                   ` (9 preceding siblings ...)
  2011-11-16  5:48 ` [PATCH 10/23] ARM: mach-kirkwood: " Nicolas Pitre
@ 2011-11-16  5:48 ` Nicolas Pitre
  2011-11-18  0:03   ` Deepak Saxena
  2011-11-16  5:48 ` [PATCH 12/23] ARM: plat-iop: " Nicolas Pitre
                   ` (13 subsequent siblings)
  24 siblings, 1 reply; 42+ messages in thread
From: Nicolas Pitre @ 2011-11-16  5:48 UTC (permalink / raw)
  To: linux-arm-kernel

From: Nicolas Pitre <nicolas.pitre@linaro.org>

A generic version should replace this later.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
---
 arch/arm/mach-ixp23xx/include/mach/io.h |   29 -----------------------------
 1 files changed, 0 insertions(+), 29 deletions(-)

diff --git a/arch/arm/mach-ixp23xx/include/mach/io.h b/arch/arm/mach-ixp23xx/include/mach/io.h
index a1749d0fd8..4ce4353b9f 100644
--- a/arch/arm/mach-ixp23xx/include/mach/io.h
+++ b/arch/arm/mach-ixp23xx/include/mach/io.h
@@ -20,33 +20,4 @@
 #define __io(p)		((void __iomem*)((p) + IXP23XX_PCI_IO_VIRT))
 #define __mem_pci(a)	(a)
 
-static inline void __iomem *
-ixp23xx_ioremap(unsigned long addr, unsigned long size, unsigned int mtype)
-{
-	if (addr >= IXP23XX_PCI_MEM_START &&
-		addr <= IXP23XX_PCI_MEM_START + IXP23XX_PCI_MEM_SIZE) {
-		if (addr + size > IXP23XX_PCI_MEM_START + IXP23XX_PCI_MEM_SIZE)
-			return NULL;
-
-		return (void __iomem *)
- 			((addr - IXP23XX_PCI_MEM_START) + IXP23XX_PCI_MEM_VIRT);
-	}
-
-	return __arm_ioremap(addr, size, mtype);
-}
-
-static inline void
-ixp23xx_iounmap(void __iomem *addr)
-{
-	if ((((u32)addr) >= IXP23XX_PCI_MEM_VIRT) &&
-	    (((u32)addr) < IXP23XX_PCI_MEM_VIRT + IXP23XX_PCI_MEM_SIZE))
-		return;
-
-	__iounmap(addr);
-}
-
-#define __arch_ioremap	ixp23xx_ioremap
-#define __arch_iounmap	ixp23xx_iounmap
-
-
 #endif
-- 
1.7.7.1.431.g10b2a

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

* [PATCH 12/23] ARM: plat-iop: remove arch specific special handling for ioremap
  2011-11-16  5:48 [PATCH 0/23] mach/vmalloc.h removal, and ioremap optimization Nicolas Pitre
                   ` (10 preceding siblings ...)
  2011-11-16  5:48 ` [PATCH 11/23] ARM: mach-ixp23xx: " Nicolas Pitre
@ 2011-11-16  5:48 ` Nicolas Pitre
  2011-11-16  5:48 ` [PATCH 13/23] ARM: versatile: remove overlapping map_desc entry Nicolas Pitre
                   ` (12 subsequent siblings)
  24 siblings, 0 replies; 42+ messages in thread
From: Nicolas Pitre @ 2011-11-16  5:48 UTC (permalink / raw)
  To: linux-arm-kernel

From: Nicolas Pitre <nicolas.pitre@linaro.org>

A generic version should replace this later.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
---
 arch/arm/mach-iop32x/include/mach/io.h |    7 ----
 arch/arm/mach-iop33x/include/mach/io.h |    7 ----
 arch/arm/plat-iop/Makefile             |    2 -
 arch/arm/plat-iop/io.c                 |   59 --------------------------------
 4 files changed, 0 insertions(+), 75 deletions(-)
 delete mode 100644 arch/arm/plat-iop/io.c

diff --git a/arch/arm/mach-iop32x/include/mach/io.h b/arch/arm/mach-iop32x/include/mach/io.h
index 059c783ce0..2d88264b98 100644
--- a/arch/arm/mach-iop32x/include/mach/io.h
+++ b/arch/arm/mach-iop32x/include/mach/io.h
@@ -13,15 +13,8 @@
 
 #include <asm/hardware/iop3xx.h>
 
-extern void __iomem *__iop3xx_ioremap(unsigned long cookie, size_t size,
-	unsigned int mtype);
-extern void __iop3xx_iounmap(void __iomem *addr);
-
 #define IO_SPACE_LIMIT		0xffffffff
 #define __io(p)		((void __iomem *)IOP3XX_PCI_IO_PHYS_TO_VIRT(p))
 #define __mem_pci(a)		(a)
 
-#define __arch_ioremap	__iop3xx_ioremap
-#define __arch_iounmap	__iop3xx_iounmap
-
 #endif
diff --git a/arch/arm/mach-iop33x/include/mach/io.h b/arch/arm/mach-iop33x/include/mach/io.h
index 39e893e97c..a8a66fc8fb 100644
--- a/arch/arm/mach-iop33x/include/mach/io.h
+++ b/arch/arm/mach-iop33x/include/mach/io.h
@@ -13,15 +13,8 @@
 
 #include <asm/hardware/iop3xx.h>
 
-extern void __iomem *__iop3xx_ioremap(unsigned long cookie, size_t size,
-	unsigned int mtype);
-extern void __iop3xx_iounmap(void __iomem *addr);
-
 #define IO_SPACE_LIMIT		0xffffffff
 #define __io(p)		((void __iomem *)IOP3XX_PCI_IO_PHYS_TO_VIRT(p))
 #define __mem_pci(a)		(a)
 
-#define __arch_ioremap	__iop3xx_ioremap
-#define __arch_iounmap	__iop3xx_iounmap
-
 #endif
diff --git a/arch/arm/plat-iop/Makefile b/arch/arm/plat-iop/Makefile
index 69b09c1cec..90f7153a8d 100644
--- a/arch/arm/plat-iop/Makefile
+++ b/arch/arm/plat-iop/Makefile
@@ -10,7 +10,6 @@ obj-$(CONFIG_ARCH_IOP32X) += i2c.o
 obj-$(CONFIG_ARCH_IOP32X) += pci.o
 obj-$(CONFIG_ARCH_IOP32X) += setup.o
 obj-$(CONFIG_ARCH_IOP32X) += time.o
-obj-$(CONFIG_ARCH_IOP32X) += io.o
 obj-$(CONFIG_ARCH_IOP32X) += cp6.o
 obj-$(CONFIG_ARCH_IOP32X) += adma.o
 obj-$(CONFIG_ARCH_IOP32X) += pmu.o
@@ -21,7 +20,6 @@ obj-$(CONFIG_ARCH_IOP33X) += i2c.o
 obj-$(CONFIG_ARCH_IOP33X) += pci.o
 obj-$(CONFIG_ARCH_IOP33X) += setup.o
 obj-$(CONFIG_ARCH_IOP33X) += time.o
-obj-$(CONFIG_ARCH_IOP33X) += io.o
 obj-$(CONFIG_ARCH_IOP33X) += cp6.o
 obj-$(CONFIG_ARCH_IOP33X) += adma.o
 obj-$(CONFIG_ARCH_IOP33X) += pmu.o
diff --git a/arch/arm/plat-iop/io.c b/arch/arm/plat-iop/io.c
deleted file mode 100644
index e15bc17db9..0000000000
--- a/arch/arm/plat-iop/io.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * iop3xx custom ioremap implementation
- * Copyright (c) 2006, Intel Corporation.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place - Suite 330, Boston, MA 02111-1307 USA.
- *
- */
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/io.h>
-#include <mach/hardware.h>
-
-void * __iomem __iop3xx_ioremap(unsigned long cookie, size_t size,
-	unsigned int mtype)
-{
-	void __iomem * retval;
-
-	switch (cookie) {
-	case IOP3XX_PCI_LOWER_IO_PA ... IOP3XX_PCI_UPPER_IO_PA:
-		retval = (void *) IOP3XX_PCI_IO_PHYS_TO_VIRT(cookie);
-		break;
-	case IOP3XX_PERIPHERAL_PHYS_BASE ... IOP3XX_PERIPHERAL_UPPER_PA:
-		retval = (void *) IOP3XX_PMMR_PHYS_TO_VIRT(cookie);
-		break;
-	default:
-		retval = __arm_ioremap_caller(cookie, size, mtype,
-				__builtin_return_address(0));
-	}
-
-	return retval;
-}
-EXPORT_SYMBOL(__iop3xx_ioremap);
-
-void __iop3xx_iounmap(void __iomem *addr)
-{
-	extern void __iounmap(volatile void __iomem *addr);
-
-	switch ((u32) addr) {
-	case IOP3XX_PCI_LOWER_IO_VA ... IOP3XX_PCI_UPPER_IO_VA:
-	case IOP3XX_PERIPHERAL_VIRT_BASE ... IOP3XX_PERIPHERAL_UPPER_VA:
-		goto skip;
-	}
-	__iounmap(addr);
-
-skip:
-	return;
-}
-EXPORT_SYMBOL(__iop3xx_iounmap);
-- 
1.7.7.1.431.g10b2a

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

* [PATCH 13/23] ARM: versatile: remove overlapping map_desc entry
  2011-11-16  5:48 [PATCH 0/23] mach/vmalloc.h removal, and ioremap optimization Nicolas Pitre
                   ` (11 preceding siblings ...)
  2011-11-16  5:48 ` [PATCH 12/23] ARM: plat-iop: " Nicolas Pitre
@ 2011-11-16  5:48 ` Nicolas Pitre
  2011-11-16  5:48 ` [PATCH 14/23] ARM: realview: fix map_desc alignment Nicolas Pitre
                   ` (11 subsequent siblings)
  24 siblings, 0 replies; 42+ messages in thread
From: Nicolas Pitre @ 2011-11-16  5:48 UTC (permalink / raw)
  To: linux-arm-kernel

From: Rob Herring <rob.herring@calxeda.com>

The map_desc for VERSATILE_GPIO0_BASE overlaps with VERSATILE_SCTL_BASE.
The overlapping entry can be removed.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
---
 arch/arm/mach-versatile/core.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c
index e340a54251..4d8dfc15f3 100644
--- a/arch/arm/mach-versatile/core.c
+++ b/arch/arm/mach-versatile/core.c
@@ -141,11 +141,6 @@ static struct map_desc versatile_io_desc[] __initdata = {
 	},
 #ifdef CONFIG_MACH_VERSATILE_AB
  	{
-		.virtual	=  IO_ADDRESS(VERSATILE_GPIO0_BASE),
-		.pfn		= __phys_to_pfn(VERSATILE_GPIO0_BASE),
-		.length		= SZ_4K,
-		.type		= MT_DEVICE
-	}, {
 		.virtual	=  IO_ADDRESS(VERSATILE_IB2_BASE),
 		.pfn		= __phys_to_pfn(VERSATILE_IB2_BASE),
 		.length		= SZ_64M,
-- 
1.7.7.1.431.g10b2a

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

* [PATCH 14/23] ARM: realview: fix map_desc alignment
  2011-11-16  5:48 [PATCH 0/23] mach/vmalloc.h removal, and ioremap optimization Nicolas Pitre
                   ` (12 preceding siblings ...)
  2011-11-16  5:48 ` [PATCH 13/23] ARM: versatile: remove overlapping map_desc entry Nicolas Pitre
@ 2011-11-16  5:48 ` Nicolas Pitre
  2011-11-16  5:48 ` [PATCH 15/23] ARM: realview-eb11mp: " Nicolas Pitre
                   ` (10 subsequent siblings)
  24 siblings, 0 replies; 42+ messages in thread
From: Nicolas Pitre @ 2011-11-16  5:48 UTC (permalink / raw)
  To: linux-arm-kernel

From: Rob Herring <rob.herring@calxeda.com>

REALVIEW_PBX_TILE_GIC_CPU_BASE is not 4KB aligned which causes an
overlapping mapping. Use REALVIEW_PBX_TILE_SCU_BASE instead which is
aligned.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
---
 arch/arm/mach-realview/realview_pbx.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-realview/realview_pbx.c b/arch/arm/mach-realview/realview_pbx.c
index 63c4114afa..a15f5d6edb 100644
--- a/arch/arm/mach-realview/realview_pbx.c
+++ b/arch/arm/mach-realview/realview_pbx.c
@@ -98,8 +98,8 @@ static struct map_desc realview_pbx_io_desc[] __initdata = {
 
 static struct map_desc realview_local_io_desc[] __initdata = {
 	{
-		.virtual        = IO_ADDRESS(REALVIEW_PBX_TILE_GIC_CPU_BASE),
-		.pfn            = __phys_to_pfn(REALVIEW_PBX_TILE_GIC_CPU_BASE),
+		.virtual        = IO_ADDRESS(REALVIEW_PBX_TILE_SCU_BASE),
+		.pfn            = __phys_to_pfn(REALVIEW_PBX_TILE_SCU_BASE),
 		.length         = SZ_4K,
 		.type           = MT_DEVICE,
 	}, {
-- 
1.7.7.1.431.g10b2a

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

* [PATCH 15/23] ARM: realview-eb11mp: fix map_desc alignment
  2011-11-16  5:48 [PATCH 0/23] mach/vmalloc.h removal, and ioremap optimization Nicolas Pitre
                   ` (13 preceding siblings ...)
  2011-11-16  5:48 ` [PATCH 14/23] ARM: realview: fix map_desc alignment Nicolas Pitre
@ 2011-11-16  5:48 ` Nicolas Pitre
  2011-11-16  5:48 ` [PATCH 16/23] ARM: sort the meminfo array earlier Nicolas Pitre
                   ` (9 subsequent siblings)
  24 siblings, 0 replies; 42+ messages in thread
From: Nicolas Pitre @ 2011-11-16  5:48 UTC (permalink / raw)
  To: linux-arm-kernel

From: Rob Herring <rob.herring@calxeda.com>

REALVIEW_EB11MP_GIC_CPU_BASE is not 4KB aligned which causes an
overlapping mapping. Use REALVIEW_EB11MP_SCU_BASE instead which is
aligned.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
---
 arch/arm/mach-realview/realview_eb.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-realview/realview_eb.c b/arch/arm/mach-realview/realview_eb.c
index 026c66ad7e..a9874e176f 100644
--- a/arch/arm/mach-realview/realview_eb.c
+++ b/arch/arm/mach-realview/realview_eb.c
@@ -91,8 +91,8 @@ static struct map_desc realview_eb_io_desc[] __initdata = {
 
 static struct map_desc realview_eb11mp_io_desc[] __initdata = {
 	{
-		.virtual	= IO_ADDRESS(REALVIEW_EB11MP_GIC_CPU_BASE),
-		.pfn		= __phys_to_pfn(REALVIEW_EB11MP_GIC_CPU_BASE),
+		.virtual	= IO_ADDRESS(REALVIEW_EB11MP_SCU_BASE),
+		.pfn		= __phys_to_pfn(REALVIEW_EB11MP_SCU_BASE),
 		.length		= SZ_4K,
 		.type		= MT_DEVICE,
 	}, {
-- 
1.7.7.1.431.g10b2a

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

* [PATCH 16/23] ARM: sort the meminfo array earlier
  2011-11-16  5:48 [PATCH 0/23] mach/vmalloc.h removal, and ioremap optimization Nicolas Pitre
                   ` (14 preceding siblings ...)
  2011-11-16  5:48 ` [PATCH 15/23] ARM: realview-eb11mp: " Nicolas Pitre
@ 2011-11-16  5:48 ` Nicolas Pitre
  2011-11-16  5:48 ` [PATCH 17/23] ARM: move initialization of the high_memory variable earlier Nicolas Pitre
                   ` (8 subsequent siblings)
  24 siblings, 0 replies; 42+ messages in thread
From: Nicolas Pitre @ 2011-11-16  5:48 UTC (permalink / raw)
  To: linux-arm-kernel

From: Nicolas Pitre <nicolas.pitre@linaro.org>

The meminfo array has to be sorted before sanity_check_meminfo() in
arch/arm/mm/mmu.c is called for it to work properly.  This also allows
for a simpler find_limits() in arch/arm/mm/init.c.

The sort is moved to arch/arm/kernel/setup.c because that's where the
meminfo array is populated.  Eventually this should be improved upon
to make the memory bank parser a bit more robust against problems
such as overlapping memory ranges.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
---
 arch/arm/kernel/setup.c |    8 ++++++++
 arch/arm/mm/init.c      |   38 ++++++++------------------------------
 2 files changed, 16 insertions(+), 30 deletions(-)

diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 7e7977ab99..44510f8793 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -31,6 +31,7 @@
 #include <linux/memblock.h>
 #include <linux/bug.h>
 #include <linux/compiler.h>
+#include <linux/sort.h>
 
 #include <asm/unified.h>
 #include <asm/cpu.h>
@@ -888,6 +889,12 @@ static struct machine_desc * __init setup_machine_tags(unsigned int nr)
 	return mdesc;
 }
 
+static int __init meminfo_cmp(const void *_a, const void *_b)
+{
+	const struct membank *a = _a, *b = _b;
+	long cmp = bank_pfn_start(a) - bank_pfn_start(b);
+	return cmp < 0 ? -1 : cmp > 0 ? 1 : 0;
+}
 
 void __init setup_arch(char **cmdline_p)
 {
@@ -916,6 +923,7 @@ void __init setup_arch(char **cmdline_p)
 
 	parse_early_param();
 
+	sort(&meminfo.bank, meminfo.nr_banks, sizeof(meminfo.bank[0]), meminfo_cmp, NULL);
 	sanity_check_meminfo();
 	arm_memblock_init(&meminfo, mdesc);
 
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index fbdd12ea3a..d366051e14 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -20,7 +20,6 @@
 #include <linux/highmem.h>
 #include <linux/gfp.h>
 #include <linux/memblock.h>
-#include <linux/sort.h>
 
 #include <asm/mach-types.h>
 #include <asm/prom.h>
@@ -134,30 +133,18 @@ void show_mem(unsigned int filter)
 }
 
 static void __init find_limits(unsigned long *min, unsigned long *max_low,
-	unsigned long *max_high)
+			       unsigned long *max_high)
 {
 	struct meminfo *mi = &meminfo;
 	int i;
 
-	*min = -1UL;
-	*max_low = *max_high = 0;
-
-	for_each_bank (i, mi) {
-		struct membank *bank = &mi->bank[i];
-		unsigned long start, end;
-
-		start = bank_pfn_start(bank);
-		end = bank_pfn_end(bank);
-
-		if (*min > start)
-			*min = start;
-		if (*max_high < end)
-			*max_high = end;
-		if (bank->highmem)
-			continue;
-		if (*max_low < end)
-			*max_low = end;
-	}
+	/* This assumes the meminfo array is properly sorted */
+	*min = bank_pfn_start(&mi->bank[0]);
+	for_each_bank (i, mi)
+		if (mi->bank[i].highmem)
+				break;
+	*max_low = bank_pfn_end(&mi->bank[i - 1]);
+	*max_high = bank_pfn_end(&mi->bank[mi->nr_banks - 1]);
 }
 
 static void __init arm_bootmem_init(unsigned long start_pfn,
@@ -319,19 +306,10 @@ static void arm_memory_present(void)
 }
 #endif
 
-static int __init meminfo_cmp(const void *_a, const void *_b)
-{
-	const struct membank *a = _a, *b = _b;
-	long cmp = bank_pfn_start(a) - bank_pfn_start(b);
-	return cmp < 0 ? -1 : cmp > 0 ? 1 : 0;
-}
-
 void __init arm_memblock_init(struct meminfo *mi, struct machine_desc *mdesc)
 {
 	int i;
 
-	sort(&meminfo.bank, meminfo.nr_banks, sizeof(meminfo.bank[0]), meminfo_cmp, NULL);
-
 	memblock_init();
 	for (i = 0; i < mi->nr_banks; i++)
 		memblock_add(mi->bank[i].start, mi->bank[i].size);
-- 
1.7.7.1.431.g10b2a

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

* [PATCH 17/23] ARM: move initialization of the high_memory variable earlier
  2011-11-16  5:48 [PATCH 0/23] mach/vmalloc.h removal, and ioremap optimization Nicolas Pitre
                   ` (15 preceding siblings ...)
  2011-11-16  5:48 ` [PATCH 16/23] ARM: sort the meminfo array earlier Nicolas Pitre
@ 2011-11-16  5:48 ` Nicolas Pitre
  2011-11-16  5:48 ` [PATCH 18/23] mm: add vm_area_add_early() Nicolas Pitre
                   ` (7 subsequent siblings)
  24 siblings, 0 replies; 42+ messages in thread
From: Nicolas Pitre @ 2011-11-16  5:48 UTC (permalink / raw)
  To: linux-arm-kernel

From: Nicolas Pitre <nicolas.pitre@linaro.org>

Some upcoming changes must know the VMALLOC_START value, which is based
on high_memory, before bootmem_init() is called.

The best location to set it is in sanity_check_meminfo() where the needed
computation is already done, and in the non MMU case it is trivial to do
now that the meminfo array is already sorted at that point.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
---
 arch/arm/mm/init.c  |    2 --
 arch/arm/mm/mmu.c   |    1 +
 arch/arm/mm/nommu.c |    2 ++
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index d366051e14..786adddf1a 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -381,8 +381,6 @@ void __init bootmem_init(void)
 	 */
 	arm_bootmem_free(min, max_low, max_high);
 
-	high_memory = __va(((phys_addr_t)max_low << PAGE_SHIFT) - 1) + 1;
-
 	/*
 	 * This doesn't seem to be used by the Linux memory manager any
 	 * more, but is used by ll_rw_block.  If we can get rid of it, we
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index dc8c550e6c..0aa8b7d5b2 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -860,6 +860,7 @@ void __init sanity_check_meminfo(void)
 	}
 #endif
 	meminfo.nr_banks = j;
+	high_memory = __va(lowmem_limit - 1) + 1;
 	memblock_set_current_limit(lowmem_limit);
 }
 
diff --git a/arch/arm/mm/nommu.c b/arch/arm/mm/nommu.c
index 941a98c9e8..9348730a6b 100644
--- a/arch/arm/mm/nommu.c
+++ b/arch/arm/mm/nommu.c
@@ -29,6 +29,8 @@ void __init arm_mm_memblock_reserve(void)
 
 void __init sanity_check_meminfo(void)
 {
+	phys_addr_t end = bank_phys_end(&meminfo.bank[meminfo.nr_banks - 1]);
+	high_memory = __va(end - 1) + 1;
 }
 
 /*
-- 
1.7.7.1.431.g10b2a

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

* [PATCH 18/23] mm: add vm_area_add_early()
  2011-11-16  5:48 [PATCH 0/23] mach/vmalloc.h removal, and ioremap optimization Nicolas Pitre
                   ` (16 preceding siblings ...)
  2011-11-16  5:48 ` [PATCH 17/23] ARM: move initialization of the high_memory variable earlier Nicolas Pitre
@ 2011-11-16  5:48 ` Nicolas Pitre
  2011-11-16  5:48 ` [PATCH 19/23] ARM: move iotable mappings within the vmalloc region Nicolas Pitre
                   ` (6 subsequent siblings)
  24 siblings, 0 replies; 42+ messages in thread
From: Nicolas Pitre @ 2011-11-16  5:48 UTC (permalink / raw)
  To: linux-arm-kernel

From: Nicolas Pitre <nicolas.pitre@linaro.org>

The existing vm_area_register_early() allows for early vmalloc space
allocation.  However upcoming cleanups in the ARM architecture require
that some fixed locations in the vmalloc area be reserved also very early.

The name "vm_area_register_early" would have been a good name for the
reservation part without the allocation.  Since it is already in use with
different semantics, let's create vm_area_add_early() instead.

Both vm_area_register_early() and vm_area_add_early() can be used together
meaning that the former is now implemented using the later where it is
ensured that no conflicting areas are added, but no attempt is made to
make the allocation scheme in vm_area_register_early() more sophisticated.
After all, you must know what you're doing when using those functions.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Cc: linux-mm at kvack.org
---
 include/linux/vmalloc.h |    1 +
 mm/vmalloc.c            |   28 ++++++++++++++++++++++++++--
 2 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h
index 687fb11e20..4115d6aa80 100644
--- a/include/linux/vmalloc.h
+++ b/include/linux/vmalloc.h
@@ -131,6 +131,7 @@ extern long vwrite(char *buf, char *addr, unsigned long count);
  */
 extern rwlock_t vmlist_lock;
 extern struct vm_struct *vmlist;
+extern __init void vm_area_add_early(struct vm_struct *vm);
 extern __init void vm_area_register_early(struct vm_struct *vm, size_t align);
 
 #ifdef CONFIG_SMP
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index b669aa6f6c..3f6a3f1aa8 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -1118,6 +1118,31 @@ void *vm_map_ram(struct page **pages, unsigned int count, int node, pgprot_t pro
 EXPORT_SYMBOL(vm_map_ram);
 
 /**
+ * vm_area_add_early - add vmap area early during boot
+ * @vm: vm_struct to add
+ *
+ * This function is used to add fixed kernel vm area to vmlist before
+ * vmalloc_init() is called.  @vm->addr, @vm->size, and @vm->flags
+ * should contain proper values and the other fields should be zero.
+ *
+ * DO NOT USE THIS FUNCTION UNLESS YOU KNOW WHAT YOU'RE DOING.
+ */
+void __init vm_area_add_early(struct vm_struct *vm)
+{
+	struct vm_struct *tmp, **p;
+
+	for (p = &vmlist; (tmp = *p) != NULL; p = &tmp->next) {
+		if (tmp->addr >= vm->addr) {
+			BUG_ON(tmp->addr < vm->addr + vm->size);
+			break;
+		} else
+			BUG_ON(tmp->addr + tmp->size > vm->addr);
+	}
+	vm->next = *p;
+	*p = vm;
+}
+
+/**
  * vm_area_register_early - register vmap area early during boot
  * @vm: vm_struct to register
  * @align: requested alignment
@@ -1139,8 +1164,7 @@ void __init vm_area_register_early(struct vm_struct *vm, size_t align)
 
 	vm->addr = (void *)addr;
 
-	vm->next = vmlist;
-	vmlist = vm;
+	vm_area_add_early(vm);
 }
 
 void __init vmalloc_init(void)
-- 
1.7.7.1.431.g10b2a

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

* [PATCH 19/23] ARM: move iotable mappings within the vmalloc region
  2011-11-16  5:48 [PATCH 0/23] mach/vmalloc.h removal, and ioremap optimization Nicolas Pitre
                   ` (17 preceding siblings ...)
  2011-11-16  5:48 ` [PATCH 18/23] mm: add vm_area_add_early() Nicolas Pitre
@ 2011-11-16  5:48 ` Nicolas Pitre
  2011-11-16  5:48 ` [PATCH 20/23] ARM: simplify __iounmap() when dealing with section based mapping Nicolas Pitre
                   ` (5 subsequent siblings)
  24 siblings, 0 replies; 42+ messages in thread
From: Nicolas Pitre @ 2011-11-16  5:48 UTC (permalink / raw)
  To: linux-arm-kernel

From: Nicolas Pitre <nicolas.pitre@linaro.org>

In order to remove the build time variation between different SOCs with
regards to VMALLOC_END, the iotable mappings are now allocated inside
the vmalloc region.  This allows for VMALLOC_END to be identical across
all machines.

The value for VMALLOC_END is now set to 0xff000000 which is right where
the consistent DMA area starts.

To accommodate all static mappings on machines with possible highmem usage,
the default vmalloc area size is changed to 240 MB so that VMALLOC_START
is no higher than 0xf0000000 by default.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
---
 Documentation/arm/memory.txt   |   11 ++++-----
 arch/arm/include/asm/pgtable.h |    8 +-----
 arch/arm/mm/mmu.c              |   48 +++++++++++++++++++++++++++------------
 3 files changed, 39 insertions(+), 28 deletions(-)

diff --git a/Documentation/arm/memory.txt b/Documentation/arm/memory.txt
index 771d48d3b3..208a2d465b 100644
--- a/Documentation/arm/memory.txt
+++ b/Documentation/arm/memory.txt
@@ -51,15 +51,14 @@ ffc00000	ffefffff	DMA memory mapping region.  Memory returned
 ff000000	ffbfffff	Reserved for future expansion of DMA
 				mapping region.
 
-VMALLOC_END	feffffff	Free for platform use, recommended.
-				VMALLOC_END must be aligned to a 2MB
-				boundary.
-
 VMALLOC_START	VMALLOC_END-1	vmalloc() / ioremap() space.
 				Memory returned by vmalloc/ioremap will
 				be dynamically placed in this region.
-				VMALLOC_START may be based upon the value
-				of the high_memory variable.
+				Machine specific static mappings are also
+				located here through iotable_init().
+				VMALLOC_START is based upon the value
+				of the high_memory variable, and VMALLOC_END
+				is equal to 0xff000000.
 
 PAGE_OFFSET	high_memory-1	Kernel direct-mapped RAM region.
 				This maps the platforms RAM, and typically
diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h
index 9451dce3a5..6cdd55cb0b 100644
--- a/arch/arm/include/asm/pgtable.h
+++ b/arch/arm/include/asm/pgtable.h
@@ -21,7 +21,6 @@
 #else
 
 #include <asm/memory.h>
-#include <mach/vmalloc.h>
 #include <asm/pgtable-hwdef.h>
 
 #include <asm/pgtable-2level.h>
@@ -33,15 +32,10 @@
  * any out-of-bounds memory accesses will hopefully be caught.
  * The vmalloc() routines leaves a hole of 4kB between each vmalloced
  * area for the same reason. ;)
- *
- * Note that platforms may override VMALLOC_START, but they must provide
- * VMALLOC_END.  VMALLOC_END defines the (exclusive) limit of this space,
- * which may not overlap IO space.
  */
-#ifndef VMALLOC_START
 #define VMALLOC_OFFSET		(8*1024*1024)
 #define VMALLOC_START		(((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
-#endif
+#define VMALLOC_END		0xff000000UL
 
 #define LIBRARY_TEXT_START	0x0c000000
 
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 0aa8b7d5b2..942ca8f369 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -15,6 +15,7 @@
 #include <linux/nodemask.h>
 #include <linux/memblock.h>
 #include <linux/fs.h>
+#include <linux/vmalloc.h>
 
 #include <asm/cputype.h>
 #include <asm/sections.h>
@@ -529,13 +530,18 @@ EXPORT_SYMBOL(phys_mem_access_prot);
 
 #define vectors_base()	(vectors_high() ? 0xffff0000 : 0)
 
-static void __init *early_alloc(unsigned long sz)
+static void __init *early_alloc_aligned(unsigned long sz, unsigned long align)
 {
-	void *ptr = __va(memblock_alloc(sz, sz));
+	void *ptr = __va(memblock_alloc(sz, align));
 	memset(ptr, 0, sz);
 	return ptr;
 }
 
+static void __init *early_alloc(unsigned long sz)
+{
+	return early_alloc_aligned(sz, sz);
+}
+
 static pte_t * __init early_pte_alloc(pmd_t *pmd, unsigned long addr, unsigned long prot)
 {
 	if (pmd_none(*pmd)) {
@@ -685,9 +691,10 @@ static void __init create_mapping(struct map_desc *md)
 	}
 
 	if ((md->type == MT_DEVICE || md->type == MT_ROM) &&
-	    md->virtual >= PAGE_OFFSET && md->virtual < VMALLOC_END) {
+	    md->virtual >= PAGE_OFFSET &&
+	    (md->virtual < VMALLOC_START || md->virtual >= VMALLOC_END)) {
 		printk(KERN_WARNING "BUG: mapping for 0x%08llx"
-		       " at 0x%08lx overlaps vmalloc space\n",
+		       " at 0x%08lx out of vmalloc space\n",
 		       (long long)__pfn_to_phys((u64)md->pfn), md->virtual);
 	}
 
@@ -729,18 +736,29 @@ static void __init create_mapping(struct map_desc *md)
  */
 void __init iotable_init(struct map_desc *io_desc, int nr)
 {
-	int i;
-
-	for (i = 0; i < nr; i++)
-		create_mapping(io_desc + i);
+	struct map_desc *md;
+	struct vm_struct *vm;
+
+	vm = early_alloc_aligned(sizeof(*vm) * nr, __alignof__(*vm));
+
+	for (md = io_desc; nr; md++, nr--) {
+		create_mapping(md);
+		vm->addr = (void *)(md->virtual & PAGE_MASK);
+		vm->size = PAGE_ALIGN(md->length + (md->virtual & ~PAGE_MASK));
+		vm->phys_addr = __pfn_to_phys(md->pfn); 
+		vm->flags = VM_IOREMAP;
+		vm->caller = iotable_init;
+		vm_area_add_early(vm++);
+	}
 }
 
-static void * __initdata vmalloc_min = (void *)(VMALLOC_END - SZ_128M);
+static void * __initdata vmalloc_min =
+	(void *)(VMALLOC_END - (240 << 20) - VMALLOC_OFFSET);
 
 /*
  * vmalloc=size forces the vmalloc area to be exactly 'size'
  * bytes. This can be used to increase (or decrease) the vmalloc
- * area - the default is 128m.
+ * area - the default is 240m.
  */
 static int __init early_vmalloc(char *arg)
 {
@@ -891,10 +909,10 @@ static inline void prepare_page_table(void)
 
 	/*
 	 * Clear out all the kernel space mappings, except for the first
-	 * memory bank, up to the end of the vmalloc region.
+	 * memory bank, up to the vmalloc region.
 	 */
 	for (addr = __phys_to_virt(end);
-	     addr < VMALLOC_END; addr += PMD_SIZE)
+	     addr < VMALLOC_START; addr += PMD_SIZE)
 		pmd_clear(pmd_off_k(addr));
 }
 
@@ -921,8 +939,8 @@ void __init arm_mm_memblock_reserve(void)
 }
 
 /*
- * Set up device the mappings.  Since we clear out the page tables for all
- * mappings above VMALLOC_END, we will remove any debug device mappings.
+ * Set up the device mappings.  Since we clear out the page tables for all
+ * mappings above VMALLOC_START, we will remove any debug device mappings.
  * This means you have to be careful how you debug this function, or any
  * called function.  This means you can't use any function or debugging
  * method which may touch any device, otherwise the kernel _will_ crash.
@@ -937,7 +955,7 @@ static void __init devicemaps_init(struct machine_desc *mdesc)
 	 */
 	vectors_page = early_alloc(PAGE_SIZE);
 
-	for (addr = VMALLOC_END; addr; addr += PMD_SIZE)
+	for (addr = VMALLOC_START; addr; addr += PMD_SIZE)
 		pmd_clear(pmd_off_k(addr));
 
 	/*
-- 
1.7.7.1.431.g10b2a

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

* [PATCH 20/23] ARM: simplify __iounmap() when dealing with section based mapping
  2011-11-16  5:48 [PATCH 0/23] mach/vmalloc.h removal, and ioremap optimization Nicolas Pitre
                   ` (18 preceding siblings ...)
  2011-11-16  5:48 ` [PATCH 19/23] ARM: move iotable mappings within the vmalloc region Nicolas Pitre
@ 2011-11-16  5:48 ` Nicolas Pitre
  2011-11-16  5:48 ` [PATCH 21/23] ARM: add generic ioremap optimization by reusing static mappings Nicolas Pitre
                   ` (4 subsequent siblings)
  24 siblings, 0 replies; 42+ messages in thread
From: Nicolas Pitre @ 2011-11-16  5:48 UTC (permalink / raw)
  To: linux-arm-kernel

From: Nicolas Pitre <nicolas.pitre@linaro.org>

Firstly, there is no need to have a double pointer here as we're only
walking the vmlist and not modifying it.

Secondly, for the same reason, we don't need a write lock but only a
read lock here, since the lock only protects the coherency of the list
nothing else.

Lastly, the reason for holding a lock is not what the comment says, so
let's remove that misleading piece of information.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
---
 arch/arm/mm/ioremap.c |   20 +++++++++-----------
 1 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c
index bdb248c4f5..bc7d9bd766 100644
--- a/arch/arm/mm/ioremap.c
+++ b/arch/arm/mm/ioremap.c
@@ -314,26 +314,24 @@ void __iounmap(volatile void __iomem *io_addr)
 {
 	void *addr = (void *)(PAGE_MASK & (unsigned long)io_addr);
 #ifndef CONFIG_SMP
-	struct vm_struct **p, *tmp;
+	struct vm_struct *vm;
 
 	/*
 	 * If this is a section based mapping we need to handle it
 	 * specially as the VM subsystem does not know how to handle
-	 * such a beast. We need the lock here b/c we need to clear
-	 * all the mappings before the area can be reclaimed
-	 * by someone else.
+	 * such a beast.
 	 */
-	write_lock(&vmlist_lock);
-	for (p = &vmlist ; (tmp = *p) ; p = &tmp->next) {
-		if ((tmp->flags & VM_IOREMAP) && (tmp->addr == addr)) {
-			if (tmp->flags & VM_ARM_SECTION_MAPPING) {
-				unmap_area_sections((unsigned long)tmp->addr,
-						    tmp->size);
+	read_lock(&vmlist_lock);
+	for (vm = vmlist; vm; vm = vm->next) {
+		if ((vm->flags & VM_IOREMAP) && (vm->addr == addr)) {
+			if (vm->flags & VM_ARM_SECTION_MAPPING) {
+				unmap_area_sections((unsigned long)vm->addr,
+						    vm->size);
 			}
 			break;
 		}
 	}
-	write_unlock(&vmlist_lock);
+	read_unlock(&vmlist_lock);
 #endif
 
 	vunmap(addr);
-- 
1.7.7.1.431.g10b2a

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

* [PATCH 21/23] ARM: add generic ioremap optimization by reusing static mappings
  2011-11-16  5:48 [PATCH 0/23] mach/vmalloc.h removal, and ioremap optimization Nicolas Pitre
                   ` (19 preceding siblings ...)
  2011-11-16  5:48 ` [PATCH 20/23] ARM: simplify __iounmap() when dealing with section based mapping Nicolas Pitre
@ 2011-11-16  5:48 ` Nicolas Pitre
  2011-11-22 10:16   ` Russell King - ARM Linux
  2011-11-16  5:48 ` [PATCH 22/23] ARM: big removal of now unused vmalloc.h files Nicolas Pitre
                   ` (3 subsequent siblings)
  24 siblings, 1 reply; 42+ messages in thread
From: Nicolas Pitre @ 2011-11-16  5:48 UTC (permalink / raw)
  To: linux-arm-kernel

From: Nicolas Pitre <nicolas.pitre@linaro.org>

Now that we have all the static mappings from iotable_init() located
in the vmalloc area, it is trivial to optimize ioremap by reusing those
static mappings when the requested physical area fits in one of them,
and so in a generic way for all platforms.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
---
 arch/arm/mm/ioremap.c |   72 ++++++++++++++++++++++++++++++++----------------
 arch/arm/mm/mm.h      |   14 +++++++++
 arch/arm/mm/mmu.c     |    3 +-
 3 files changed, 64 insertions(+), 25 deletions(-)

diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c
index bc7d9bd766..12c7ad215c 100644
--- a/arch/arm/mm/ioremap.c
+++ b/arch/arm/mm/ioremap.c
@@ -36,12 +36,6 @@
 #include <asm/mach/map.h>
 #include "mm.h"
 
-/*
- * Used by ioremap() and iounmap() code to mark (super)section-mapped
- * I/O regions in vm_struct->flags field.
- */
-#define VM_ARM_SECTION_MAPPING	0x80000000
-
 int ioremap_page(unsigned long virt, unsigned long phys,
 		 const struct mem_type *mtype)
 {
@@ -201,12 +195,6 @@ void __iomem * __arm_ioremap_pfn_caller(unsigned long pfn,
 	if (pfn >= 0x100000 && (__pfn_to_phys(pfn) & ~SUPERSECTION_MASK))
 		return NULL;
 
-	/*
-	 * Don't allow RAM to be mapped - this causes problems with ARMv6+
-	 */
-	if (WARN_ON(pfn_valid(pfn)))
-		return NULL;
-
 	type = get_mem_type(mtype);
 	if (!type)
 		return NULL;
@@ -216,6 +204,34 @@ void __iomem * __arm_ioremap_pfn_caller(unsigned long pfn,
 	 */
 	size = PAGE_ALIGN(offset + size);
 
+	/*
+	 * Try to reuse one of the static mapping whenever possible.
+	 */
+	read_lock(&vmlist_lock);
+	for (area = vmlist; area; area = area->next) {
+		if (!size || (sizeof(phys_addr_t) == 4 && pfn >= 0x100000))
+			break;
+		if (!(area->flags & VM_ARM_STATIC_MAPPING))
+			continue;
+		if ((area->flags & VM_ARM_MTYPE_MASK) != VM_ARM_MTYPE(mtype))
+			continue;
+		if (__phys_to_pfn(area->phys_addr) > pfn ||
+		    __pfn_to_phys(pfn) + size-1 > area->phys_addr + area->size-1)
+			continue;
+		/* we can drop the lock here as we know *area is static */
+		read_unlock(&vmlist_lock);
+		addr = (unsigned long)area->addr;
+		addr += __pfn_to_phys(pfn) - area->phys_addr;
+		return (void __iomem *) (offset + addr);
+	}
+	read_unlock(&vmlist_lock);
+
+	/*
+	 * Don't allow RAM to be mapped - this causes problems with ARMv6+
+	 */
+	if (WARN_ON(pfn_valid(pfn)))
+		return NULL;
+
 	area = get_vm_area_caller(size, VM_IOREMAP, caller);
  	if (!area)
  		return NULL;
@@ -313,26 +329,34 @@ __arm_ioremap_exec(unsigned long phys_addr, size_t size, bool cached)
 void __iounmap(volatile void __iomem *io_addr)
 {
 	void *addr = (void *)(PAGE_MASK & (unsigned long)io_addr);
-#ifndef CONFIG_SMP
 	struct vm_struct *vm;
 
-	/*
-	 * If this is a section based mapping we need to handle it
-	 * specially as the VM subsystem does not know how to handle
-	 * such a beast.
-	 */
 	read_lock(&vmlist_lock);
 	for (vm = vmlist; vm; vm = vm->next) {
-		if ((vm->flags & VM_IOREMAP) && (vm->addr == addr)) {
-			if (vm->flags & VM_ARM_SECTION_MAPPING) {
-				unmap_area_sections((unsigned long)vm->addr,
-						    vm->size);
-			}
+		if (vm->addr > addr)
 			break;
+		if (!(vm->flags & VM_IOREMAP))
+			continue;
+		/* If this is a static mapping we must leave it alone */
+		if ((vm->flags & VM_ARM_STATIC_MAPPING) &&
+		    (vm->addr <= addr) && (vm->addr + vm->size > addr)) {
+			read_unlock(&vmlist_lock);
+			return;
 		}
+#ifndef CONFIG_SMP
+		/*
+		 * If this is a section based mapping we need to handle it
+		 * specially as the VM subsystem does not know how to handle
+		 * such a beast.
+		 */
+		if ((vm->addr == addr) &&
+		    (vm->flags & VM_ARM_SECTION_MAPPING)) {
+			unmap_area_sections((unsigned long)vm->addr, vm->size);
+			break;
+		}
+#endif
 	}
 	read_unlock(&vmlist_lock);
-#endif
 
 	vunmap(addr);
 }
diff --git a/arch/arm/mm/mm.h b/arch/arm/mm/mm.h
index ad7cce3bc4..70f6d3ea48 100644
--- a/arch/arm/mm/mm.h
+++ b/arch/arm/mm/mm.h
@@ -21,6 +21,20 @@ const struct mem_type *get_mem_type(unsigned int type);
 
 extern void __flush_dcache_page(struct address_space *mapping, struct page *page);
 
+/*
+ * ARM specific vm_struct->flags bits.
+ */
+
+/* (super)section-mapped I/O regions used by ioremap()/iounmap() */
+#define VM_ARM_SECTION_MAPPING	0x80000000
+
+/* permanent static mappings from iotable_init() */
+#define VM_ARM_STATIC_MAPPING	0x40000000
+
+/* mapping type (attributes) for permanent static mappings */
+#define VM_ARM_MTYPE(mt)		((mt) << 20)
+#define VM_ARM_MTYPE_MASK	(0x1f << 20)
+
 #endif
 
 #ifdef CONFIG_ZONE_DMA
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 942ca8f369..acb2c7ec0a 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -746,7 +746,8 @@ void __init iotable_init(struct map_desc *io_desc, int nr)
 		vm->addr = (void *)(md->virtual & PAGE_MASK);
 		vm->size = PAGE_ALIGN(md->length + (md->virtual & ~PAGE_MASK));
 		vm->phys_addr = __pfn_to_phys(md->pfn); 
-		vm->flags = VM_IOREMAP;
+		vm->flags = VM_IOREMAP | VM_ARM_STATIC_MAPPING; 
+		vm->flags |= VM_ARM_MTYPE(md->type);
 		vm->caller = iotable_init;
 		vm_area_add_early(vm++);
 	}
-- 
1.7.7.1.431.g10b2a

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

* [PATCH 22/23] ARM: big removal of now unused vmalloc.h files
  2011-11-16  5:48 [PATCH 0/23] mach/vmalloc.h removal, and ioremap optimization Nicolas Pitre
                   ` (20 preceding siblings ...)
  2011-11-16  5:48 ` [PATCH 21/23] ARM: add generic ioremap optimization by reusing static mappings Nicolas Pitre
@ 2011-11-16  5:48 ` Nicolas Pitre
  2011-11-16  5:48 ` [PATCH 23/23] ARM: move VMALLOC_END down temporarily for shmobile Nicolas Pitre
                   ` (2 subsequent siblings)
  24 siblings, 0 replies; 42+ messages in thread
From: Nicolas Pitre @ 2011-11-16  5:48 UTC (permalink / raw)
  To: linux-arm-kernel

From: Nicolas Pitre <nicolas.pitre@linaro.org>

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
---
 arch/arm/mach-at91/include/mach/vmalloc.h       |   28 -----------------------
 arch/arm/mach-bcmring/include/mach/vmalloc.h    |   25 --------------------
 arch/arm/mach-clps711x/include/mach/vmalloc.h   |   20 ----------------
 arch/arm/mach-cns3xxx/include/mach/vmalloc.h    |   11 ---------
 arch/arm/mach-davinci/include/mach/vmalloc.h    |   14 -----------
 arch/arm/mach-dove/include/mach/vmalloc.h       |    5 ----
 arch/arm/mach-ebsa110/include/mach/vmalloc.h    |   10 --------
 arch/arm/mach-ep93xx/include/mach/vmalloc.h     |    5 ----
 arch/arm/mach-exynos/include/mach/vmalloc.h     |   22 ------------------
 arch/arm/mach-footbridge/include/mach/vmalloc.h |   10 --------
 arch/arm/mach-gemini/include/mach/vmalloc.h     |   10 --------
 arch/arm/mach-h720x/include/mach/vmalloc.h      |   10 --------
 arch/arm/mach-highbank/include/mach/vmalloc.h   |    1 -
 arch/arm/mach-integrator/include/mach/vmalloc.h |   20 ----------------
 arch/arm/mach-iop13xx/include/mach/vmalloc.h    |    4 ---
 arch/arm/mach-iop32x/include/mach/vmalloc.h     |    5 ----
 arch/arm/mach-iop33x/include/mach/vmalloc.h     |    5 ----
 arch/arm/mach-ixp2000/include/mach/vmalloc.h    |   20 ----------------
 arch/arm/mach-ixp23xx/include/mach/vmalloc.h    |   10 --------
 arch/arm/mach-ixp4xx/include/mach/vmalloc.h     |    5 ----
 arch/arm/mach-kirkwood/include/mach/vmalloc.h   |    5 ----
 arch/arm/mach-ks8695/include/mach/vmalloc.h     |   19 ---------------
 arch/arm/mach-lpc32xx/include/mach/vmalloc.h    |   24 -------------------
 arch/arm/mach-mmp/include/mach/vmalloc.h        |    5 ----
 arch/arm/mach-msm/include/mach/vmalloc.h        |   22 ------------------
 arch/arm/mach-mv78xx0/include/mach/vmalloc.h    |    5 ----
 arch/arm/mach-mxs/include/mach/vmalloc.h        |   22 ------------------
 arch/arm/mach-netx/include/mach/vmalloc.h       |   19 ---------------
 arch/arm/mach-nomadik/include/mach/vmalloc.h    |    2 -
 arch/arm/mach-omap1/include/mach/vmalloc.h      |   20 ----------------
 arch/arm/mach-omap2/include/mach/vmalloc.h      |   20 ----------------
 arch/arm/mach-orion5x/include/mach/vmalloc.h    |    5 ----
 arch/arm/mach-picoxcell/include/mach/vmalloc.h  |   14 -----------
 arch/arm/mach-pnx4008/include/mach/vmalloc.h    |   20 ----------------
 arch/arm/mach-prima2/include/mach/vmalloc.h     |   16 -------------
 arch/arm/mach-pxa/include/mach/vmalloc.h        |   11 ---------
 arch/arm/mach-realview/include/mach/vmalloc.h   |   21 -----------------
 arch/arm/mach-rpc/include/mach/vmalloc.h        |   10 --------
 arch/arm/mach-s3c2410/include/mach/vmalloc.h    |   20 ----------------
 arch/arm/mach-s3c64xx/include/mach/vmalloc.h    |   20 ----------------
 arch/arm/mach-s5p64x0/include/mach/vmalloc.h    |   20 ----------------
 arch/arm/mach-s5pc100/include/mach/vmalloc.h    |   17 --------------
 arch/arm/mach-s5pv210/include/mach/vmalloc.h    |   22 ------------------
 arch/arm/mach-sa1100/include/mach/vmalloc.h     |    4 ---
 arch/arm/mach-shark/include/mach/vmalloc.h      |    4 ---
 arch/arm/mach-shmobile/include/mach/vmalloc.h   |    7 -----
 arch/arm/mach-spear3xx/include/mach/vmalloc.h   |   19 ---------------
 arch/arm/mach-spear6xx/include/mach/vmalloc.h   |   19 ---------------
 arch/arm/mach-tegra/include/mach/vmalloc.h      |   28 -----------------------
 arch/arm/mach-u300/include/mach/vmalloc.h       |   12 ---------
 arch/arm/mach-ux500/include/mach/vmalloc.h      |   18 --------------
 arch/arm/mach-versatile/include/mach/vmalloc.h  |   21 -----------------
 arch/arm/mach-vexpress/include/mach/vmalloc.h   |   21 -----------------
 arch/arm/mach-vt8500/include/mach/vmalloc.h     |   20 ----------------
 arch/arm/mach-w90x900/include/mach/vmalloc.h    |   23 ------------------
 arch/arm/mach-zynq/include/mach/vmalloc.h       |   20 ----------------
 arch/arm/plat-mxc/include/mach/vmalloc.h        |   22 ------------------
 arch/arm/plat-spear/include/plat/vmalloc.h      |   19 ---------------
 arch/arm/plat-tcc/include/mach/vmalloc.h        |   10 --------
 59 files changed, 0 insertions(+), 866 deletions(-)
 delete mode 100644 arch/arm/mach-at91/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-bcmring/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-clps711x/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-cns3xxx/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-davinci/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-dove/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-ebsa110/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-ep93xx/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-exynos/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-footbridge/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-gemini/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-h720x/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-highbank/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-integrator/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-iop13xx/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-iop32x/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-iop33x/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-ixp2000/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-ixp23xx/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-ixp4xx/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-kirkwood/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-ks8695/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-lpc32xx/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-mmp/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-msm/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-mv78xx0/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-mxs/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-netx/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-nomadik/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-omap1/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-omap2/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-orion5x/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-picoxcell/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-pnx4008/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-prima2/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-pxa/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-realview/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-rpc/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-s3c2410/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-s3c64xx/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-s5p64x0/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-s5pc100/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-s5pv210/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-sa1100/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-shark/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-shmobile/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-spear3xx/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-spear6xx/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-tegra/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-u300/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-ux500/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-versatile/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-vexpress/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-vt8500/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-w90x900/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-zynq/include/mach/vmalloc.h
 delete mode 100644 arch/arm/plat-mxc/include/mach/vmalloc.h
 delete mode 100644 arch/arm/plat-spear/include/plat/vmalloc.h
 delete mode 100644 arch/arm/plat-tcc/include/mach/vmalloc.h

diff --git a/arch/arm/mach-at91/include/mach/vmalloc.h b/arch/arm/mach-at91/include/mach/vmalloc.h
deleted file mode 100644
index 8e4a1bd0ab..0000000000
--- a/arch/arm/mach-at91/include/mach/vmalloc.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * arch/arm/mach-at91/include/mach/vmalloc.h
- *
- *  Copyright (C) 2003 SAN People
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#ifndef __ASM_ARCH_VMALLOC_H
-#define __ASM_ARCH_VMALLOC_H
-
-#include <mach/hardware.h>
-
-#define VMALLOC_END		(AT91_VIRT_BASE & PGDIR_MASK)
-
-#endif
diff --git a/arch/arm/mach-bcmring/include/mach/vmalloc.h b/arch/arm/mach-bcmring/include/mach/vmalloc.h
deleted file mode 100644
index 7397bd7817..0000000000
--- a/arch/arm/mach-bcmring/include/mach/vmalloc.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- *
- *  Copyright (C) 2000 Russell King.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-/*
- * Move VMALLOC_END to 0xf0000000 so that the vm space can range from
- * 0xe0000000 to 0xefffffff. This gives us 256 MB of vm space and handles
- * larger physical memory designs better.
- */
-#define VMALLOC_END       0xf0000000UL
diff --git a/arch/arm/mach-clps711x/include/mach/vmalloc.h b/arch/arm/mach-clps711x/include/mach/vmalloc.h
deleted file mode 100644
index 467b96137e..0000000000
--- a/arch/arm/mach-clps711x/include/mach/vmalloc.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- *  arch/arm/mach-clps711x/include/mach/vmalloc.h
- *
- *  Copyright (C) 2000 Deep Blue Solutions Ltd.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#define VMALLOC_END       0xd0000000UL
diff --git a/arch/arm/mach-cns3xxx/include/mach/vmalloc.h b/arch/arm/mach-cns3xxx/include/mach/vmalloc.h
deleted file mode 100644
index 1dd231d2f7..0000000000
--- a/arch/arm/mach-cns3xxx/include/mach/vmalloc.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/*
- * Copyright 2000 Russell King.
- * Copyright 2003 ARM Limited
- * Copyright 2008 Cavium Networks
- *
- * This file is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License, Version 2, as
- * published by the Free Software Foundation.
- */
-
-#define VMALLOC_END		0xd8000000UL
diff --git a/arch/arm/mach-davinci/include/mach/vmalloc.h b/arch/arm/mach-davinci/include/mach/vmalloc.h
deleted file mode 100644
index d49646a8e2..0000000000
--- a/arch/arm/mach-davinci/include/mach/vmalloc.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * DaVinci vmalloc definitions
- *
- * Author: Kevin Hilman, MontaVista Software, Inc. <source@mvista.com>
- *
- * 2007 (c) MontaVista Software, Inc. This file is licensed under
- * the terms of the GNU General Public License version 2. This program
- * is licensed "as is" without any warranty of any kind, whether express
- * or implied.
- */
-#include <mach/hardware.h>
-
-/* Allow vmalloc range until the IO virtual range minus a 2M "hole" */
-#define VMALLOC_END	  (IO_VIRT - (2<<20))
diff --git a/arch/arm/mach-dove/include/mach/vmalloc.h b/arch/arm/mach-dove/include/mach/vmalloc.h
deleted file mode 100644
index a28792cf76..0000000000
--- a/arch/arm/mach-dove/include/mach/vmalloc.h
+++ /dev/null
@@ -1,5 +0,0 @@
-/*
- * arch/arm/mach-dove/include/mach/vmalloc.h
- */
-
-#define VMALLOC_END	0xfd800000UL
diff --git a/arch/arm/mach-ebsa110/include/mach/vmalloc.h b/arch/arm/mach-ebsa110/include/mach/vmalloc.h
deleted file mode 100644
index ea141b7a3e..0000000000
--- a/arch/arm/mach-ebsa110/include/mach/vmalloc.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- *  arch/arm/mach-ebsa110/include/mach/vmalloc.h
- *
- *  Copyright (C) 1998 Russell King
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-#define VMALLOC_END       0xdf000000UL
diff --git a/arch/arm/mach-ep93xx/include/mach/vmalloc.h b/arch/arm/mach-ep93xx/include/mach/vmalloc.h
deleted file mode 100644
index 1b3f25d03d..0000000000
--- a/arch/arm/mach-ep93xx/include/mach/vmalloc.h
+++ /dev/null
@@ -1,5 +0,0 @@
-/*
- * arch/arm/mach-ep93xx/include/mach/vmalloc.h
- */
-
-#define VMALLOC_END	0xfe800000UL
diff --git a/arch/arm/mach-exynos/include/mach/vmalloc.h b/arch/arm/mach-exynos/include/mach/vmalloc.h
deleted file mode 100644
index 284330e571..0000000000
--- a/arch/arm/mach-exynos/include/mach/vmalloc.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* linux/arch/arm/mach-exynos4/include/mach/vmalloc.h
- *
- * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd.
- *		http://www.samsung.com
- *
- * Copyright 2010 Ben Dooks <ben-linux@fluff.org>
- *
- * Based on arch/arm/mach-s5p6440/include/mach/vmalloc.h
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * EXYNOS4 vmalloc definition
-*/
-
-#ifndef __ASM_ARCH_VMALLOC_H
-#define __ASM_ARCH_VMALLOC_H __FILE__
-
-#define VMALLOC_END	0xF6000000UL
-
-#endif /* __ASM_ARCH_VMALLOC_H */
diff --git a/arch/arm/mach-footbridge/include/mach/vmalloc.h b/arch/arm/mach-footbridge/include/mach/vmalloc.h
deleted file mode 100644
index 40ba78e578..0000000000
--- a/arch/arm/mach-footbridge/include/mach/vmalloc.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- *  arch/arm/mach-footbridge/include/mach/vmalloc.h
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-
-#define VMALLOC_END       0xf0000000UL
diff --git a/arch/arm/mach-gemini/include/mach/vmalloc.h b/arch/arm/mach-gemini/include/mach/vmalloc.h
deleted file mode 100644
index 45371eb86f..0000000000
--- a/arch/arm/mach-gemini/include/mach/vmalloc.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- *  Copyright (C) 2008-2009 Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- */
-
-#define VMALLOC_END	0xf0000000UL
diff --git a/arch/arm/mach-h720x/include/mach/vmalloc.h b/arch/arm/mach-h720x/include/mach/vmalloc.h
deleted file mode 100644
index 8520b4a4d4..0000000000
--- a/arch/arm/mach-h720x/include/mach/vmalloc.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- * arch/arm/mach-h720x/include/mach/vmalloc.h
- */
-
-#ifndef __ARCH_ARM_VMALLOC_H
-#define __ARCH_ARM_VMALLOC_H
-
-#define VMALLOC_END       0xd0000000UL
-
-#endif
diff --git a/arch/arm/mach-highbank/include/mach/vmalloc.h b/arch/arm/mach-highbank/include/mach/vmalloc.h
deleted file mode 100644
index 1969e95427..0000000000
--- a/arch/arm/mach-highbank/include/mach/vmalloc.h
+++ /dev/null
@@ -1 +0,0 @@
-#define VMALLOC_END		0xFEE00000UL
diff --git a/arch/arm/mach-integrator/include/mach/vmalloc.h b/arch/arm/mach-integrator/include/mach/vmalloc.h
deleted file mode 100644
index 2f5a2bafb1..0000000000
--- a/arch/arm/mach-integrator/include/mach/vmalloc.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- *  arch/arm/mach-integrator/include/mach/vmalloc.h
- *
- *  Copyright (C) 2000 Russell King.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#define VMALLOC_END       0xd0000000UL
diff --git a/arch/arm/mach-iop13xx/include/mach/vmalloc.h b/arch/arm/mach-iop13xx/include/mach/vmalloc.h
deleted file mode 100644
index c534567403..0000000000
--- a/arch/arm/mach-iop13xx/include/mach/vmalloc.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#ifndef _VMALLOC_H_
-#define _VMALLOC_H_
-#define VMALLOC_END 	0xfa000000UL
-#endif
diff --git a/arch/arm/mach-iop32x/include/mach/vmalloc.h b/arch/arm/mach-iop32x/include/mach/vmalloc.h
deleted file mode 100644
index c4862d48e5..0000000000
--- a/arch/arm/mach-iop32x/include/mach/vmalloc.h
+++ /dev/null
@@ -1,5 +0,0 @@
-/*
- * arch/arm/mach-iop32x/include/mach/vmalloc.h
- */
-
-#define VMALLOC_END	0xfe000000UL
diff --git a/arch/arm/mach-iop33x/include/mach/vmalloc.h b/arch/arm/mach-iop33x/include/mach/vmalloc.h
deleted file mode 100644
index 48331dc237..0000000000
--- a/arch/arm/mach-iop33x/include/mach/vmalloc.h
+++ /dev/null
@@ -1,5 +0,0 @@
-/*
- * arch/arm/mach-iop33x/include/mach/vmalloc.h
- */
-
-#define VMALLOC_END	0xfe000000UL
diff --git a/arch/arm/mach-ixp2000/include/mach/vmalloc.h b/arch/arm/mach-ixp2000/include/mach/vmalloc.h
deleted file mode 100644
index 61c8dae24f..0000000000
--- a/arch/arm/mach-ixp2000/include/mach/vmalloc.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * arch/arm/mach-ixp2000/include/mach/vmalloc.h
- *
- * Author: Naeem Afzal <naeem.m.afzal@intel.com>
- *
- * Copyright 2002 Intel Corp.
- *
- *  This program is free software; you can redistribute  it and/or modify it
- *  under  the terms of  the GNU General  Public License as published by the
- *  Free Software Foundation;  either version 2 of the  License, or (at your
- *  option) any later version.
- *
- * Just any arbitrary offset to the start of the vmalloc VM area: the
- * current 8MB value just means that there will be a 8MB "hole" after the
- * physical memory until the kernel virtual memory starts.  That means that
- * any out-of-bounds memory accesses will hopefully be caught.
- * The vmalloc() routines leaves a hole of 4kB between each vmalloced
- * area for the same reason. ;)
- */
-#define VMALLOC_END	    0xfb000000UL
diff --git a/arch/arm/mach-ixp23xx/include/mach/vmalloc.h b/arch/arm/mach-ixp23xx/include/mach/vmalloc.h
deleted file mode 100644
index 896c56a1c0..0000000000
--- a/arch/arm/mach-ixp23xx/include/mach/vmalloc.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- * arch/arm/mach-ixp23xx/include/mach/vmalloc.h
- *
- * Copyright (c) 2005 MontaVista Software, Inc.
- *
- * NPU mappings end at 0xf0000000 and we allocate 64MB for board
- * specific static I/O.
- */
-
-#define VMALLOC_END	(0xec000000UL)
diff --git a/arch/arm/mach-ixp4xx/include/mach/vmalloc.h b/arch/arm/mach-ixp4xx/include/mach/vmalloc.h
deleted file mode 100644
index 9bcd64d598..0000000000
--- a/arch/arm/mach-ixp4xx/include/mach/vmalloc.h
+++ /dev/null
@@ -1,5 +0,0 @@
-/*
- * arch/arm/mach-ixp4xx/include/mach/vmalloc.h
- */
-#define VMALLOC_END       (0xff000000UL)
-
diff --git a/arch/arm/mach-kirkwood/include/mach/vmalloc.h b/arch/arm/mach-kirkwood/include/mach/vmalloc.h
deleted file mode 100644
index bf162ca3d2..0000000000
--- a/arch/arm/mach-kirkwood/include/mach/vmalloc.h
+++ /dev/null
@@ -1,5 +0,0 @@
-/*
- * arch/arm/mach-kirkwood/include/mach/vmalloc.h
- */
-
-#define VMALLOC_END	0xfe800000UL
diff --git a/arch/arm/mach-ks8695/include/mach/vmalloc.h b/arch/arm/mach-ks8695/include/mach/vmalloc.h
deleted file mode 100644
index 744ac66be3..0000000000
--- a/arch/arm/mach-ks8695/include/mach/vmalloc.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * arch/arm/mach-ks8695/include/mach/vmalloc.h
- *
- * Copyright (C) 2006 Ben Dooks
- * Copyright (C) 2006 Simtec Electronics <linux@simtec.co.uk>
- *
- * KS8695 vmalloc definition
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#ifndef __ASM_ARCH_VMALLOC_H
-#define __ASM_ARCH_VMALLOC_H
-
-#define VMALLOC_END	  (KS8695_IO_VA & PGDIR_MASK)
-
-#endif
diff --git a/arch/arm/mach-lpc32xx/include/mach/vmalloc.h b/arch/arm/mach-lpc32xx/include/mach/vmalloc.h
deleted file mode 100644
index 720fa43a60..0000000000
--- a/arch/arm/mach-lpc32xx/include/mach/vmalloc.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * arch/arm/mach-lpc32xx/include/mach/vmalloc.h
- *
- * Author: Kevin Wells <kevin.wells@nxp.com>
- *
- * Copyright (C) 2010 NXP Semiconductors
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
-
-#ifndef __ASM_ARCH_VMALLOC_H
-#define __ASM_ARCH_VMALLOC_H
-
-#define VMALLOC_END	0xF0000000UL
-
-#endif
diff --git a/arch/arm/mach-mmp/include/mach/vmalloc.h b/arch/arm/mach-mmp/include/mach/vmalloc.h
deleted file mode 100644
index 1d0bac003a..0000000000
--- a/arch/arm/mach-mmp/include/mach/vmalloc.h
+++ /dev/null
@@ -1,5 +0,0 @@
-/*
- * linux/arch/arm/mach-mmp/include/mach/vmalloc.h
- */
-
-#define VMALLOC_END	0xfe000000UL
diff --git a/arch/arm/mach-msm/include/mach/vmalloc.h b/arch/arm/mach-msm/include/mach/vmalloc.h
deleted file mode 100644
index d138448eff..0000000000
--- a/arch/arm/mach-msm/include/mach/vmalloc.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* arch/arm/mach-msm/include/mach/vmalloc.h
- *
- * Copyright (C) 2007 Google, Inc.
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef __ASM_ARCH_MSM_VMALLOC_H
-#define __ASM_ARCH_MSM_VMALLOC_H
-
-#define VMALLOC_END	  0xd0000000UL
-
-#endif
-
diff --git a/arch/arm/mach-mv78xx0/include/mach/vmalloc.h b/arch/arm/mach-mv78xx0/include/mach/vmalloc.h
deleted file mode 100644
index ba26fe98e6..0000000000
--- a/arch/arm/mach-mv78xx0/include/mach/vmalloc.h
+++ /dev/null
@@ -1,5 +0,0 @@
-/*
- * arch/arm/mach-mv78xx0/include/mach/vmalloc.h
- */
-
-#define VMALLOC_END	0xfe000000UL
diff --git a/arch/arm/mach-mxs/include/mach/vmalloc.h b/arch/arm/mach-mxs/include/mach/vmalloc.h
deleted file mode 100644
index 103b0165ed..0000000000
--- a/arch/arm/mach-mxs/include/mach/vmalloc.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- *  Copyright (C) 2000 Russell King.
- *  Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
-
-#ifndef __MACH_MXS_VMALLOC_H__
-#define __MACH_MXS_VMALLOC_H__
-
-/* vmalloc ending address */
-#define VMALLOC_END       0xf4000000UL
-
-#endif /* __MACH_MXS_VMALLOC_H__ */
diff --git a/arch/arm/mach-netx/include/mach/vmalloc.h b/arch/arm/mach-netx/include/mach/vmalloc.h
deleted file mode 100644
index 871f1ef7bf..0000000000
--- a/arch/arm/mach-netx/include/mach/vmalloc.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- *  arch/arm/mach-netx/include/mach/vmalloc.h
- *
- * Copyright (C) 2005 Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#define VMALLOC_END       0xd0000000UL
diff --git a/arch/arm/mach-nomadik/include/mach/vmalloc.h b/arch/arm/mach-nomadik/include/mach/vmalloc.h
deleted file mode 100644
index f83d574d94..0000000000
--- a/arch/arm/mach-nomadik/include/mach/vmalloc.h
+++ /dev/null
@@ -1,2 +0,0 @@
-
-#define VMALLOC_END       0xe8000000UL
diff --git a/arch/arm/mach-omap1/include/mach/vmalloc.h b/arch/arm/mach-omap1/include/mach/vmalloc.h
deleted file mode 100644
index 22ec4a4795..0000000000
--- a/arch/arm/mach-omap1/include/mach/vmalloc.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- *  arch/arm/mach-omap1/include/mach/vmalloc.h
- *
- *  Copyright (C) 2000 Russell King.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-#define VMALLOC_END	0xd8000000UL
diff --git a/arch/arm/mach-omap2/include/mach/vmalloc.h b/arch/arm/mach-omap2/include/mach/vmalloc.h
deleted file mode 100644
index 8663199477..0000000000
--- a/arch/arm/mach-omap2/include/mach/vmalloc.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- *  arch/arm/plat-omap/include/mach/vmalloc.h
- *
- *  Copyright (C) 2000 Russell King.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-#define VMALLOC_END	  0xf8000000UL
diff --git a/arch/arm/mach-orion5x/include/mach/vmalloc.h b/arch/arm/mach-orion5x/include/mach/vmalloc.h
deleted file mode 100644
index 06b50aeff7..0000000000
--- a/arch/arm/mach-orion5x/include/mach/vmalloc.h
+++ /dev/null
@@ -1,5 +0,0 @@
-/*
- * arch/arm/mach-orion5x/include/mach/vmalloc.h
- */
-
-#define VMALLOC_END       0xfd800000UL
diff --git a/arch/arm/mach-picoxcell/include/mach/vmalloc.h b/arch/arm/mach-picoxcell/include/mach/vmalloc.h
deleted file mode 100644
index 0216cc4b1f..0000000000
--- a/arch/arm/mach-picoxcell/include/mach/vmalloc.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * Copyright (c) 2011 Picochip Ltd., Jamie Iles
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
-#define VMALLOC_END	0xfe000000UL
diff --git a/arch/arm/mach-pnx4008/include/mach/vmalloc.h b/arch/arm/mach-pnx4008/include/mach/vmalloc.h
deleted file mode 100644
index 184913c711..0000000000
--- a/arch/arm/mach-pnx4008/include/mach/vmalloc.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * arch/arm/mach-pnx4008/include/mach/vmalloc.h
- *
- * Author: Vitaly Wool <source@mvista.com>
- *
- * 2006 (c) MontaVista Software, Inc. This file is licensed under
- * the terms of the GNU General Public License version 2. This program
- * is licensed "as is" without any warranty of any kind, whether express
- * or implied.
- */
-
-/*
- * Just any arbitrary offset to the start of the vmalloc VM area: the
- * current 8MB value just means that there will be a 8MB "hole" after the
- * physical memory until the kernel virtual memory starts.  That means that
- * any out-of-bounds memory accesses will hopefully be caught.
- * The vmalloc() routines leaves a hole of 4kB between each vmalloced
- * area for the same reason. ;)
- */
-#define VMALLOC_END       0xd0000000UL
diff --git a/arch/arm/mach-prima2/include/mach/vmalloc.h b/arch/arm/mach-prima2/include/mach/vmalloc.h
deleted file mode 100644
index c9f90fec78..0000000000
--- a/arch/arm/mach-prima2/include/mach/vmalloc.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * arch/arm/ach-prima2/include/mach/vmalloc.h
- *
- * Copyright (c) 2010 ? 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
- *
- * Licensed under GPLv2 or later.
- */
-
-#ifndef __MACH_VMALLOC_H
-#define __MACH_VMALLOC_H
-
-#include <linux/const.h>
-
-#define VMALLOC_END    _AC(0xFEC00000, UL)
-
-#endif
diff --git a/arch/arm/mach-pxa/include/mach/vmalloc.h b/arch/arm/mach-pxa/include/mach/vmalloc.h
deleted file mode 100644
index bfecfbf5f4..0000000000
--- a/arch/arm/mach-pxa/include/mach/vmalloc.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/*
- * arch/arm/mach-pxa/include/mach/vmalloc.h
- *
- * Author:	Nicolas Pitre
- * Copyright:	(C) 2001 MontaVista Software Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-#define VMALLOC_END       (0xe8000000UL)
diff --git a/arch/arm/mach-realview/include/mach/vmalloc.h b/arch/arm/mach-realview/include/mach/vmalloc.h
deleted file mode 100644
index a2a4c68614..0000000000
--- a/arch/arm/mach-realview/include/mach/vmalloc.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- *  arch/arm/mach-realview/include/mach/vmalloc.h
- *
- *  Copyright (C) 2003 ARM Limited
- *  Copyright (C) 2000 Russell King.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#define VMALLOC_END		0xf8000000UL
diff --git a/arch/arm/mach-rpc/include/mach/vmalloc.h b/arch/arm/mach-rpc/include/mach/vmalloc.h
deleted file mode 100644
index fb70022863..0000000000
--- a/arch/arm/mach-rpc/include/mach/vmalloc.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- *  arch/arm/mach-rpc/include/mach/vmalloc.h
- *
- *  Copyright (C) 1997 Russell King
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-#define VMALLOC_END       0xdc000000UL
diff --git a/arch/arm/mach-s3c2410/include/mach/vmalloc.h b/arch/arm/mach-s3c2410/include/mach/vmalloc.h
deleted file mode 100644
index 7a311e8ddd..0000000000
--- a/arch/arm/mach-s3c2410/include/mach/vmalloc.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* arch/arm/mach-s3c2410/include/mach/vmalloc.h
- *
- * from arch/arm/mach-iop3xx/include/mach/vmalloc.h
- *
- * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk>
- *		      http://www.simtec.co.uk/products/SWLINUX/
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * S3C2410 vmalloc definition
-*/
-
-#ifndef __ASM_ARCH_VMALLOC_H
-#define __ASM_ARCH_VMALLOC_H
-
-#define VMALLOC_END	0xF6000000UL
-
-#endif /* __ASM_ARCH_VMALLOC_H */
diff --git a/arch/arm/mach-s3c64xx/include/mach/vmalloc.h b/arch/arm/mach-s3c64xx/include/mach/vmalloc.h
deleted file mode 100644
index 23f75e556a..0000000000
--- a/arch/arm/mach-s3c64xx/include/mach/vmalloc.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* arch/arm/mach-s3c64xx/include/mach/vmalloc.h
- *
- * from arch/arm/mach-iop3xx/include/mach/vmalloc.h
- *
- * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk>
- *		      http://www.simtec.co.uk/products/SWLINUX/
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * S3C6400 vmalloc definition
-*/
-
-#ifndef __ASM_ARCH_VMALLOC_H
-#define __ASM_ARCH_VMALLOC_H
-
-#define VMALLOC_END	0xF6000000UL
-
-#endif /* __ASM_ARCH_VMALLOC_H */
diff --git a/arch/arm/mach-s5p64x0/include/mach/vmalloc.h b/arch/arm/mach-s5p64x0/include/mach/vmalloc.h
deleted file mode 100644
index 38dcc71a03..0000000000
--- a/arch/arm/mach-s5p64x0/include/mach/vmalloc.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* linux/arch/arm/mach-s5p64x0/include/mach/vmalloc.h
- *
- * Copyright (c) 2010 Samsung Electronics Co., Ltd.
- *		http://www.samsung.com
- *
- * Copyright 2010 Ben Dooks <ben-linux@fluff.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * S3C6400 vmalloc definition
-*/
-
-#ifndef __ASM_ARCH_VMALLOC_H
-#define __ASM_ARCH_VMALLOC_H
-
-#define VMALLOC_END	0xF6000000UL
-
-#endif /* __ASM_ARCH_VMALLOC_H */
diff --git a/arch/arm/mach-s5pc100/include/mach/vmalloc.h b/arch/arm/mach-s5pc100/include/mach/vmalloc.h
deleted file mode 100644
index 44c8e5726d..0000000000
--- a/arch/arm/mach-s5pc100/include/mach/vmalloc.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/* arch/arm/mach-s5pc100/include/mach/vmalloc.h
- *
- * Copyright 2010 Ben Dooks <ben-linux@fluff.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * S3C6400 vmalloc definition
-*/
-
-#ifndef __ASM_ARCH_VMALLOC_H
-#define __ASM_ARCH_VMALLOC_H
-
-#define VMALLOC_END	0xF6000000UL
-
-#endif /* __ASM_ARCH_VMALLOC_H */
diff --git a/arch/arm/mach-s5pv210/include/mach/vmalloc.h b/arch/arm/mach-s5pv210/include/mach/vmalloc.h
deleted file mode 100644
index a6c659d68a..0000000000
--- a/arch/arm/mach-s5pv210/include/mach/vmalloc.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* linux/arch/arm/mach-s5p6442/include/mach/vmalloc.h
- *
- * Copyright 2010 Ben Dooks <ben-linux@fluff.org>
- *
- * Copyright (c) 2010 Samsung Electronics Co., Ltd.
- *		http://www.samsung.com/
- *
- * Based on arch/arm/mach-s5p6442/include/mach/vmalloc.h
- *
- * S5PV210 vmalloc definition
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
-*/
-
-#ifndef __ASM_ARCH_VMALLOC_H
-#define __ASM_ARCH_VMALLOC_H __FILE__
-
-#define VMALLOC_END	0xF6000000UL
-
-#endif /* __ASM_ARCH_VMALLOC_H */
diff --git a/arch/arm/mach-sa1100/include/mach/vmalloc.h b/arch/arm/mach-sa1100/include/mach/vmalloc.h
deleted file mode 100644
index b3d0023984..0000000000
--- a/arch/arm/mach-sa1100/include/mach/vmalloc.h
+++ /dev/null
@@ -1,4 +0,0 @@
-/*
- * arch/arm/mach-sa1100/include/mach/vmalloc.h
- */
-#define VMALLOC_END       (0xe8000000UL)
diff --git a/arch/arm/mach-shark/include/mach/vmalloc.h b/arch/arm/mach-shark/include/mach/vmalloc.h
deleted file mode 100644
index b10df98852..0000000000
--- a/arch/arm/mach-shark/include/mach/vmalloc.h
+++ /dev/null
@@ -1,4 +0,0 @@
-/*
- * arch/arm/mach-shark/include/mach/vmalloc.h
- */
-#define VMALLOC_END       0xd0000000UL
diff --git a/arch/arm/mach-shmobile/include/mach/vmalloc.h b/arch/arm/mach-shmobile/include/mach/vmalloc.h
deleted file mode 100644
index 2b8fd8b942..0000000000
--- a/arch/arm/mach-shmobile/include/mach/vmalloc.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef __ASM_MACH_VMALLOC_H
-#define __ASM_MACH_VMALLOC_H
-
-/* Vmalloc at ... - 0xe5ffffff */
-#define VMALLOC_END 0xe6000000UL
-
-#endif /* __ASM_MACH_VMALLOC_H */
diff --git a/arch/arm/mach-spear3xx/include/mach/vmalloc.h b/arch/arm/mach-spear3xx/include/mach/vmalloc.h
deleted file mode 100644
index df977b3c9a..0000000000
--- a/arch/arm/mach-spear3xx/include/mach/vmalloc.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * arch/arm/mach-spear3xx/include/mach/vmalloc.h
- *
- * Defining Vmalloc area for SPEAr3xx machine family
- *
- * Copyright (C) 2009 ST Microelectronics
- * Viresh Kumar<viresh.kumar@st.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __MACH_VMALLOC_H
-#define __MACH_VMALLOC_H
-
-#include <plat/vmalloc.h>
-
-#endif /* __MACH_VMALLOC_H */
diff --git a/arch/arm/mach-spear6xx/include/mach/vmalloc.h b/arch/arm/mach-spear6xx/include/mach/vmalloc.h
deleted file mode 100644
index 4a0b56cb2a..0000000000
--- a/arch/arm/mach-spear6xx/include/mach/vmalloc.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * arch/arm/mach-spear6xx/include/mach/vmalloc.h
- *
- * Defining Vmalloc area for SPEAr6xx machine family
- *
- * Copyright (C) 2009 ST Microelectronics
- * Rajeev Kumar<rajeev-dlh.kumar@st.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __MACH_VMALLOC_H
-#define __MACH_VMALLOC_H
-
-#include <plat/vmalloc.h>
-
-#endif	/* __MACH_VMALLOC_H */
diff --git a/arch/arm/mach-tegra/include/mach/vmalloc.h b/arch/arm/mach-tegra/include/mach/vmalloc.h
deleted file mode 100644
index fd6aa65b2d..0000000000
--- a/arch/arm/mach-tegra/include/mach/vmalloc.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * arch/arm/mach-tegra/include/mach/vmalloc.h
- *
- * Copyright (C) 2010 Google, Inc.
- *
- * Author:
- *	Colin Cross <ccross@google.com>
- *	Erik Gilling <konkers@google.com>
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef __MACH_TEGRA_VMALLOC_H
-#define __MACH_TEGRA_VMALLOC_H
-
-#include <asm/sizes.h>
-
-#define VMALLOC_END        0xFE000000UL
-
-#endif
diff --git a/arch/arm/mach-u300/include/mach/vmalloc.h b/arch/arm/mach-u300/include/mach/vmalloc.h
deleted file mode 100644
index ec423b92b8..0000000000
--- a/arch/arm/mach-u300/include/mach/vmalloc.h
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
- *
- * arch/arm/mach-u300/include/mach/vmalloc.h
- *
- *
- * Copyright (C) 2006-2009 ST-Ericsson AB
- * License terms: GNU General Public License (GPL) version 2
- * Virtual memory allocations
- * End must be above the I/O registers and on an even 2MiB boundary.
- * Author: Linus Walleij <linus.walleij@stericsson.com>
- */
-#define VMALLOC_END	0xfe800000UL
diff --git a/arch/arm/mach-ux500/include/mach/vmalloc.h b/arch/arm/mach-ux500/include/mach/vmalloc.h
deleted file mode 100644
index a4945cb411..0000000000
--- a/arch/arm/mach-ux500/include/mach/vmalloc.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- *  Copyright (C) 2009 ST-Ericsson
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#define VMALLOC_END	0xf0000000UL
diff --git a/arch/arm/mach-versatile/include/mach/vmalloc.h b/arch/arm/mach-versatile/include/mach/vmalloc.h
deleted file mode 100644
index 7d8e069ad5..0000000000
--- a/arch/arm/mach-versatile/include/mach/vmalloc.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- *  arch/arm/mach-versatile/include/mach/vmalloc.h
- *
- *  Copyright (C) 2003 ARM Limited
- *  Copyright (C) 2000 Russell King.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#define VMALLOC_END		0xd8000000UL
diff --git a/arch/arm/mach-vexpress/include/mach/vmalloc.h b/arch/arm/mach-vexpress/include/mach/vmalloc.h
deleted file mode 100644
index f43a36ef67..0000000000
--- a/arch/arm/mach-vexpress/include/mach/vmalloc.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- *  arch/arm/mach-vexpress/include/mach/vmalloc.h
- *
- *  Copyright (C) 2003 ARM Limited
- *  Copyright (C) 2000 Russell King.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#define VMALLOC_END		0xf8000000UL
diff --git a/arch/arm/mach-vt8500/include/mach/vmalloc.h b/arch/arm/mach-vt8500/include/mach/vmalloc.h
deleted file mode 100644
index 4642290ce4..0000000000
--- a/arch/arm/mach-vt8500/include/mach/vmalloc.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- *  arch/arm/mach-vt8500/include/mach/vmalloc.h
- *
- *  Copyright (C) 2000 Russell King.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-#define VMALLOC_END	0xd0000000UL
diff --git a/arch/arm/mach-w90x900/include/mach/vmalloc.h b/arch/arm/mach-w90x900/include/mach/vmalloc.h
deleted file mode 100644
index b067e44500..0000000000
--- a/arch/arm/mach-w90x900/include/mach/vmalloc.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * arch/arm/mach-w90x900/include/mach/vmalloc.h
- *
- * Copyright (c) 2008 Nuvoton technology corporation
- * All rights reserved.
- *
- * Wan ZongShun <mcuos.com@gmail.com>
- *
- * Based on arch/arm/mach-s3c2410/include/mach/vmalloc.h
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- */
-
-#ifndef __ASM_ARCH_VMALLOC_H
-#define __ASM_ARCH_VMALLOC_H
-
-#define VMALLOC_END	  (0xe0000000UL)
-
-#endif /* __ASM_ARCH_VMALLOC_H */
diff --git a/arch/arm/mach-zynq/include/mach/vmalloc.h b/arch/arm/mach-zynq/include/mach/vmalloc.h
deleted file mode 100644
index 2398eff1e8..0000000000
--- a/arch/arm/mach-zynq/include/mach/vmalloc.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* arch/arm/mach-zynq/include/mach/vmalloc.h
- *
- *  Copyright (C) 2011 Xilinx
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
-
-#ifndef __MACH_VMALLOC_H__
-#define __MACH_VMALLOC_H__
-
-#define VMALLOC_END       0xE0000000UL
-
-#endif
diff --git a/arch/arm/plat-mxc/include/mach/vmalloc.h b/arch/arm/plat-mxc/include/mach/vmalloc.h
deleted file mode 100644
index ef6379c474..0000000000
--- a/arch/arm/plat-mxc/include/mach/vmalloc.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- *  Copyright (C) 2000 Russell King.
- *  Copyright 2004-2007 Freescale Semiconductor, Inc. All Rights Reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
-
-#ifndef __ASM_ARCH_MXC_VMALLOC_H__
-#define __ASM_ARCH_MXC_VMALLOC_H__
-
-/* vmalloc ending address */
-#define VMALLOC_END       0xf4000000UL
-
-#endif /* __ASM_ARCH_MXC_VMALLOC_H__ */
diff --git a/arch/arm/plat-spear/include/plat/vmalloc.h b/arch/arm/plat-spear/include/plat/vmalloc.h
deleted file mode 100644
index 8c8b24d070..0000000000
--- a/arch/arm/plat-spear/include/plat/vmalloc.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * arch/arm/plat-spear/include/plat/vmalloc.h
- *
- * Defining Vmalloc area for SPEAr platform
- *
- * Copyright (C) 2009 ST Microelectronics
- * Viresh Kumar<viresh.kumar@st.com>
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
-
-#ifndef __PLAT_VMALLOC_H
-#define __PLAT_VMALLOC_H
-
-#define VMALLOC_END		0xF0000000UL
-
-#endif /* __PLAT_VMALLOC_H */
diff --git a/arch/arm/plat-tcc/include/mach/vmalloc.h b/arch/arm/plat-tcc/include/mach/vmalloc.h
deleted file mode 100644
index 99414d9c2b..0000000000
--- a/arch/arm/plat-tcc/include/mach/vmalloc.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- * Author: <linux@telechips.com>
- * Created: June 10, 2008
- *
- * Copyright (C) 2000 Russell King.
- * Copyright (C) 2008-2009 Telechips
- *
- * Licensed under the terms of the GPL v2.
- */
-#define VMALLOC_END	0xf0000000UL
-- 
1.7.7.1.431.g10b2a

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

* [PATCH 23/23] ARM: move VMALLOC_END down temporarily for shmobile
  2011-11-16  5:48 [PATCH 0/23] mach/vmalloc.h removal, and ioremap optimization Nicolas Pitre
                   ` (21 preceding siblings ...)
  2011-11-16  5:48 ` [PATCH 22/23] ARM: big removal of now unused vmalloc.h files Nicolas Pitre
@ 2011-11-16  5:48 ` Nicolas Pitre
  2011-12-16  5:34   ` Magnus Damm
  2011-11-16 17:13 ` [PATCH 0/23] mach/vmalloc.h removal, and ioremap optimization Stephen Warren
  2011-11-18 10:04 ` Jamie Iles
  24 siblings, 1 reply; 42+ messages in thread
From: Nicolas Pitre @ 2011-11-16  5:48 UTC (permalink / raw)
  To: linux-arm-kernel

From: Nicolas Pitre <nicolas.pitre@linaro.org>

THIS IS A TEMPORARY HACK.  The purpose of this is _only_ to avoid a
regression on an existing machine while a better fix is implemented.

On shmobile the consistent DMA memory area was set to 158MB in commit
28f0721a79 with no explanation.  The documented size for this area should
vary between 2MB and 14MB, and none of the other ARM targets exceed that.

The included #warning is therefore meant to be noisy on purpose to get
shmobile maintainers attention and this commit reverted once this
consistent DMA size conflict is resolved.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Cc: Magnus Damm <damm@opensource.se>
Cc: Paul Mundt <lethal@linux-sh.org>
---
 arch/arm/include/asm/pgtable.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h
index 6cdd55cb0b..bcae9b81a6 100644
--- a/arch/arm/include/asm/pgtable.h
+++ b/arch/arm/include/asm/pgtable.h
@@ -37,6 +37,13 @@
 #define VMALLOC_START		(((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
 #define VMALLOC_END		0xff000000UL
 
+/* This is a temporary hack until shmobile's DMA area size is sorted out */
+#ifdef CONFIG_ARCH_SHMOBILE
+#warning "SH-Mobile's consistent DMA size conflicts with VMALLOC_END by 144MB"
+#undef VMALLOC_END
+#define VMALLOC_END		0xF6000000UL
+#endif
+
 #define LIBRARY_TEXT_START	0x0c000000
 
 #ifndef __ASSEMBLY__
-- 
1.7.7.1.431.g10b2a

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

* [PATCH 0/23] mach/vmalloc.h removal, and ioremap optimization
  2011-11-16  5:48 [PATCH 0/23] mach/vmalloc.h removal, and ioremap optimization Nicolas Pitre
                   ` (22 preceding siblings ...)
  2011-11-16  5:48 ` [PATCH 23/23] ARM: move VMALLOC_END down temporarily for shmobile Nicolas Pitre
@ 2011-11-16 17:13 ` Stephen Warren
  2011-11-16 23:08   ` Nicolas Pitre
  2011-11-18 10:04 ` Jamie Iles
  24 siblings, 1 reply; 42+ messages in thread
From: Stephen Warren @ 2011-11-16 17:13 UTC (permalink / raw)
  To: linux-arm-kernel

Nicolas Pitre wrote at Tuesday, November 15, 2011 10:48 PM:
> This patch series removes all instances of mach/vmalloc.h in order to
> have a more unified memory map across all ARM architectures. ...

For Tegra, the series:

Tested-by: Stephen Warren <swarren@nvidia.com>

(On Seaboard/Springbank, booted DT, booted non-DT and tested audio, both
with root filesystem on SD card)

-- 
nvpublic

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

* [PATCH 0/23] mach/vmalloc.h removal, and ioremap optimization
  2011-11-16 17:13 ` [PATCH 0/23] mach/vmalloc.h removal, and ioremap optimization Stephen Warren
@ 2011-11-16 23:08   ` Nicolas Pitre
  0 siblings, 0 replies; 42+ messages in thread
From: Nicolas Pitre @ 2011-11-16 23:08 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, 16 Nov 2011, Stephen Warren wrote:

> Nicolas Pitre wrote at Tuesday, November 15, 2011 10:48 PM:
> > This patch series removes all instances of mach/vmalloc.h in order to
> > have a more unified memory map across all ARM architectures. ...
> 
> For Tegra, the series:
> 
> Tested-by: Stephen Warren <swarren@nvidia.com>
> 
> (On Seaboard/Springbank, booted DT, booted non-DT and tested audio, both
> with root filesystem on SD card)

Thanks for testing!


Nicolas

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

* [PATCH 11/23] ARM: mach-ixp23xx: remove arch specific special handling for ioremap
  2011-11-16  5:48 ` [PATCH 11/23] ARM: mach-ixp23xx: " Nicolas Pitre
@ 2011-11-18  0:03   ` Deepak Saxena
  0 siblings, 0 replies; 42+ messages in thread
From: Deepak Saxena @ 2011-11-18  0:03 UTC (permalink / raw)
  To: linux-arm-kernel

On Nov 16 2011, at 00:48, Nicolas Pitre was caught saying:
> From: Nicolas Pitre <nicolas.pitre@linaro.org>
> 
> A generic version should replace this later.
> 
> Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>

Looks good to me, specially in sync with the generic ioremap().
I don't have HW to test anymore, Lennert, can you test this
series on the IXP?

Reviewed-by: Deepak Saxena <dsaxena@linaro.org>

> ---
>  arch/arm/mach-ixp23xx/include/mach/io.h |   29 -----------------------------
>  1 files changed, 0 insertions(+), 29 deletions(-)
> 
> diff --git a/arch/arm/mach-ixp23xx/include/mach/io.h b/arch/arm/mach-ixp23xx/include/mach/io.h
> index a1749d0fd8..4ce4353b9f 100644
> --- a/arch/arm/mach-ixp23xx/include/mach/io.h
> +++ b/arch/arm/mach-ixp23xx/include/mach/io.h
> @@ -20,33 +20,4 @@
>  #define __io(p)		((void __iomem*)((p) + IXP23XX_PCI_IO_VIRT))
>  #define __mem_pci(a)	(a)
>  
> -static inline void __iomem *
> -ixp23xx_ioremap(unsigned long addr, unsigned long size, unsigned int mtype)
> -{
> -	if (addr >= IXP23XX_PCI_MEM_START &&
> -		addr <= IXP23XX_PCI_MEM_START + IXP23XX_PCI_MEM_SIZE) {
> -		if (addr + size > IXP23XX_PCI_MEM_START + IXP23XX_PCI_MEM_SIZE)
> -			return NULL;
> -
> -		return (void __iomem *)
> - 			((addr - IXP23XX_PCI_MEM_START) + IXP23XX_PCI_MEM_VIRT);
> -	}
> -
> -	return __arm_ioremap(addr, size, mtype);
> -}
> -
> -static inline void
> -ixp23xx_iounmap(void __iomem *addr)
> -{
> -	if ((((u32)addr) >= IXP23XX_PCI_MEM_VIRT) &&
> -	    (((u32)addr) < IXP23XX_PCI_MEM_VIRT + IXP23XX_PCI_MEM_SIZE))
> -		return;
> -
> -	__iounmap(addr);
> -}
> -
> -#define __arch_ioremap	ixp23xx_ioremap
> -#define __arch_iounmap	ixp23xx_iounmap
> -
> -
>  #endif
> -- 
> 1.7.7.1.431.g10b2a
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

-- 
"People think all we need to fix our predicament is a free source of
energy, but I think we need to change out behaviour. More energy would
just deplete the Earth's lifeblood faster." - Janine Benyius

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

* [PATCH 0/23] mach/vmalloc.h removal, and ioremap optimization
  2011-11-16  5:48 [PATCH 0/23] mach/vmalloc.h removal, and ioremap optimization Nicolas Pitre
                   ` (23 preceding siblings ...)
  2011-11-16 17:13 ` [PATCH 0/23] mach/vmalloc.h removal, and ioremap optimization Stephen Warren
@ 2011-11-18 10:04 ` Jamie Iles
  24 siblings, 0 replies; 42+ messages in thread
From: Jamie Iles @ 2011-11-18 10:04 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Nov 16, 2011 at 12:48:18AM -0500, Nicolas Pitre wrote:
> This patch series removes all instances of mach/vmalloc.h in order to
> have a more unified memory map across all ARM architectures.  To do so,
> the static mappings are moved inside the vmalloc area.  And finally this
> allows for a generic optimization to ioremap where static mappings are
> reused whenever possible, using common code instead of having this
> duplicated in a couple places.
> 
> This series provides a net reduction of more than 1200 lines of code.
> 
> One regression was discovered on shmobile during testing because that
> platform asks for 158MB of consistent DMA memory while the documented
> maximum is 14MB.  Inspection of the code doesn't tell why this is
> required, and listed maintainers did not respond yet, two months
> after repeated inquiries.  So a temporary exception to the definition
> of VMALLOC_END was added for CONFIG_SHMOBILE and a noisy warning to
> get those maintainers' attention.
> 
> This patch series was initially submitted for inclusion for v3.1, and
> withdrawn due to too many problems found on OMAP.  Those problems are
> now fixed in current mainline.  This is therefore rebased on v3.2-rc2.

Works great on picoxcell.  Thanks Nicolas!

Tested-by: Jamie Iles <jamie@jamieiles.com>

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

* [PATCH 07/23] ARM: plat-omap: remove arch specific special handling for ioremap
  2011-11-16  5:48 ` [PATCH 07/23] ARM: plat-omap: " Nicolas Pitre
@ 2011-11-18 18:39   ` Kevin Hilman
  2011-12-02 20:21   ` Tony Lindgren
  1 sibling, 0 replies; 42+ messages in thread
From: Kevin Hilman @ 2011-11-18 18:39 UTC (permalink / raw)
  To: linux-arm-kernel

Nicolas Pitre <nico@fluxnic.net> writes:

> From: Nicolas Pitre <nicolas.pitre@linaro.org>
>
> A generic version should replace this later.
>
> As io.c has become nearly empty, omap_init_consistent_dma_size() is moved
> into common.c so that io.c can be removed entirely.
>
> Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>

Boot tested on OMAP3430/n900, OMAP3530/Overo, OMAP3630/Zoom3,
OMAP4430/Panda

Tested-by: Kevin Hilman <khilman@ti.com>

Kevin

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

* [PATCH 21/23] ARM: add generic ioremap optimization by reusing static mappings
  2011-11-16  5:48 ` [PATCH 21/23] ARM: add generic ioremap optimization by reusing static mappings Nicolas Pitre
@ 2011-11-22 10:16   ` Russell King - ARM Linux
  2011-11-22 13:44     ` Nicolas Pitre
  0 siblings, 1 reply; 42+ messages in thread
From: Russell King - ARM Linux @ 2011-11-22 10:16 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Nov 16, 2011 at 12:48:39AM -0500, Nicolas Pitre wrote:
> @@ -201,12 +195,6 @@ void __iomem * __arm_ioremap_pfn_caller(unsigned long pfn,
>  	if (pfn >= 0x100000 && (__pfn_to_phys(pfn) & ~SUPERSECTION_MASK))
>  		return NULL;
>  
> -	/*
> -	 * Don't allow RAM to be mapped - this causes problems with ARMv6+
> -	 */
> -	if (WARN_ON(pfn_valid(pfn)))
> -		return NULL;
> -
>  	type = get_mem_type(mtype);
>  	if (!type)
>  		return NULL;
> @@ -216,6 +204,34 @@ void __iomem * __arm_ioremap_pfn_caller(unsigned long pfn,
>  	 */
>  	size = PAGE_ALIGN(offset + size);
>  
> +	/*
> +	 * Try to reuse one of the static mapping whenever possible.
> +	 */
> +	read_lock(&vmlist_lock);
> +	for (area = vmlist; area; area = area->next) {
> +		if (!size || (sizeof(phys_addr_t) == 4 && pfn >= 0x100000))
> +			break;
> +		if (!(area->flags & VM_ARM_STATIC_MAPPING))
> +			continue;
> +		if ((area->flags & VM_ARM_MTYPE_MASK) != VM_ARM_MTYPE(mtype))
> +			continue;
> +		if (__phys_to_pfn(area->phys_addr) > pfn ||
> +		    __pfn_to_phys(pfn) + size-1 > area->phys_addr + area->size-1)
> +			continue;
> +		/* we can drop the lock here as we know *area is static */
> +		read_unlock(&vmlist_lock);
> +		addr = (unsigned long)area->addr;
> +		addr += __pfn_to_phys(pfn) - area->phys_addr;
> +		return (void __iomem *) (offset + addr);
> +	}
> +	read_unlock(&vmlist_lock);
> +
> +	/*
> +	 * Don't allow RAM to be mapped - this causes problems with ARMv6+
> +	 */
> +	if (WARN_ON(pfn_valid(pfn)))
> +		return NULL;

Why are you moving this check?  System RAM should never end up in the
vmlist.

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

* [PATCH 21/23] ARM: add generic ioremap optimization by reusing static mappings
  2011-11-22 10:16   ` Russell King - ARM Linux
@ 2011-11-22 13:44     ` Nicolas Pitre
  0 siblings, 0 replies; 42+ messages in thread
From: Nicolas Pitre @ 2011-11-22 13:44 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, 22 Nov 2011, Russell King - ARM Linux wrote:

> On Wed, Nov 16, 2011 at 12:48:39AM -0500, Nicolas Pitre wrote:
> > @@ -201,12 +195,6 @@ void __iomem * __arm_ioremap_pfn_caller(unsigned long pfn,
> >  	if (pfn >= 0x100000 && (__pfn_to_phys(pfn) & ~SUPERSECTION_MASK))
> >  		return NULL;
> >  
> > -	/*
> > -	 * Don't allow RAM to be mapped - this causes problems with ARMv6+
> > -	 */
> > -	if (WARN_ON(pfn_valid(pfn)))
> > -		return NULL;
> > -
> >  	type = get_mem_type(mtype);
> >  	if (!type)
> >  		return NULL;
> > @@ -216,6 +204,34 @@ void __iomem * __arm_ioremap_pfn_caller(unsigned long pfn,
> >  	 */
> >  	size = PAGE_ALIGN(offset + size);
> >  
> > +	/*
> > +	 * Try to reuse one of the static mapping whenever possible.
> > +	 */
> > +	read_lock(&vmlist_lock);
> > +	for (area = vmlist; area; area = area->next) {
> > +		if (!size || (sizeof(phys_addr_t) == 4 && pfn >= 0x100000))
> > +			break;
> > +		if (!(area->flags & VM_ARM_STATIC_MAPPING))
> > +			continue;
> > +		if ((area->flags & VM_ARM_MTYPE_MASK) != VM_ARM_MTYPE(mtype))
> > +			continue;
> > +		if (__phys_to_pfn(area->phys_addr) > pfn ||
> > +		    __pfn_to_phys(pfn) + size-1 > area->phys_addr + area->size-1)
> > +			continue;
> > +		/* we can drop the lock here as we know *area is static */
> > +		read_unlock(&vmlist_lock);
> > +		addr = (unsigned long)area->addr;
> > +		addr += __pfn_to_phys(pfn) - area->phys_addr;
> > +		return (void __iomem *) (offset + addr);
> > +	}
> > +	read_unlock(&vmlist_lock);
> > +
> > +	/*
> > +	 * Don't allow RAM to be mapped - this causes problems with ARMv6+
> > +	 */
> > +	if (WARN_ON(pfn_valid(pfn)))
> > +		return NULL;
> 
> Why are you moving this check?  System RAM should never end up in the
> vmlist.

Because some architectures, such as OMAP, are relying on the ioremap 
optimization that reuse static mappings being functional even before the 
memory management is initialized.


Nicolas

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

* [PATCH 07/23] ARM: plat-omap: remove arch specific special handling for ioremap
  2011-11-16  5:48 ` [PATCH 07/23] ARM: plat-omap: " Nicolas Pitre
  2011-11-18 18:39   ` Kevin Hilman
@ 2011-12-02 20:21   ` Tony Lindgren
  2011-12-02 21:39     ` Nicolas Pitre
  1 sibling, 1 reply; 42+ messages in thread
From: Tony Lindgren @ 2011-12-02 20:21 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Nico,

* Nicolas Pitre <nico@fluxnic.net> [111115 21:21]:
> From: Nicolas Pitre <nicolas.pitre@linaro.org>
> 
> A generic version should replace this later.
> 
> As io.c has become nearly empty, omap_init_consistent_dma_size() is moved
> into common.c so that io.c can be removed entirely.

Sorry for the delay on trying this series out. It boots fine
on omap2/3/4 as Kevin already noted. However, the following
fix is needed for this patch to keep things building for
omap1_defconfig.
 
> Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>

With the following fix it works on what I tested. That's
osk5912 n800 2430sdp n900 zoom3 and blaze. If you're still
taking acks for this series:

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


From: Tony Lindgren <tony@atomide.com>
Date: Fri, 2 Dec 2011 12:14:28 -0800
Subject: [PATCH] ARM: OMAP: Fix build error for omap1_defconfig

Otherwise we get the following error:

In function 'omap_init_consistent_dma_size':
error: implicit declaration of function 'init_consistent_dma_size'

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

--- a/arch/arm/plat-omap/common.c
+++ b/arch/arm/plat-omap/common.c
@@ -14,6 +14,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/io.h>
+#include <linux/dma-mapping.h>
 #include <linux/omapfb.h>
 
 #include <plat/common.h>

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

* [PATCH 07/23] ARM: plat-omap: remove arch specific special handling for ioremap
  2011-12-02 20:21   ` Tony Lindgren
@ 2011-12-02 21:39     ` Nicolas Pitre
  2011-12-05 23:21       ` Tony Lindgren
  2011-12-05 23:56       ` Russell King - ARM Linux
  0 siblings, 2 replies; 42+ messages in thread
From: Nicolas Pitre @ 2011-12-02 21:39 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, 2 Dec 2011, Tony Lindgren wrote:

> Hi Nico,
> 
> * Nicolas Pitre <nico@fluxnic.net> [111115 21:21]:
> > From: Nicolas Pitre <nicolas.pitre@linaro.org>
> > 
> > A generic version should replace this later.
> > 
> > As io.c has become nearly empty, omap_init_consistent_dma_size() is moved
> > into common.c so that io.c can be removed entirely.
> 
> Sorry for the delay on trying this series out. It boots fine
> on omap2/3/4 as Kevin already noted. However, the following
> fix is needed for this patch to keep things building for
> omap1_defconfig.
>  
> > Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
> 
> With the following fix it works on what I tested. That's
> osk5912 n800 2430sdp n900 zoom3 and blaze. If you're still
> taking acks for this series:
> 
> Tested-by: Tony Lindgren <tony@atomide.com>

OK, thanks for testing.  Since Russell didn't commit this to his stable 
branch yet I simply folded in your fix and added your tested-by tag.


Nicolas

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

* [PATCH 07/23] ARM: plat-omap: remove arch specific special handling for ioremap
  2011-12-02 21:39     ` Nicolas Pitre
@ 2011-12-05 23:21       ` Tony Lindgren
  2011-12-05 23:56       ` Russell King - ARM Linux
  1 sibling, 0 replies; 42+ messages in thread
From: Tony Lindgren @ 2011-12-05 23:21 UTC (permalink / raw)
  To: linux-arm-kernel

* Nicolas Pitre <nico@fluxnic.net> [111202 13:04]:
> On Fri, 2 Dec 2011, Tony Lindgren wrote:
> 
> > Hi Nico,
> > 
> > * Nicolas Pitre <nico@fluxnic.net> [111115 21:21]:
> > > From: Nicolas Pitre <nicolas.pitre@linaro.org>
> > > 
> > > A generic version should replace this later.
> > > 
> > > As io.c has become nearly empty, omap_init_consistent_dma_size() is moved
> > > into common.c so that io.c can be removed entirely.
> > 
> > Sorry for the delay on trying this series out. It boots fine
> > on omap2/3/4 as Kevin already noted. However, the following
> > fix is needed for this patch to keep things building for
> > omap1_defconfig.
> >  
> > > Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
> > 
> > With the following fix it works on what I tested. That's
> > osk5912 n800 2430sdp n900 zoom3 and blaze. If you're still
> > taking acks for this series:
> > 
> > Tested-by: Tony Lindgren <tony@atomide.com>
> 
> OK, thanks for testing.  Since Russell didn't commit this to his stable 
> branch yet I simply folded in your fix and added your tested-by tag.

OK thanks.

Tony

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

* [PATCH 07/23] ARM: plat-omap: remove arch specific special handling for ioremap
  2011-12-02 21:39     ` Nicolas Pitre
  2011-12-05 23:21       ` Tony Lindgren
@ 2011-12-05 23:56       ` Russell King - ARM Linux
  2011-12-06  0:33         ` Nicolas Pitre
  2011-12-06  0:36         ` Russell King - ARM Linux
  1 sibling, 2 replies; 42+ messages in thread
From: Russell King - ARM Linux @ 2011-12-05 23:56 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Dec 02, 2011 at 04:39:31PM -0500, Nicolas Pitre wrote:
> On Fri, 2 Dec 2011, Tony Lindgren wrote:
> 
> > Hi Nico,
> > 
> > * Nicolas Pitre <nico@fluxnic.net> [111115 21:21]:
> > > From: Nicolas Pitre <nicolas.pitre@linaro.org>
> > > 
> > > A generic version should replace this later.
> > > 
> > > As io.c has become nearly empty, omap_init_consistent_dma_size() is moved
> > > into common.c so that io.c can be removed entirely.
> > 
> > Sorry for the delay on trying this series out. It boots fine
> > on omap2/3/4 as Kevin already noted. However, the following
> > fix is needed for this patch to keep things building for
> > omap1_defconfig.
> >  
> > > Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
> > 
> > With the following fix it works on what I tested. That's
> > osk5912 n800 2430sdp n900 zoom3 and blaze. If you're still
> > taking acks for this series:
> > 
> > Tested-by: Tony Lindgren <tony@atomide.com>
> 
> OK, thanks for testing.  Since Russell didn't commit this to his stable 
> branch yet I simply folded in your fix and added your tested-by tag.

So I'm about to push what I had out in the devel-stable branch... what
am I supposed to do with this?

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

* [PATCH 07/23] ARM: plat-omap: remove arch specific special handling for ioremap
  2011-12-05 23:56       ` Russell King - ARM Linux
@ 2011-12-06  0:33         ` Nicolas Pitre
  2011-12-06  0:36         ` Russell King - ARM Linux
  1 sibling, 0 replies; 42+ messages in thread
From: Nicolas Pitre @ 2011-12-06  0:33 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, 5 Dec 2011, Russell King - ARM Linux wrote:

> On Fri, Dec 02, 2011 at 04:39:31PM -0500, Nicolas Pitre wrote:
> > On Fri, 2 Dec 2011, Tony Lindgren wrote:
> > 
> > > Hi Nico,
> > > 
> > > * Nicolas Pitre <nico@fluxnic.net> [111115 21:21]:
> > > > From: Nicolas Pitre <nicolas.pitre@linaro.org>
> > > > 
> > > > A generic version should replace this later.
> > > > 
> > > > As io.c has become nearly empty, omap_init_consistent_dma_size() is moved
> > > > into common.c so that io.c can be removed entirely.
> > > 
> > > Sorry for the delay on trying this series out. It boots fine
> > > on omap2/3/4 as Kevin already noted. However, the following
> > > fix is needed for this patch to keep things building for
> > > omap1_defconfig.
> > >  
> > > > Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
> > > 
> > > With the following fix it works on what I tested. That's
> > > osk5912 n800 2430sdp n900 zoom3 and blaze. If you're still
> > > taking acks for this series:
> > > 
> > > Tested-by: Tony Lindgren <tony@atomide.com>
> > 
> > OK, thanks for testing.  Since Russell didn't commit this to his stable 
> > branch yet I simply folded in your fix and added your tested-by tag.
> 
> So I'm about to push what I had out in the devel-stable branch... what
> am I supposed to do with this?

Please repull to get the OMAP1 fix:

	git://git.linaro.org/people/nico/linux vmalloc

Most reports are now positive, except one: ux500.

I think at this point, it could be a good thing to merge this into your 
stable branch nevertheless, given that the changes are quite extensive 
and people might want to build on top of this.  The ux500 will be fixed 
with an additional patch soon once this is debugged.  If not then please 
keep merging it for linux-next.


Nicolas

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

* [PATCH 07/23] ARM: plat-omap: remove arch specific special handling for ioremap
  2011-12-05 23:56       ` Russell King - ARM Linux
  2011-12-06  0:33         ` Nicolas Pitre
@ 2011-12-06  0:36         ` Russell King - ARM Linux
  2011-12-06  4:09           ` Nicolas Pitre
  1 sibling, 1 reply; 42+ messages in thread
From: Russell King - ARM Linux @ 2011-12-06  0:36 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Dec 05, 2011 at 11:56:09PM +0000, Russell King - ARM Linux wrote:
> On Fri, Dec 02, 2011 at 04:39:31PM -0500, Nicolas Pitre wrote:
> > On Fri, 2 Dec 2011, Tony Lindgren wrote:
> > 
> > > Hi Nico,
> > > 
> > > * Nicolas Pitre <nico@fluxnic.net> [111115 21:21]:
> > > > From: Nicolas Pitre <nicolas.pitre@linaro.org>
> > > > 
> > > > A generic version should replace this later.
> > > > 
> > > > As io.c has become nearly empty, omap_init_consistent_dma_size() is moved
> > > > into common.c so that io.c can be removed entirely.
> > > 
> > > Sorry for the delay on trying this series out. It boots fine
> > > on omap2/3/4 as Kevin already noted. However, the following
> > > fix is needed for this patch to keep things building for
> > > omap1_defconfig.
> > >  
> > > > Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
> > > 
> > > With the following fix it works on what I tested. That's
> > > osk5912 n800 2430sdp n900 zoom3 and blaze. If you're still
> > > taking acks for this series:
> > > 
> > > Tested-by: Tony Lindgren <tony@atomide.com>
> > 
> > OK, thanks for testing.  Since Russell didn't commit this to his stable 
> > branch yet I simply folded in your fix and added your tested-by tag.
> 
> So I'm about to push what I had out in the devel-stable branch... what
> am I supposed to do with this?

Okay, yet again I find myself having to wait hours for a reply - which
I expect will be forthcoming sometime tomorrow afternoon my time.  If
I wait, it means a delay of another 24 hours before I push my tree out.

This is not acceptable.

So I'm pushing my tree out as-is - which means the stuff I pulled
previously is now frozen.  Please submit a patch to fix whatever error
Tony is seeing.

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

* [PATCH 07/23] ARM: plat-omap: remove arch specific special handling for ioremap
  2011-12-06  0:36         ` Russell King - ARM Linux
@ 2011-12-06  4:09           ` Nicolas Pitre
  2011-12-06  4:46             ` Tony Lindgren
  2011-12-06  8:55             ` Russell King - ARM Linux
  0 siblings, 2 replies; 42+ messages in thread
From: Nicolas Pitre @ 2011-12-06  4:09 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, 6 Dec 2011, Russell King - ARM Linux wrote:
> On Mon, Dec 05, 2011 at 11:56:09PM +0000, Russell King - ARM Linux wrote:
> > On Fri, Dec 02, 2011 at 04:39:31PM -0500, Nicolas Pitre wrote:
> > > OK, thanks for testing.  Since Russell didn't commit this to his stable 
> > > branch yet I simply folded in your fix and added your tested-by tag.
> > 
> > So I'm about to push what I had out in the devel-stable branch... what
> > am I supposed to do with this?
> 
> Okay, yet again I find myself having to wait hours for a reply - which
> I expect will be forthcoming sometime tomorrow afternoon my time.  If
> I wait, it means a delay of another 24 hours before I push my tree out.
> 
> This is not acceptable.

You asked at 11:56:09PM +0000.
I replied at 19:33:34 -0500.
That's a delay of 37 minutes 25 seconds.
I even received my reply back from the mailing list server at
19:39:37 -0500 so hopefully you must have received it within the hour.
Granted, you merged my branch at 23:27:59 +0000 so I hadn't replied yet.

However, the commit says:

Merge: 742eaa6a6e 0af362f844
Author:     Russell King <rmk+kernel@arm.linux.org.uk>
AuthorDate: Mon Dec 5 23:27:54 2011 +0000
Commit:     Russell King <rmk+kernel@arm.linux.org.uk>
CommitDate: Mon Dec 5 23:27:59 2011 +0000

    Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into devel-stable

So the commit message is written as if you pulled my branch directly 
instead of a local branch, however my repo was already updated by that 
time.  In fact it was updated 2 days ago.  Strangely enough, you still 
have a version prior to that last update.

> So I'm pushing my tree out as-is - which means the stuff I pulled
> previously is now frozen.

That's not a big problem.

Tony: could you please send your original patch directly to Russell with 
my ACK?


Nicolas

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

* [PATCH 07/23] ARM: plat-omap: remove arch specific special handling for ioremap
  2011-12-06  4:09           ` Nicolas Pitre
@ 2011-12-06  4:46             ` Tony Lindgren
  2011-12-06  8:55             ` Russell King - ARM Linux
  1 sibling, 0 replies; 42+ messages in thread
From: Tony Lindgren @ 2011-12-06  4:46 UTC (permalink / raw)
  To: linux-arm-kernel

* Nicolas Pitre <nico@fluxnic.net> [111205 19:37]:
> On Tue, 6 Dec 2011, Russell King - ARM Linux wrote:
> > On Mon, Dec 05, 2011 at 11:56:09PM +0000, Russell King - ARM Linux wrote:
> > > On Fri, Dec 02, 2011 at 04:39:31PM -0500, Nicolas Pitre wrote:
> > > > OK, thanks for testing.  Since Russell didn't commit this to his stable 
> > > > branch yet I simply folded in your fix and added your tested-by tag.
> > > 
> > > So I'm about to push what I had out in the devel-stable branch... what
> > > am I supposed to do with this?
> > 
> > Okay, yet again I find myself having to wait hours for a reply - which
> > I expect will be forthcoming sometime tomorrow afternoon my time.  If
> > I wait, it means a delay of another 24 hours before I push my tree out.
> > 
> > This is not acceptable.
> 
> You asked at 11:56:09PM +0000.
> I replied at 19:33:34 -0500.
> That's a delay of 37 minutes 25 seconds.
> I even received my reply back from the mailing list server at
> 19:39:37 -0500 so hopefully you must have received it within the hour.
> Granted, you merged my branch at 23:27:59 +0000 so I hadn't replied yet.
> 
> However, the commit says:
> 
> Merge: 742eaa6a6e 0af362f844
> Author:     Russell King <rmk+kernel@arm.linux.org.uk>
> AuthorDate: Mon Dec 5 23:27:54 2011 +0000
> Commit:     Russell King <rmk+kernel@arm.linux.org.uk>
> CommitDate: Mon Dec 5 23:27:59 2011 +0000
> 
>     Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into devel-stable
> 
> So the commit message is written as if you pulled my branch directly 
> instead of a local branch, however my repo was already updated by that 
> time.  In fact it was updated 2 days ago.  Strangely enough, you still 
> have a version prior to that last update.
> 
> > So I'm pushing my tree out as-is - which means the stuff I pulled
> > previously is now frozen.
> 
> That's not a big problem.
> 
> Tony: could you please send your original patch directly to Russell with 
> my ACK?

OK, acked with your Linaro address as with your other patches in the
series. It's patch 7192/1.

Regards,

Tony

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

* [PATCH 07/23] ARM: plat-omap: remove arch specific special handling for ioremap
  2011-12-06  4:09           ` Nicolas Pitre
  2011-12-06  4:46             ` Tony Lindgren
@ 2011-12-06  8:55             ` Russell King - ARM Linux
  1 sibling, 0 replies; 42+ messages in thread
From: Russell King - ARM Linux @ 2011-12-06  8:55 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Dec 05, 2011 at 11:09:11PM -0500, Nicolas Pitre wrote:
> On Tue, 6 Dec 2011, Russell King - ARM Linux wrote:
> > On Mon, Dec 05, 2011 at 11:56:09PM +0000, Russell King - ARM Linux wrote:
> > > On Fri, Dec 02, 2011 at 04:39:31PM -0500, Nicolas Pitre wrote:
> > > > OK, thanks for testing.  Since Russell didn't commit this to his stable 
> > > > branch yet I simply folded in your fix and added your tested-by tag.
> > > 
> > > So I'm about to push what I had out in the devel-stable branch... what
> > > am I supposed to do with this?
> > 
> > Okay, yet again I find myself having to wait hours for a reply - which
> > I expect will be forthcoming sometime tomorrow afternoon my time.  If
> > I wait, it means a delay of another 24 hours before I push my tree out.
> > 
> > This is not acceptable.
> 
> You asked at 11:56:09PM +0000.
> I replied at 19:33:34 -0500.
> That's a delay of 37 minutes 25 seconds.
> I even received my reply back from the mailing list server at
> 19:39:37 -0500 so hopefully you must have received it within the hour.
> Granted, you merged my branch at 23:27:59 +0000 so I hadn't replied yet.

So?  I decided that I could _not_ wait for you to reply, because I'd
already waited three days for Tony to reply for his merge conflict, and
there's no way I was going to wait another 24 hours or so for someone
else to reply before pushing my tree out.

*Think* about what time it was over here, and think about what I was
about to do.

> However, the commit says:
> 
> Merge: 742eaa6a6e 0af362f844
> Author:     Russell King <rmk+kernel@arm.linux.org.uk>
> AuthorDate: Mon Dec 5 23:27:54 2011 +0000
> Commit:     Russell King <rmk+kernel@arm.linux.org.uk>
> CommitDate: Mon Dec 5 23:27:59 2011 +0000
> 
>     Merge branch 'vmalloc' of git://git.linaro.org/people/nico/linux into devel-stable
> 
> So the commit message is written as if you pulled my branch directly 
> instead of a local branch, however my repo was already updated by that 
> time.  In fact it was updated 2 days ago.  Strangely enough, you still 
> have a version prior to that last update.

I created this by using git merge of the original commit (0af362f844)
and editing the commit message.  As there's no way to preserve the
author date, that's unreliable.  And there's no way in hell I'd re-pull
it before you'd sent a new pull request.

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

* [PATCH 23/23] ARM: move VMALLOC_END down temporarily for shmobile
  2011-11-16  5:48 ` [PATCH 23/23] ARM: move VMALLOC_END down temporarily for shmobile Nicolas Pitre
@ 2011-12-16  5:34   ` Magnus Damm
  2011-12-17 16:41     ` Nicolas Pitre
  0 siblings, 1 reply; 42+ messages in thread
From: Magnus Damm @ 2011-12-16  5:34 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Nov 16, 2011 at 2:48 PM, Nicolas Pitre <nico@fluxnic.net> wrote:
> From: Nicolas Pitre <nicolas.pitre@linaro.org>
>
> THIS IS A TEMPORARY HACK. ?The purpose of this is _only_ to avoid a
> regression on an existing machine while a better fix is implemented.
>
> On shmobile the consistent DMA memory area was set to 158MB in commit
> 28f0721a79 with no explanation. ?The documented size for this area should
> vary between 2MB and 14MB, and none of the other ARM targets exceed that.
>
> The included #warning is therefore meant to be noisy on purpose to get
> shmobile maintainers attention and this commit reverted once this
> consistent DMA size conflict is resolved.
>
> Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
> Cc: Magnus Damm <damm@opensource.se>
> Cc: Paul Mundt <lethal@linux-sh.org>
> ---

Hi Nicolas,

Thanks for your work on this! Please excuse the slow progress. I have
now gotten around to remove the special mach-shmobile behavior.

The change is included in the unfortunately mangled patch below. Where
would you like me to submit the patch?

Thanks,

/ magnus

From: Magnus Damm <damm@opensource.se>

Update mach-shmobile code to use standard 2MiB
coherent DMA memory size instead of 158MiB.

The 158MiB memory area was used to support HD
resolution multimedia workloads using the same
legacy memory allocating solution as on SH.

There are no in-tree kernel dependencies on the
158MiB setting, and future development should
reserve and allocate memory using some other
method like for instance CMA.

Signed-off-by: Magnus Damm <damm@opensource.se>
---
 arch/arm/mach-shmobile/board-ag5evm.c   |    2 --
 arch/arm/mach-shmobile/board-ap4evb.c   |    2 --
 arch/arm/mach-shmobile/board-g3evm.c    |    2 --
 arch/arm/mach-shmobile/board-g4evm.c    |    2 --
 arch/arm/mach-shmobile/board-mackerel.c |    2 --
 5 files changed, 10 deletions(-)

--- 0001/arch/arm/mach-shmobile/board-ag5evm.c
+++ work/arch/arm/mach-shmobile/board-ag5evm.c  2011-12-16
14:04:50.000000000 +0900
@@ -500,8 +500,6 @@ static struct map_desc ag5evm_io_desc[]
 static void __init ag5evm_map_io(void)
 {
        iotable_init(ag5evm_io_desc, ARRAY_SIZE(ag5evm_io_desc));
-       /* DMA memory at 0xf6000000 - 0xffdfffff */
-       init_consistent_dma_size(158 << 20);

        /* setup early devices and console here as well */
        sh73a0_add_early_devices();
--- 0001/arch/arm/mach-shmobile/board-ap4evb.c
+++ work/arch/arm/mach-shmobile/board-ap4evb.c  2011-12-16
14:04:12.000000000 +0900
@@ -1213,8 +1213,6 @@ static struct map_desc ap4evb_io_desc[]
 static void __init ap4evb_map_io(void)
 {
        iotable_init(ap4evb_io_desc, ARRAY_SIZE(ap4evb_io_desc));
-       /* DMA memory at 0xf6000000 - 0xffdfffff */
-       init_consistent_dma_size(158 << 20);

        /* setup early devices and console here as well */
        sh7372_add_early_devices();
--- 0001/arch/arm/mach-shmobile/board-g3evm.c
+++ work/arch/arm/mach-shmobile/board-g3evm.c   2011-12-16
14:05:32.000000000 +0900
@@ -261,8 +261,6 @@ static struct map_desc g3evm_io_desc[] _
 static void __init g3evm_map_io(void)
 {
        iotable_init(g3evm_io_desc, ARRAY_SIZE(g3evm_io_desc));
-       /* DMA memory at 0xf6000000 - 0xffdfffff */
-       init_consistent_dma_size(158 << 20);

        /* setup early devices and console here as well */
        sh7367_add_early_devices();
--- 0001/arch/arm/mach-shmobile/board-g4evm.c
+++ work/arch/arm/mach-shmobile/board-g4evm.c   2011-12-16
14:05:05.000000000 +0900
@@ -275,8 +275,6 @@ static struct map_desc g4evm_io_desc[] _
 static void __init g4evm_map_io(void)
 {
        iotable_init(g4evm_io_desc, ARRAY_SIZE(g4evm_io_desc));
-       /* DMA memory at 0xf6000000 - 0xffdfffff */
-       init_consistent_dma_size(158 << 20);

        /* setup early devices and console here as well */
        sh7377_add_early_devices();
--- 0001/arch/arm/mach-shmobile/board-mackerel.c
+++ work/arch/arm/mach-shmobile/board-mackerel.c        2011-12-16
14:04:04.000000000 +0900
@@ -1402,8 +1402,6 @@ static struct map_desc mackerel_io_desc[
 static void __init mackerel_map_io(void)
 {
        iotable_init(mackerel_io_desc, ARRAY_SIZE(mackerel_io_desc));
-       /* DMA memory@0xf6000000 - 0xffdfffff */
-       init_consistent_dma_size(158 << 20);

        /* setup early devices and console here as well */
        sh7372_add_early_devices();

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

* [PATCH 23/23] ARM: move VMALLOC_END down temporarily for shmobile
  2011-12-16  5:34   ` Magnus Damm
@ 2011-12-17 16:41     ` Nicolas Pitre
  0 siblings, 0 replies; 42+ messages in thread
From: Nicolas Pitre @ 2011-12-17 16:41 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, 16 Dec 2011, Magnus Damm wrote:

> On Wed, Nov 16, 2011 at 2:48 PM, Nicolas Pitre <nico@fluxnic.net> wrote:
> > From: Nicolas Pitre <nicolas.pitre@linaro.org>
> >
> > THIS IS A TEMPORARY HACK. ?The purpose of this is _only_ to avoid a
> > regression on an existing machine while a better fix is implemented.
> >
> > On shmobile the consistent DMA memory area was set to 158MB in commit
> > 28f0721a79 with no explanation. ?The documented size for this area should
> > vary between 2MB and 14MB, and none of the other ARM targets exceed that.
> >
> > The included #warning is therefore meant to be noisy on purpose to get
> > shmobile maintainers attention and this commit reverted once this
> > consistent DMA size conflict is resolved.
> >
> > Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
> > Cc: Magnus Damm <damm@opensource.se>
> > Cc: Paul Mundt <lethal@linux-sh.org>
> > ---
> 
> Hi Nicolas,
> 
> Thanks for your work on this! Please excuse the slow progress. I have
> now gotten around to remove the special mach-shmobile behavior.
> 
> The change is included in the unfortunately mangled patch below. Where
> would you like me to submit the patch?

Just send it to me non mangled and I'll take care of it.

Thanks!


Nicolas

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

end of thread, other threads:[~2011-12-17 16:41 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-16  5:48 [PATCH 0/23] mach/vmalloc.h removal, and ioremap optimization Nicolas Pitre
2011-11-16  5:48 ` [PATCH 01/23] ARM: mach-dove: remove inclusion of <mach/vmalloc.h> Nicolas Pitre
2011-11-16  5:48 ` [PATCH 02/23] ARM: mach-prima2: don't define SIRFSOC_VA in terms of VMALLOC_END Nicolas Pitre
2011-11-16  5:48 ` [PATCH 03/23] ARM: plat-mxc: remove inclusion of <mach/vmalloc.h> Nicolas Pitre
2011-11-16  5:48 ` [PATCH 04/23] ARM: mach-at91: remove arch specific special handling for ioremap Nicolas Pitre
2011-11-16  5:48 ` [PATCH 05/23] ARM: mach-davinci: " Nicolas Pitre
2011-11-16  5:48 ` [PATCH 06/23] ARM: mach-tegra: " Nicolas Pitre
2011-11-16  5:48 ` [PATCH 07/23] ARM: plat-omap: " Nicolas Pitre
2011-11-18 18:39   ` Kevin Hilman
2011-12-02 20:21   ` Tony Lindgren
2011-12-02 21:39     ` Nicolas Pitre
2011-12-05 23:21       ` Tony Lindgren
2011-12-05 23:56       ` Russell King - ARM Linux
2011-12-06  0:33         ` Nicolas Pitre
2011-12-06  0:36         ` Russell King - ARM Linux
2011-12-06  4:09           ` Nicolas Pitre
2011-12-06  4:46             ` Tony Lindgren
2011-12-06  8:55             ` Russell King - ARM Linux
2011-11-16  5:48 ` [PATCH 08/23] ARM: mach-bcmring: use proper constant to identify DMA memory area Nicolas Pitre
2011-11-16  5:48 ` [PATCH 09/23] ARM: mach-orion5x: remove arch specific special handling for ioremap Nicolas Pitre
2011-11-16  5:48 ` [PATCH 10/23] ARM: mach-kirkwood: " Nicolas Pitre
2011-11-16  5:48 ` [PATCH 11/23] ARM: mach-ixp23xx: " Nicolas Pitre
2011-11-18  0:03   ` Deepak Saxena
2011-11-16  5:48 ` [PATCH 12/23] ARM: plat-iop: " Nicolas Pitre
2011-11-16  5:48 ` [PATCH 13/23] ARM: versatile: remove overlapping map_desc entry Nicolas Pitre
2011-11-16  5:48 ` [PATCH 14/23] ARM: realview: fix map_desc alignment Nicolas Pitre
2011-11-16  5:48 ` [PATCH 15/23] ARM: realview-eb11mp: " Nicolas Pitre
2011-11-16  5:48 ` [PATCH 16/23] ARM: sort the meminfo array earlier Nicolas Pitre
2011-11-16  5:48 ` [PATCH 17/23] ARM: move initialization of the high_memory variable earlier Nicolas Pitre
2011-11-16  5:48 ` [PATCH 18/23] mm: add vm_area_add_early() Nicolas Pitre
2011-11-16  5:48 ` [PATCH 19/23] ARM: move iotable mappings within the vmalloc region Nicolas Pitre
2011-11-16  5:48 ` [PATCH 20/23] ARM: simplify __iounmap() when dealing with section based mapping Nicolas Pitre
2011-11-16  5:48 ` [PATCH 21/23] ARM: add generic ioremap optimization by reusing static mappings Nicolas Pitre
2011-11-22 10:16   ` Russell King - ARM Linux
2011-11-22 13:44     ` Nicolas Pitre
2011-11-16  5:48 ` [PATCH 22/23] ARM: big removal of now unused vmalloc.h files Nicolas Pitre
2011-11-16  5:48 ` [PATCH 23/23] ARM: move VMALLOC_END down temporarily for shmobile Nicolas Pitre
2011-12-16  5:34   ` Magnus Damm
2011-12-17 16:41     ` Nicolas Pitre
2011-11-16 17:13 ` [PATCH 0/23] mach/vmalloc.h removal, and ioremap optimization Stephen Warren
2011-11-16 23:08   ` Nicolas Pitre
2011-11-18 10:04 ` Jamie Iles

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).