All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/19] removal of mach/vmalloc.h and generic optimizations
@ 2011-09-16  7:07 Nicolas Pitre
  2011-09-16  7:07 ` [PATCH 01/19] ARM: sort the meminfo array earlier Nicolas Pitre
                   ` (20 more replies)
  0 siblings, 21 replies; 49+ messages in thread
From: Nicolas Pitre @ 2011-09-16  7:07 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 also provides a net reduction of more than 1200 lines of code.

Those patches are also available in the following repository:

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


Nicolas Pitre (19):
      ARM: sort the meminfo array earlier
      ARM: mach-dove: remove inclusion of <mach/vmalloc.h>
      ARM: mach-prima2: don't define SIRFSOC_VA in terms of VMALLOC_END
      ARM: plat-mxc: remove inclusion of <mach/vmalloc.h>
      ARM: plat-omap: don't define OMAP1_SRAM_VA in terms of VMALLOC_END
      ARM: mach-at91: remove arch specific special handling for ioremap
      ARM: mach-davinci: remove arch specific special handling for ioremap
      ARM: mach-tegra: remove arch specific special handling for ioremap
      ARM: plat-omap: remove arch specific special handling for ioremap
      ARM: mach-bcmring: use proper constant to identify DMA memory area
      ARM: mach-orion5x: remove arch specific special handling for ioremap
      ARM: mach-kirkwood: remove arch specific special handling for ioremap
      ARM: mach-ixp23xx: remove arch specific special handling for ioremap
      ARM: plat-iop: remove arch specific special handling for ioremap
      mm: add vm_area_add_early()
      ARM: move iotable mappings within the vmalloc region
      ARM: simplify __iounmap() when dealing with section based mapping
      ARM: add generic ioremap optimization by reusing static mappings
      ARM: big removal of now unused vmalloc.h files

 arch/arm/include/asm/pgtable.h                  |    8 +-
 arch/arm/kernel/setup.c                         |    8 +
 arch/arm/mach-at91/include/mach/io.h            |    8 -
 arch/arm/mach-at91/include/mach/vmalloc.h       |   26 ---
 arch/arm/mach-at91/setup.c                      |   18 --
 arch/arm/mach-bcmring/dma.c                     |    2 +-
 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/Makefile                  |    2 +-
 arch/arm/mach-davinci/include/mach/io.h         |    8 -
 arch/arm/mach-davinci/include/mach/vmalloc.h    |   14 --
 arch/arm/mach-davinci/io.c                      |   48 ------
 arch/arm/mach-dove/include/mach/dove.h          |    2 -
 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-exynos4/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-integrator/include/mach/vmalloc.h |   20 ---
 arch/arm/mach-iop13xx/include/mach/vmalloc.h    |    4 -
 arch/arm/mach-iop32x/include/mach/io.h          |    7 -
 arch/arm/mach-iop32x/include/mach/vmalloc.h     |    5 -
 arch/arm/mach-iop33x/include/mach/io.h          |    7 -
 arch/arm/mach-iop33x/include/mach/vmalloc.h     |    5 -
 arch/arm/mach-ixp2000/include/mach/vmalloc.h    |   20 ---
 arch/arm/mach-ixp23xx/include/mach/io.h         |   29 ----
 arch/arm/mach-ixp23xx/include/mach/vmalloc.h    |   10 --
 arch/arm/mach-ixp4xx/include/mach/vmalloc.h     |    5 -
 arch/arm/mach-kirkwood/include/mach/io.h        |   25 ---
 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-nuc93x/include/mach/vmalloc.h     |   23 ---
 arch/arm/mach-omap1/include/mach/vmalloc.h      |   20 ---
 arch/arm/mach-omap2/include/mach/vmalloc.h      |   20 ---
 arch/arm/mach-orion5x/include/mach/io.h         |   25 ---
 arch/arm/mach-orion5x/include/mach/vmalloc.h    |    5 -
 arch/arm/mach-pnx4008/include/mach/vmalloc.h    |   20 ---
 arch/arm/mach-prima2/include/mach/map.h         |    6 +-
 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/io.h           |    6 -
 arch/arm/mach-tegra/include/mach/vmalloc.h      |   28 ----
 arch/arm/mach-tegra/io.c                        |   21 ---
 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/mm/init.c                              |   10 --
 arch/arm/mm/ioremap.c                           |   70 ++++++---
 arch/arm/mm/mm.h                                |   14 ++
 arch/arm/mm/mmu.c                               |   43 ++++--
 arch/arm/plat-iop/Makefile                      |    2 -
 arch/arm/plat-iop/io.c                          |   59 -------
 arch/arm/plat-mxc/include/mach/mx1.h            |    2 -
 arch/arm/plat-mxc/include/mach/vmalloc.h        |   22 ---
 arch/arm/plat-omap/Makefile                     |    2 +-
 arch/arm/plat-omap/include/plat/io.h            |    6 -
 arch/arm/plat-omap/io.c                         |  141 -----------------
 arch/arm/plat-omap/sram.c                       |    2 +-
 arch/arm/plat-spear/include/plat/vmalloc.h      |   19 ---
 arch/arm/plat-tcc/include/mach/vmalloc.h        |   10 --
 include/linux/vmalloc.h                         |    1 +
 mm/vmalloc.c                                    |   28 +++-
 88 files changed, 136 insertions(+), 1346 deletions(-)

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

* [PATCH 01/19] ARM: sort the meminfo array earlier
  2011-09-16  7:07 [PATCH 0/19] removal of mach/vmalloc.h and generic optimizations Nicolas Pitre
@ 2011-09-16  7:07 ` Nicolas Pitre
  2011-09-16 17:21   ` Stephen Boyd
  2011-09-17 15:05   ` Russell King - ARM Linux
  2011-09-16  7:07 ` [PATCH 02/19] ARM: mach-dove: remove inclusion of <mach/vmalloc.h> Nicolas Pitre
                   ` (19 subsequent siblings)
  20 siblings, 2 replies; 49+ messages in thread
From: Nicolas Pitre @ 2011-09-16  7:07 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() can work
properly.

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

diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index 70bca649e9..56cd8c351c 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -29,6 +29,7 @@
 #include <linux/fs.h>
 #include <linux/proc_fs.h>
 #include <linux/memblock.h>
+#include <linux/sort.h>
 
 #include <asm/unified.h>
 #include <asm/cpu.h>
@@ -875,6 +876,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)
 {
@@ -903,6 +910,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 91bca355cd..7080f10cc2 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -19,7 +19,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>
@@ -318,19 +317,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-rc0

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

* [PATCH 02/19] ARM: mach-dove: remove inclusion of <mach/vmalloc.h>
  2011-09-16  7:07 [PATCH 0/19] removal of mach/vmalloc.h and generic optimizations Nicolas Pitre
  2011-09-16  7:07 ` [PATCH 01/19] ARM: sort the meminfo array earlier Nicolas Pitre
@ 2011-09-16  7:07 ` Nicolas Pitre
  2011-09-16  7:07 ` [PATCH 03/19] ARM: mach-prima2: don't define SIRFSOC_VA in terms of VMALLOC_END Nicolas Pitre
                   ` (18 subsequent siblings)
  20 siblings, 0 replies; 49+ messages in thread
From: Nicolas Pitre @ 2011-09-16  7:07 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-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-rc0

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

* [PATCH 03/19] ARM: mach-prima2: don't define SIRFSOC_VA in terms of VMALLOC_END
  2011-09-16  7:07 [PATCH 0/19] removal of mach/vmalloc.h and generic optimizations Nicolas Pitre
  2011-09-16  7:07 ` [PATCH 01/19] ARM: sort the meminfo array earlier Nicolas Pitre
  2011-09-16  7:07 ` [PATCH 02/19] ARM: mach-dove: remove inclusion of <mach/vmalloc.h> Nicolas Pitre
@ 2011-09-16  7:07 ` Nicolas Pitre
  2011-09-16  7:25   ` Barry Song
  2011-09-16  7:07 ` [PATCH 04/19] ARM: plat-mxc: remove inclusion of <mach/vmalloc.h> Nicolas Pitre
                   ` (17 subsequent siblings)
  20 siblings, 1 reply; 49+ messages in thread
From: Nicolas Pitre @ 2011-09-16  7:07 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>
---
 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-rc0

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

* [PATCH 04/19] ARM: plat-mxc: remove inclusion of <mach/vmalloc.h>
  2011-09-16  7:07 [PATCH 0/19] removal of mach/vmalloc.h and generic optimizations Nicolas Pitre
                   ` (2 preceding siblings ...)
  2011-09-16  7:07 ` [PATCH 03/19] ARM: mach-prima2: don't define SIRFSOC_VA in terms of VMALLOC_END Nicolas Pitre
@ 2011-09-16  7:07 ` Nicolas Pitre
  2011-09-16  7:07 ` [PATCH 05/19] ARM: plat-omap: don't define OMAP1_SRAM_VA in terms of VMALLOC_END Nicolas Pitre
                   ` (16 subsequent siblings)
  20 siblings, 0 replies; 49+ messages in thread
From: Nicolas Pitre @ 2011-09-16  7:07 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-rc0

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

* [PATCH 05/19] ARM: plat-omap: don't define OMAP1_SRAM_VA in terms of VMALLOC_END
  2011-09-16  7:07 [PATCH 0/19] removal of mach/vmalloc.h and generic optimizations Nicolas Pitre
                   ` (3 preceding siblings ...)
  2011-09-16  7:07 ` [PATCH 04/19] ARM: plat-mxc: remove inclusion of <mach/vmalloc.h> Nicolas Pitre
@ 2011-09-16  7:07 ` Nicolas Pitre
  2011-09-16  7:07 ` [PATCH 06/19] ARM: mach-at91: remove arch specific special handling for ioremap Nicolas Pitre
                   ` (15 subsequent siblings)
  20 siblings, 0 replies; 49+ messages in thread
From: Nicolas Pitre @ 2011-09-16  7:07 UTC (permalink / raw)
  To: linux-arm-kernel

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

... as it is going to move away.

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

diff --git a/arch/arm/plat-omap/sram.c b/arch/arm/plat-omap/sram.c
index 363c91e44e..6835b89097 100644
--- a/arch/arm/plat-omap/sram.c
+++ b/arch/arm/plat-omap/sram.c
@@ -41,7 +41,7 @@
 #endif
 
 #define OMAP1_SRAM_PA		0x20000000
-#define OMAP1_SRAM_VA		VMALLOC_END
+#define OMAP1_SRAM_VA		0xd8000000
 #define OMAP2_SRAM_PUB_PA	(OMAP2_SRAM_PA + 0xf800)
 #define OMAP2_SRAM_VA		0xfe400000
 #define OMAP2_SRAM_PUB_VA	(OMAP2_SRAM_VA + 0x800)
-- 
1.7.7-rc0

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

* [PATCH 06/19] ARM: mach-at91: remove arch specific special handling for ioremap
  2011-09-16  7:07 [PATCH 0/19] removal of mach/vmalloc.h and generic optimizations Nicolas Pitre
                   ` (4 preceding siblings ...)
  2011-09-16  7:07 ` [PATCH 05/19] ARM: plat-omap: don't define OMAP1_SRAM_VA in terms of VMALLOC_END Nicolas Pitre
@ 2011-09-16  7:07 ` Nicolas Pitre
  2011-09-19 13:35   ` Jean-Christophe PLAGNIOL-VILLARD
  2011-09-16  7:07 ` [PATCH 07/19] ARM: mach-davinci: " Nicolas Pitre
                   ` (14 subsequent siblings)
  20 siblings, 1 reply; 49+ messages in thread
From: Nicolas Pitre @ 2011-09-16  7:07 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-rc0

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

* [PATCH 07/19] ARM: mach-davinci: remove arch specific special handling for ioremap
  2011-09-16  7:07 [PATCH 0/19] removal of mach/vmalloc.h and generic optimizations Nicolas Pitre
                   ` (5 preceding siblings ...)
  2011-09-16  7:07 ` [PATCH 06/19] ARM: mach-at91: remove arch specific special handling for ioremap Nicolas Pitre
@ 2011-09-16  7:07 ` Nicolas Pitre
  2011-09-16  7:07 ` [PATCH 08/19] ARM: mach-tegra: " Nicolas Pitre
                   ` (13 subsequent siblings)
  20 siblings, 0 replies; 49+ messages in thread
From: Nicolas Pitre @ 2011-09-16  7:07 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 0b87a1ca2b..d6a8879aa6 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 \
 			   gpio.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-rc0

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

* [PATCH 08/19] ARM: mach-tegra: remove arch specific special handling for ioremap
  2011-09-16  7:07 [PATCH 0/19] removal of mach/vmalloc.h and generic optimizations Nicolas Pitre
                   ` (6 preceding siblings ...)
  2011-09-16  7:07 ` [PATCH 07/19] ARM: mach-davinci: " Nicolas Pitre
@ 2011-09-16  7:07 ` Nicolas Pitre
  2011-09-16  7:07 ` [PATCH 09/19] ARM: plat-omap: " Nicolas Pitre
                   ` (12 subsequent siblings)
  20 siblings, 0 replies; 49+ messages in thread
From: Nicolas Pitre @ 2011-09-16  7:07 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 4cea2230c8..67fcb38c09 100644
--- a/arch/arm/mach-tegra/include/mach/io.h
+++ b/arch/arm/mach-tegra/include/mach/io.h
@@ -65,12 +65,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) ((void __iomem *) 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 ea50fe28cf..d9d517dc4c 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-rc0

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

* [PATCH 09/19] ARM: plat-omap: remove arch specific special handling for ioremap
  2011-09-16  7:07 [PATCH 0/19] removal of mach/vmalloc.h and generic optimizations Nicolas Pitre
                   ` (7 preceding siblings ...)
  2011-09-16  7:07 ` [PATCH 08/19] ARM: mach-tegra: " Nicolas Pitre
@ 2011-09-16  7:07 ` Nicolas Pitre
  2011-09-16  7:07 ` [PATCH 10/19] ARM: mach-bcmring: use proper constant to identify DMA memory area Nicolas Pitre
                   ` (11 subsequent siblings)
  20 siblings, 0 replies; 49+ messages in thread
From: Nicolas Pitre @ 2011-09-16  7:07 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/plat-omap/Makefile          |    2 +-
 arch/arm/plat-omap/include/plat/io.h |    6 --
 arch/arm/plat-omap/io.c              |  141 ----------------------------------
 3 files changed, 1 insertions(+), 148 deletions(-)
 delete mode 100644 arch/arm/plat-omap/io.c

diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile
index f0233e6abc..1db3f2f88c 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/include/plat/io.h b/arch/arm/plat-omap/include/plat/io.h
index d72ec85c97..92e6d53ed5 100644
--- a/arch/arm/plat-omap/include/plat/io.h
+++ b/arch/arm/plat-omap/include/plat/io.h
@@ -303,12 +303,6 @@ extern void omap2_init_common_infrastructure(void);
 extern void omap2_init_common_devices(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);
-
 #endif
 
 #endif
diff --git a/arch/arm/plat-omap/io.c b/arch/arm/plat-omap/io.c
deleted file mode 100644
index f1ecfa9fc6..0000000000
--- a/arch/arm/plat-omap/io.c
+++ /dev/null
@@ -1,141 +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 <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)))
-
-/*
- * Intercept ioremap() requests for addresses in our fixed mapping regions.
- */
-void __iomem *omap_ioremap(unsigned long p, size_t size, unsigned int type)
-{
-#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);
-- 
1.7.7-rc0

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

* [PATCH 10/19] ARM: mach-bcmring: use proper constant to identify DMA memory area
  2011-09-16  7:07 [PATCH 0/19] removal of mach/vmalloc.h and generic optimizations Nicolas Pitre
                   ` (8 preceding siblings ...)
  2011-09-16  7:07 ` [PATCH 09/19] ARM: plat-omap: " Nicolas Pitre
@ 2011-09-16  7:07 ` Nicolas Pitre
  2011-09-16  7:07 ` [PATCH 11/19] ARM: mach-orion5x: remove arch specific special handling for ioremap Nicolas Pitre
                   ` (10 subsequent siblings)
  20 siblings, 0 replies; 49+ messages in thread
From: Nicolas Pitre @ 2011-09-16  7:07 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 0ca0005066..42021804b9 100644
--- a/arch/arm/mach-bcmring/dma.c
+++ b/arch/arm/mach-bcmring/dma.c
@@ -1613,7 +1613,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-rc0

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

* [PATCH 11/19] ARM: mach-orion5x: remove arch specific special handling for ioremap
  2011-09-16  7:07 [PATCH 0/19] removal of mach/vmalloc.h and generic optimizations Nicolas Pitre
                   ` (9 preceding siblings ...)
  2011-09-16  7:07 ` [PATCH 10/19] ARM: mach-bcmring: use proper constant to identify DMA memory area Nicolas Pitre
@ 2011-09-16  7:07 ` Nicolas Pitre
  2011-09-16  7:07 ` [PATCH 12/19] ARM: mach-kirkwood: " Nicolas Pitre
                   ` (9 subsequent siblings)
  20 siblings, 0 replies; 49+ messages in thread
From: Nicolas Pitre @ 2011-09-16  7:07 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-rc0

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

* [PATCH 12/19] ARM: mach-kirkwood: remove arch specific special handling for ioremap
  2011-09-16  7:07 [PATCH 0/19] removal of mach/vmalloc.h and generic optimizations Nicolas Pitre
                   ` (10 preceding siblings ...)
  2011-09-16  7:07 ` [PATCH 11/19] ARM: mach-orion5x: remove arch specific special handling for ioremap Nicolas Pitre
@ 2011-09-16  7:07 ` Nicolas Pitre
  2011-09-16  7:07 ` [PATCH 13/19] ARM: mach-ixp23xx: " Nicolas Pitre
                   ` (8 subsequent siblings)
  20 siblings, 0 replies; 49+ messages in thread
From: Nicolas Pitre @ 2011-09-16  7:07 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-rc0

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

* [PATCH 13/19] ARM: mach-ixp23xx: remove arch specific special handling for ioremap
  2011-09-16  7:07 [PATCH 0/19] removal of mach/vmalloc.h and generic optimizations Nicolas Pitre
                   ` (11 preceding siblings ...)
  2011-09-16  7:07 ` [PATCH 12/19] ARM: mach-kirkwood: " Nicolas Pitre
@ 2011-09-16  7:07 ` Nicolas Pitre
  2011-09-16  7:07 ` [PATCH 14/19] ARM: plat-iop: " Nicolas Pitre
                   ` (7 subsequent siblings)
  20 siblings, 0 replies; 49+ messages in thread
From: Nicolas Pitre @ 2011-09-16  7:07 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-rc0

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

* [PATCH 14/19] ARM: plat-iop: remove arch specific special handling for ioremap
  2011-09-16  7:07 [PATCH 0/19] removal of mach/vmalloc.h and generic optimizations Nicolas Pitre
                   ` (12 preceding siblings ...)
  2011-09-16  7:07 ` [PATCH 13/19] ARM: mach-ixp23xx: " Nicolas Pitre
@ 2011-09-16  7:07 ` Nicolas Pitre
  2011-09-16  7:07 ` [PATCH 15/19] mm: add vm_area_add_early() Nicolas Pitre
                   ` (6 subsequent siblings)
  20 siblings, 0 replies; 49+ messages in thread
From: Nicolas Pitre @ 2011-09-16  7:07 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-rc0

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

* [PATCH 15/19] mm: add vm_area_add_early()
  2011-09-16  7:07 [PATCH 0/19] removal of mach/vmalloc.h and generic optimizations Nicolas Pitre
                   ` (13 preceding siblings ...)
  2011-09-16  7:07 ` [PATCH 14/19] ARM: plat-iop: " Nicolas Pitre
@ 2011-09-16  7:07 ` Nicolas Pitre
  2011-09-16  7:07 ` [PATCH 16/19] ARM: move iotable mappings within the vmalloc region Nicolas Pitre
                   ` (5 subsequent siblings)
  20 siblings, 0 replies; 49+ messages in thread
From: Nicolas Pitre @ 2011-09-16  7:07 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 9332e52ea8..e7d2cba995 100644
--- a/include/linux/vmalloc.h
+++ b/include/linux/vmalloc.h
@@ -130,6 +130,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 7ef0903058..bf20a0ff95 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-rc0

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

* [PATCH 16/19] ARM: move iotable mappings within the vmalloc region
  2011-09-16  7:07 [PATCH 0/19] removal of mach/vmalloc.h and generic optimizations Nicolas Pitre
                   ` (14 preceding siblings ...)
  2011-09-16  7:07 ` [PATCH 15/19] mm: add vm_area_add_early() Nicolas Pitre
@ 2011-09-16  7:07 ` Nicolas Pitre
  2011-09-16 10:39   ` Jamie Iles
  2011-09-17 15:19   ` Russell King - ARM Linux
  2011-09-16  7:07 ` [PATCH 17/19] ARM: simplify __iounmap() when dealing with section based mapping Nicolas Pitre
                   ` (4 subsequent siblings)
  20 siblings, 2 replies; 49+ messages in thread
From: Nicolas Pitre @ 2011-09-16  7:07 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.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
---
 arch/arm/include/asm/pgtable.h |    8 +------
 arch/arm/mm/mmu.c              |   42 +++++++++++++++++++++++++++++----------
 2 files changed, 32 insertions(+), 18 deletions(-)

diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h
index 5750704e02..950dee3ce2 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>
 
 /*
@@ -31,15 +30,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
 
 /*
  * Hardware-wise, we have a two level page table structure, where the first
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 594d677b92..6996576488 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>
@@ -677,9 +678,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);
 	}
 
@@ -721,18 +723,29 @@ static void __init create_mapping(struct map_desc *md)
  */
 void __init iotable_init(struct map_desc *io_desc, int nr)
 {
-	int i;
+	struct map_desc *md;
+	struct vm_struct *vm;
+
+	vm = __va(memblock_alloc(sizeof(*vm) * nr, __alignof__(*vm)));
+	memset(vm, 0, sizeof(*vm) * nr);
 
-	for (i = 0; i < nr; i++)
-		create_mapping(io_desc + i);
+	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 *)(0xf0000000UL - 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)
 {
@@ -853,6 +866,7 @@ void __init sanity_check_meminfo(void)
 #endif
 	meminfo.nr_banks = j;
 	memblock_set_current_limit(lowmem_limit);
+	high_memory = __va(lowmem_limit - 1) + 1;
 }
 
 static inline void prepare_page_table(void)
@@ -882,10 +896,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 += PGDIR_SIZE)
+	     addr < VMALLOC_START; addr += PGDIR_SIZE)
 		pmd_clear(pmd_off_k(addr));
 }
 
@@ -910,8 +924,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 below VMALLOC_END, 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.
@@ -977,6 +991,12 @@ static void __init devicemaps_init(struct machine_desc *mdesc)
 	}
 
 	/*
+	 * Clear the vmalloc area.
+	 */
+	for (addr = VMALLOC_START; addr < VMALLOC_END; addr += PGDIR_SIZE)
+		pmd_clear(pmd_off_k(addr));
+
+	/*
 	 * Ask the machine support to map in the statically mapped devices.
 	 */
 	if (mdesc->map_io)
-- 
1.7.7-rc0

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

* [PATCH 17/19] ARM: simplify __iounmap() when dealing with section based mapping
  2011-09-16  7:07 [PATCH 0/19] removal of mach/vmalloc.h and generic optimizations Nicolas Pitre
                   ` (15 preceding siblings ...)
  2011-09-16  7:07 ` [PATCH 16/19] ARM: move iotable mappings within the vmalloc region Nicolas Pitre
@ 2011-09-16  7:07 ` Nicolas Pitre
  2011-09-16  7:07 ` [PATCH 18/19] ARM: add generic ioremap optimization by reusing static mappings Nicolas Pitre
                   ` (3 subsequent siblings)
  20 siblings, 0 replies; 49+ messages in thread
From: Nicolas Pitre @ 2011-09-16  7:07 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 ab506272b2..1ddcd8aa34 100644
--- a/arch/arm/mm/ioremap.c
+++ b/arch/arm/mm/ioremap.c
@@ -293,26 +293,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-rc0

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

* [PATCH 18/19] ARM: add generic ioremap optimization by reusing static mappings
  2011-09-16  7:07 [PATCH 0/19] removal of mach/vmalloc.h and generic optimizations Nicolas Pitre
                   ` (16 preceding siblings ...)
  2011-09-16  7:07 ` [PATCH 17/19] ARM: simplify __iounmap() when dealing with section based mapping Nicolas Pitre
@ 2011-09-16  7:07 ` Nicolas Pitre
  2011-09-16  7:07 ` [PATCH 19/19] ARM: big removal of now unused vmalloc.h files Nicolas Pitre
                   ` (2 subsequent siblings)
  20 siblings, 0 replies; 49+ messages in thread
From: Nicolas Pitre @ 2011-09-16  7:07 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 |   60 ++++++++++++++++++++++++++++++++++--------------
 arch/arm/mm/mm.h      |   14 +++++++++++
 arch/arm/mm/mmu.c     |    3 +-
 3 files changed, 58 insertions(+), 19 deletions(-)

diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c
index 1ddcd8aa34..8a6ceb10d6 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)
 {
@@ -216,6 +210,28 @@ 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);
+
 	area = get_vm_area_caller(size, VM_IOREMAP, caller);
  	if (!area)
  		return NULL;
@@ -292,26 +308,34 @@ EXPORT_SYMBOL(__arm_ioremap);
 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 010566799c..7b7c9ca079 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. field.
+ */
+
+/* (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 6996576488..b5eddf1fff 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -734,7 +734,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-rc0

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

* [PATCH 19/19] ARM: big removal of now unused vmalloc.h files
  2011-09-16  7:07 [PATCH 0/19] removal of mach/vmalloc.h and generic optimizations Nicolas Pitre
                   ` (17 preceding siblings ...)
  2011-09-16  7:07 ` [PATCH 18/19] ARM: add generic ioremap optimization by reusing static mappings Nicolas Pitre
@ 2011-09-16  7:07 ` Nicolas Pitre
  2011-09-16 13:26 ` [PATCH 0/19] removal of mach/vmalloc.h and generic optimizations Jamie Iles
  2011-09-17 20:52 ` Arnd Bergmann
  20 siblings, 0 replies; 49+ messages in thread
From: Nicolas Pitre @ 2011-09-16  7:07 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       |   26 ---------------------
 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-exynos4/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-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-nuc93x/include/mach/vmalloc.h     |   23 ------------------
 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-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 --------
 58 files changed, 0 insertions(+), 872 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-exynos4/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-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-nuc93x/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-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 8eb459f3f5..0000000000
--- a/arch/arm/mach-at91/include/mach/vmalloc.h
+++ /dev/null
@@ -1,26 +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
-
-#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-exynos4/include/mach/vmalloc.h b/arch/arm/mach-exynos4/include/mach/vmalloc.h
deleted file mode 100644
index 284330e571..0000000000
--- a/arch/arm/mach-exynos4/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-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-nuc93x/include/mach/vmalloc.h b/arch/arm/mach-nuc93x/include/mach/vmalloc.h
deleted file mode 100644
index 7d11a5f076..0000000000
--- a/arch/arm/mach-nuc93x/include/mach/vmalloc.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * arch/arm/mach-nuc93x/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-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-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-rc0

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

* [PATCH 03/19] ARM: mach-prima2: don't define SIRFSOC_VA in terms of VMALLOC_END
  2011-09-16  7:07 ` [PATCH 03/19] ARM: mach-prima2: don't define SIRFSOC_VA in terms of VMALLOC_END Nicolas Pitre
@ 2011-09-16  7:25   ` Barry Song
  0 siblings, 0 replies; 49+ messages in thread
From: Barry Song @ 2011-09-16  7:25 UTC (permalink / raw)
  To: linux-arm-kernel

2011/9/16 Nicolas Pitre <nico@fluxnic.net>:
> 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-rc0

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

* [PATCH 16/19] ARM: move iotable mappings within the vmalloc region
  2011-09-16  7:07 ` [PATCH 16/19] ARM: move iotable mappings within the vmalloc region Nicolas Pitre
@ 2011-09-16 10:39   ` Jamie Iles
  2011-09-17 15:19   ` Russell King - ARM Linux
  1 sibling, 0 replies; 49+ messages in thread
From: Jamie Iles @ 2011-09-16 10:39 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Nicolas,

On Fri, Sep 16, 2011 at 03:07:27AM -0400, Nicolas Pitre wrote:
> 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.
> 
> Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
> ---
>  arch/arm/include/asm/pgtable.h |    8 +------
>  arch/arm/mm/mmu.c              |   42 +++++++++++++++++++++++++++++----------
>  2 files changed, 32 insertions(+), 18 deletions(-)
> 
> diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h
> index 5750704e02..950dee3ce2 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>
>  
>  /*
> @@ -31,15 +30,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

Only a minor nit, but I think this requires an update to 
Documentation/arm/memory.txt as this says that VMALLOC_END -> feffffff 
is free for platform use but this won't ever be true now.

Jamie

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

* [PATCH 0/19] removal of mach/vmalloc.h and generic optimizations
  2011-09-16  7:07 [PATCH 0/19] removal of mach/vmalloc.h and generic optimizations Nicolas Pitre
                   ` (18 preceding siblings ...)
  2011-09-16  7:07 ` [PATCH 19/19] ARM: big removal of now unused vmalloc.h files Nicolas Pitre
@ 2011-09-16 13:26 ` Jamie Iles
  2011-09-17 20:52 ` Arnd Bergmann
  20 siblings, 0 replies; 49+ messages in thread
From: Jamie Iles @ 2011-09-16 13:26 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Sep 16, 2011 at 03:07:11AM -0400, 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 also provides a net reduction of more than 1200 lines of code.

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

Jamie

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

* [PATCH 01/19] ARM: sort the meminfo array earlier
  2011-09-16  7:07 ` [PATCH 01/19] ARM: sort the meminfo array earlier Nicolas Pitre
@ 2011-09-16 17:21   ` Stephen Boyd
  2011-09-16 18:09     ` Nicolas Pitre
  2011-09-17 15:05   ` Russell King - ARM Linux
  1 sibling, 1 reply; 49+ messages in thread
From: Stephen Boyd @ 2011-09-16 17:21 UTC (permalink / raw)
  To: linux-arm-kernel

On 9/16/2011 12:07 AM, Nicolas Pitre wrote:
> @@ -875,6 +876,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;

This looks like:

    return clamp(bank_pfn_start(a) - bank_pfn_start(b), -1, 1);


> +}
>  
>  void __init setup_arch(char **cmdline_p)
>  {
> @@ -903,6 +910,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 91bca355cd..7080f10cc2 100644
> --- a/arch/arm/mm/init.c
> +++ b/arch/arm/mm/init.c
> @@ -318,19 +317,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);
> -

Why not call sanity_check_meminfo() here?

>  	memblock_init();
>  	for (i = 0; i < mi->nr_banks; i++)
>  		memblock_add(mi->bank[i].start, mi->bank[i].size);
-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

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

* [PATCH 01/19] ARM: sort the meminfo array earlier
  2011-09-16 17:21   ` Stephen Boyd
@ 2011-09-16 18:09     ` Nicolas Pitre
  2011-09-16 19:21       ` Stephen Boyd
  0 siblings, 1 reply; 49+ messages in thread
From: Nicolas Pitre @ 2011-09-16 18:09 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, 16 Sep 2011, Stephen Boyd wrote:

> On 9/16/2011 12:07 AM, Nicolas Pitre wrote:
> > @@ -875,6 +876,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;
> 
> This looks like:
> 
>     return clamp(bank_pfn_start(a) - bank_pfn_start(b), -1, 1);

Won't work.  The pfn is of an unsigned type, hence the subtraction 
result will also be unsigned.  The code above looks a bit odd, but there 
is an implicit cast to a signed result with the result stored into a 
long.

What would have been even clearer, and possibly more efficient as well, 
is something like this:

	if (bank_pfn_start(a) < bank_pfn_start(b))
		return -1;
	if (bank_pfn_start(a) > bank_pfn_start(b))
		return 1;
	return 0;

But the goal here was to simply move the code, changing it would warrant 
a separate patch.

> > diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
> > index 91bca355cd..7080f10cc2 100644
> > --- a/arch/arm/mm/init.c
> > +++ b/arch/arm/mm/init.c
> > @@ -318,19 +317,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);
> > -
> 
> Why not call sanity_check_meminfo() here?

That could be done as well.  However the populating of the meminfo array 
is done in kernel/setup.c, so it made sense to move the sort there as 
this could be improved upon eventually to make the memory bank parser a 
bit more robust against problems such as overlapping memory ranges which 
was the subject of a somewhat entertaining thread recently.  But I don't 
have a strong opinion about this.


Nicolas

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

* [PATCH 01/19] ARM: sort the meminfo array earlier
  2011-09-16 18:09     ` Nicolas Pitre
@ 2011-09-16 19:21       ` Stephen Boyd
  2011-09-16 20:44         ` Nicolas Pitre
  0 siblings, 1 reply; 49+ messages in thread
From: Stephen Boyd @ 2011-09-16 19:21 UTC (permalink / raw)
  To: linux-arm-kernel

On 09/16/11 11:09, Nicolas Pitre wrote:
> On Fri, 16 Sep 2011, Stephen Boyd wrote:
>
>
>> This looks like:
>>
>>     return clamp(bank_pfn_start(a) - bank_pfn_start(b), -1, 1);
> Won't work.  The pfn is of an unsigned type, hence the subtraction 
> result will also be unsigned.  The code above looks a bit odd, but there 
> is an implicit cast to a signed result with the result stored into a 
> long.
>
> What would have been even clearer, and possibly more efficient as well, 
> is something like this:
>
> 	if (bank_pfn_start(a) < bank_pfn_start(b))
> 		return -1;
> 	if (bank_pfn_start(a) > bank_pfn_start(b))
> 		return 1;
> 	return 0;

Ok so

    return clamp_t(long, bank_pfn_start(a) - bank_pfn_start(b), -1, 1); 


?

>
> But the goal here was to simply move the code, changing it would warrant 
> a separate patch.

Fair enough.

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

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

* [PATCH 01/19] ARM: sort the meminfo array earlier
  2011-09-16 19:21       ` Stephen Boyd
@ 2011-09-16 20:44         ` Nicolas Pitre
  0 siblings, 0 replies; 49+ messages in thread
From: Nicolas Pitre @ 2011-09-16 20:44 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, 16 Sep 2011, Stephen Boyd wrote:

> On 09/16/11 11:09, Nicolas Pitre wrote:
> > On Fri, 16 Sep 2011, Stephen Boyd wrote:
> >
> >
> >> This looks like:
> >>
> >>     return clamp(bank_pfn_start(a) - bank_pfn_start(b), -1, 1);
> > Won't work.  The pfn is of an unsigned type, hence the subtraction 
> > result will also be unsigned.  The code above looks a bit odd, but there 
> > is an implicit cast to a signed result with the result stored into a 
> > long.
> >
> > What would have been even clearer, and possibly more efficient as well, 
> > is something like this:
> >
> > 	if (bank_pfn_start(a) < bank_pfn_start(b))
> > 		return -1;
> > 	if (bank_pfn_start(a) > bank_pfn_start(b))
> > 		return 1;
> > 	return 0;
> 
> Ok so
> 
>     return clamp_t(long, bank_pfn_start(a) - bank_pfn_start(b), -1, 1); 
> 
> 
> ?

Well...

Given that the pfn range typically fits into an int, having a simple:

	return bank_pfn_start(a) - bank_pfn_start(b);

should be all that is needed here, since the expected return value is 
either <0, 0, or >0.  But that assumes that physical memory will always 
be representable with less than 44 bits, and that's a bad assumption to 
make these days.  Even your usage of clamp_t() is broken the same way, 
just like the current code in fact.

So probably using bank_phys_start() instead of bank_pfn_start() would 
already be slightly more efficient, given that reducing the range with a 
pfn is not going to help when PHYSADDR_t is a 64-bit type.  Then having 
direct comparisons like I proposed would be the best that can be 
achieved in C.


Nicolas

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

* [PATCH 01/19] ARM: sort the meminfo array earlier
  2011-09-16  7:07 ` [PATCH 01/19] ARM: sort the meminfo array earlier Nicolas Pitre
  2011-09-16 17:21   ` Stephen Boyd
@ 2011-09-17 15:05   ` Russell King - ARM Linux
  2011-09-17 15:49     ` Nicolas Pitre
  1 sibling, 1 reply; 49+ messages in thread
From: Russell King - ARM Linux @ 2011-09-17 15:05 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Sep 16, 2011 at 03:07:12AM -0400, Nicolas Pitre wrote:
> From: Nicolas Pitre <nicolas.pitre@linaro.org>
> 
> The meminfo array has to be sorted before sanity_check_meminfo() can work
> properly.

This is unrelated to the patch series, so it should be separate from the
series.  I don't see anything in the series depending on it.

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

* [PATCH 16/19] ARM: move iotable mappings within the vmalloc region
  2011-09-16  7:07 ` [PATCH 16/19] ARM: move iotable mappings within the vmalloc region Nicolas Pitre
  2011-09-16 10:39   ` Jamie Iles
@ 2011-09-17 15:19   ` Russell King - ARM Linux
  2011-09-17 16:05     ` Nicolas Pitre
  1 sibling, 1 reply; 49+ messages in thread
From: Russell King - ARM Linux @ 2011-09-17 15:19 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Sep 16, 2011 at 03:07:27AM -0400, Nicolas Pitre wrote:
>  void __init iotable_init(struct map_desc *io_desc, int nr)
>  {
> -	int i;
> +	struct map_desc *md;
> +	struct vm_struct *vm;
> +
> +	vm = __va(memblock_alloc(sizeof(*vm) * nr, __alignof__(*vm)));
> +	memset(vm, 0, sizeof(*vm) * nr);

Any reason not to adapt early_alloc() ?

>  
> -	for (i = 0; i < nr; i++)
> -		create_mapping(io_desc + i);
> +	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 *)(0xf0000000UL - VMALLOC_OFFSET);

This is silly.  You're defining VMALLOC_END to be 0xff000000UL, and
then defining this to be 0xf0000000UL - 8MB.  Why hide the 240MB
inside these constants?  Why not set it to VMALLOC_END - 240MB -
VMALLOC_OFFSET - making the size in their _explicit_ instead of hidden?

>  /*
>   * 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)
>  {
> @@ -853,6 +866,7 @@ void __init sanity_check_meminfo(void)
>  #endif
>  	meminfo.nr_banks = j;
>  	memblock_set_current_limit(lowmem_limit);
> +	high_memory = __va(lowmem_limit - 1) + 1;

NAK.  This ends up initializing this setting twice during the boot,
potentially leading to bugs because they're both done in different ways.
You don't describe why this change is necessary so I assume that it's
part of some debugging you were trying and shouldn't be in this patch.

> @@ -977,6 +991,12 @@ static void __init devicemaps_init(struct machine_desc *mdesc)
>  	}
>  
>  	/*
> +	 * Clear the vmalloc area.
> +	 */
> +	for (addr = VMALLOC_START; addr < VMALLOC_END; addr += PGDIR_SIZE)
> +		pmd_clear(pmd_off_k(addr));

Why not combine this with the clearance above:

        for (addr = VMALLOC_END; addr; addr += PGDIR_SIZE)
                pmd_clear(pmd_off_k(addr));

?

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

* [PATCH 01/19] ARM: sort the meminfo array earlier
  2011-09-17 15:05   ` Russell King - ARM Linux
@ 2011-09-17 15:49     ` Nicolas Pitre
  2011-09-19  4:06       ` Nicolas Pitre
  0 siblings, 1 reply; 49+ messages in thread
From: Nicolas Pitre @ 2011-09-17 15:49 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, 17 Sep 2011, Russell King - ARM Linux wrote:

> On Fri, Sep 16, 2011 at 03:07:12AM -0400, Nicolas Pitre wrote:
> > From: Nicolas Pitre <nicolas.pitre@linaro.org>
> > 
> > The meminfo array has to be sorted before sanity_check_meminfo() can work
> > properly.
> 
> This is unrelated to the patch series, so it should be separate from the
> series.  I don't see anything in the series depending on it.

True.  I just stumbled across this issue while working on the rest.


Nicolas

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

* [PATCH 16/19] ARM: move iotable mappings within the vmalloc region
  2011-09-17 15:19   ` Russell King - ARM Linux
@ 2011-09-17 16:05     ` Nicolas Pitre
  2011-09-17 16:20       ` Russell King - ARM Linux
  0 siblings, 1 reply; 49+ messages in thread
From: Nicolas Pitre @ 2011-09-17 16:05 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, 17 Sep 2011, Russell King - ARM Linux wrote:

> On Fri, Sep 16, 2011 at 03:07:27AM -0400, Nicolas Pitre wrote:
> >  void __init iotable_init(struct map_desc *io_desc, int nr)
> >  {
> > -	int i;
> > +	struct map_desc *md;
> > +	struct vm_struct *vm;
> > +
> > +	vm = __va(memblock_alloc(sizeof(*vm) * nr, __alignof__(*vm)));
> > +	memset(vm, 0, sizeof(*vm) * nr);
> 
> Any reason not to adapt early_alloc() ?

It uses the size for the alignment argument.  This is way too large an 
alignment in this case.  The size as alignment makes perfect sense in 
the other cases, and providing it explicitly for those cases might look 
strange.  But if you prefer that I'll just do it.

> >  
> > -	for (i = 0; i < nr; i++)
> > -		create_mapping(io_desc + i);
> > +	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 *)(0xf0000000UL - VMALLOC_OFFSET);
> 
> This is silly.  You're defining VMALLOC_END to be 0xff000000UL, and
> then defining this to be 0xf0000000UL - 8MB.  Why hide the 240MB
> inside these constants?  Why not set it to VMALLOC_END - 240MB -
> VMALLOC_OFFSET - making the size in their _explicit_ instead of hidden?

Actually I care more about the absolute start address than the size this 
ends up creating.  This is to accommodate some of the static mappings 
that starts at 0xf0000000 on machines with a potential to have enough 
RAM that could map higher than that.  It just happens that this 
corresponds to 240MB.

> >  /*
> >   * 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)
> >  {
> > @@ -853,6 +866,7 @@ void __init sanity_check_meminfo(void)
> >  #endif
> >  	meminfo.nr_banks = j;
> >  	memblock_set_current_limit(lowmem_limit);
> > +	high_memory = __va(lowmem_limit - 1) + 1;
> 
> NAK.  This ends up initializing this setting twice during the boot,
> potentially leading to bugs because they're both done in different ways.

In that case I should remove the other one.

> You don't describe why this change is necessary so I assume that it's
> part of some debugging you were trying and shouldn't be in this patch.

No, it noe has to be set before create_mapping() is called so the final 
VMALLOC_START address is known.

> > @@ -977,6 +991,12 @@ static void __init devicemaps_init(struct machine_desc *mdesc)
> >  	}
> >  
> >  	/*
> > +	 * Clear the vmalloc area.
> > +	 */
> > +	for (addr = VMALLOC_START; addr < VMALLOC_END; addr += PGDIR_SIZE)
> > +		pmd_clear(pmd_off_k(addr));
> 
> Why not combine this with the clearance above:
> 
>         for (addr = VMALLOC_END; addr; addr += PGDIR_SIZE)
>                 pmd_clear(pmd_off_k(addr));
> 
> ?

Because I wanted to keep the mapping for the DEBUG_LL code alive as long 
as possible.


Nicolas

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

* [PATCH 16/19] ARM: move iotable mappings within the vmalloc region
  2011-09-17 16:05     ` Nicolas Pitre
@ 2011-09-17 16:20       ` Russell King - ARM Linux
  2011-09-19  4:13         ` Nicolas Pitre
  2011-09-19  4:18         ` Nicolas Pitre
  0 siblings, 2 replies; 49+ messages in thread
From: Russell King - ARM Linux @ 2011-09-17 16:20 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Sep 17, 2011 at 12:05:02PM -0400, Nicolas Pitre wrote:
> On Sat, 17 Sep 2011, Russell King - ARM Linux wrote:
> 
> > On Fri, Sep 16, 2011 at 03:07:27AM -0400, Nicolas Pitre wrote:
> > >  void __init iotable_init(struct map_desc *io_desc, int nr)
> > >  {
> > > -	int i;
> > > +	struct map_desc *md;
> > > +	struct vm_struct *vm;
> > > +
> > > +	vm = __va(memblock_alloc(sizeof(*vm) * nr, __alignof__(*vm)));
> > > +	memset(vm, 0, sizeof(*vm) * nr);
> > 
> > Any reason not to adapt early_alloc() ?
> 
> It uses the size for the alignment argument.  This is way too large an 
> alignment in this case.  The size as alignment makes perfect sense in 
> the other cases, and providing it explicitly for those cases might look 
> strange.  But if you prefer that I'll just do it.

Just change early_alloc() to also take the alignment and then fix up the
existing callers.  It's silly to open-code the __va() + memset().

> > This is silly.  You're defining VMALLOC_END to be 0xff000000UL, and
> > then defining this to be 0xf0000000UL - 8MB.  Why hide the 240MB
> > inside these constants?  Why not set it to VMALLOC_END - 240MB -
> > VMALLOC_OFFSET - making the size in their _explicit_ instead of hidden?
> 
> Actually I care more about the absolute start address than the size this 
> ends up creating.  This is to accommodate some of the static mappings 
> that starts at 0xf0000000 on machines with a potential to have enough 
> RAM that could map higher than that.  It just happens that this 
> corresponds to 240MB.

We should stick to dealing with the size of vmalloc area rather than an
absolute address range as that's what we present to users via the
vmalloc= argument to the kernel.

> > >  /*
> > >   * 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)
> > >  {
> > > @@ -853,6 +866,7 @@ void __init sanity_check_meminfo(void)
> > >  #endif
> > >  	meminfo.nr_banks = j;
> > >  	memblock_set_current_limit(lowmem_limit);
> > > +	high_memory = __va(lowmem_limit - 1) + 1;
> > 
> > NAK.  This ends up initializing this setting twice during the boot,
> > potentially leading to bugs because they're both done in different ways.
> 
> In that case I should remove the other one.

If you do that, don't forget to fix nommu as well.

> > > @@ -977,6 +991,12 @@ static void __init devicemaps_init(struct machine_desc *mdesc)
> > >  	}
> > >  
> > >  	/*
> > > +	 * Clear the vmalloc area.
> > > +	 */
> > > +	for (addr = VMALLOC_START; addr < VMALLOC_END; addr += PGDIR_SIZE)
> > > +		pmd_clear(pmd_off_k(addr));
> > 
> > Why not combine this with the clearance above:
> > 
> >         for (addr = VMALLOC_END; addr; addr += PGDIR_SIZE)
> >                 pmd_clear(pmd_off_k(addr));
> > 
> > ?
> 
> Because I wanted to keep the mapping for the DEBUG_LL code alive as long 
> as possible.

You can't put DEUBG_LL code into create_mapping() anyway because at some
point it will be called without the mapping in place, even with your
modified code.

It's not like we have a lot of code between those two points - we've
done most of the allocation (eg vectors page), so the only failure point
is if L2 page table allocation fails - but that's true of almost any
create_mapping() call.

So, I don't see the benefit of delaying the clearance.

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

* [PATCH 0/19] removal of mach/vmalloc.h and generic optimizations
  2011-09-16  7:07 [PATCH 0/19] removal of mach/vmalloc.h and generic optimizations Nicolas Pitre
                   ` (19 preceding siblings ...)
  2011-09-16 13:26 ` [PATCH 0/19] removal of mach/vmalloc.h and generic optimizations Jamie Iles
@ 2011-09-17 20:52 ` Arnd Bergmann
  2011-09-18  2:46   ` Nicolas Pitre
  20 siblings, 1 reply; 49+ messages in thread
From: Arnd Bergmann @ 2011-09-17 20:52 UTC (permalink / raw)
  To: linux-arm-kernel

On Friday 16 September 2011 03:07:11 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 also provides a net reduction of more than 1200 lines of code.
> 
> Those patches are also available in the following repository:
> 
>         git://git.linaro.org/people/nico/linux vmalloc

Hi Nicolas,

I like the series a lot. I had planned to work on this myself, but
I guess you did a better job than I could have anyway.

Doing some randconfig tests, I noticed that your series is currently broken
on shmobile, which triggers a 

	BUILD_BUG_ON(VMALLOC_END > CONSISTENT_BASE);

in mem_init(), because the platform has a CONSISTENT_DMA_SIZE of 158MB.
All other platforms have a CONSISTENT_DMA_SIZE of at most 14MB, which
works correctly.

My feeling is that a 158MB CONSISTENT_DMA_SIZE causes other problems
anyway because we cannot map regular RAM both cached and uncached,
but this is still a regression. The problem might be solved using
Marek's CMA patches, which should eliminate the need for a huge
CONSISTENT_DMA_SIZE.

	Arnd

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

* [PATCH 0/19] removal of mach/vmalloc.h and generic optimizations
  2011-09-17 20:52 ` Arnd Bergmann
@ 2011-09-18  2:46   ` Nicolas Pitre
  2011-09-18  8:40     ` Arnd Bergmann
  0 siblings, 1 reply; 49+ messages in thread
From: Nicolas Pitre @ 2011-09-18  2:46 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, 17 Sep 2011, Arnd Bergmann wrote:

> On Friday 16 September 2011 03:07:11 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 also provides a net reduction of more than 1200 lines of code.
> > 
> > Those patches are also available in the following repository:
> > 
> >         git://git.linaro.org/people/nico/linux vmalloc
> 
> Hi Nicolas,
> 
> I like the series a lot. I had planned to work on this myself, but
> I guess you did a better job than I could have anyway.

Thanks!

> Doing some randconfig tests, I noticed that your series is currently broken
> on shmobile, which triggers a 
> 
> 	BUILD_BUG_ON(VMALLOC_END > CONSISTENT_BASE);
> 
> in mem_init(), because the platform has a CONSISTENT_DMA_SIZE of 158MB.
> All other platforms have a CONSISTENT_DMA_SIZE of at most 14MB, which
> works correctly.

Any idea why shmobile requires such an amount of consistent memory?

> My feeling is that a 158MB CONSISTENT_DMA_SIZE causes other problems
> anyway because we cannot map regular RAM both cached and uncached,
> but this is still a regression. The problem might be solved using
> Marek's CMA patches, which should eliminate the need for a huge
> CONSISTENT_DMA_SIZE.

Maybe.  However I don't want for this series to depend on CMA.  I'll 
find some temporary hack in the mean time.


Nicolas

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

* [PATCH 0/19] removal of mach/vmalloc.h and generic optimizations
  2011-09-18  2:46   ` Nicolas Pitre
@ 2011-09-18  8:40     ` Arnd Bergmann
  2011-09-19  4:39       ` Nicolas Pitre
  2011-09-21  1:14       ` Nicolas Pitre
  0 siblings, 2 replies; 49+ messages in thread
From: Arnd Bergmann @ 2011-09-18  8:40 UTC (permalink / raw)
  To: linux-arm-kernel

On Saturday 17 September 2011 22:46:33 Nicolas Pitre wrote:
> On Sat, 17 Sep 2011, Arnd Bergmann wrote:
> 
> > On Friday 16 September 2011 03:07:11 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 also provides a net reduction of more than 1200 lines of code.

> 
> > Doing some randconfig tests, I noticed that your series is currently broken
> > on shmobile, which triggers a 
> > 
> > 	BUILD_BUG_ON(VMALLOC_END > CONSISTENT_BASE);
> > 
> > in mem_init(), because the platform has a CONSISTENT_DMA_SIZE of 158MB.
> > All other platforms have a CONSISTENT_DMA_SIZE of at most 14MB, which
> > works correctly.
> 
> Any idea why shmobile requires such an amount of consistent memory?

No, I couldn't find anything in the code or the changelog why this was
done. Magnus changed it in this commit:

commit 28f0721a79046056ced3b9bd79c319c5c417ec30
Author: Magnus Damm <damm@opensource.se>
Date:   Wed Apr 28 08:25:30 2010 +0000

    ARM: mach-shmobile: Set CONSISTENT_DMA_SIZE to 158 MB
    
    This patch sets CONSISTENT_DMA_SIZE to 158 MB
    for all SH-Mobile ARM processors.
    
    The DMA area is mapped at 0xf6000000 - 0xffdfffff,
    on top of the 256 MB I/O window at 0xe6000000.
    
    Signed-off-by: Magnus Damm <damm@opensource.se>
    Signed-off-by: Paul Mundt <lethal@linux-sh.org>

Maybe he can give a better explanation and can say whether it's
actually required. The patch series introducing it contained
the introduction of the shdma dmaengine driver and some changes
to video drivers, but I could not tell how they are related
to this change.

> > My feeling is that a 158MB CONSISTENT_DMA_SIZE causes other problems
> > anyway because we cannot map regular RAM both cached and uncached,
> > but this is still a regression. The problem might be solved using
> > Marek's CMA patches, which should eliminate the need for a huge
> > CONSISTENT_DMA_SIZE.
> 
> Maybe.  However I don't want for this series to depend on CMA.  I'll 
> find some temporary hack in the mean time.

Ok

	Arnd

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

* [PATCH 01/19] ARM: sort the meminfo array earlier
  2011-09-17 15:49     ` Nicolas Pitre
@ 2011-09-19  4:06       ` Nicolas Pitre
  2011-09-19 11:22         ` Russell King - ARM Linux
  0 siblings, 1 reply; 49+ messages in thread
From: Nicolas Pitre @ 2011-09-19  4:06 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, 17 Sep 2011, Nicolas Pitre wrote:

> On Sat, 17 Sep 2011, Russell King - ARM Linux wrote:
> 
> > On Fri, Sep 16, 2011 at 03:07:12AM -0400, Nicolas Pitre wrote:
> > > From: Nicolas Pitre <nicolas.pitre@linaro.org>
> > > 
> > > The meminfo array has to be sorted before sanity_check_meminfo() can work
> > > properly.
> > 
> > This is unrelated to the patch series, so it should be separate from the
> > series.  I don't see anything in the series depending on it.
> 
> True.  I just stumbled across this issue while working on the rest.

Well, I'm about to post some revised patches for this series, and I'm 
now taking advantage of the sorted array.  So here's this patch again 
which is also revised:

----- >8

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

* [PATCH 16/19] ARM: move iotable mappings within the vmalloc region
  2011-09-17 16:20       ` Russell King - ARM Linux
@ 2011-09-19  4:13         ` Nicolas Pitre
  2011-09-19 11:21           ` Russell King - ARM Linux
  2011-09-19  4:18         ` Nicolas Pitre
  1 sibling, 1 reply; 49+ messages in thread
From: Nicolas Pitre @ 2011-09-19  4:13 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, 17 Sep 2011, Russell King - ARM Linux wrote:

> On Sat, Sep 17, 2011 at 12:05:02PM -0400, Nicolas Pitre wrote:
> > On Sat, 17 Sep 2011, Russell King - ARM Linux wrote:
> > 
> > > > @@ -853,6 +866,7 @@ void __init sanity_check_meminfo(void)
> > > >  #endif
> > > >  	meminfo.nr_banks = j;
> > > >  	memblock_set_current_limit(lowmem_limit);
> > > > +	high_memory = __va(lowmem_limit - 1) + 1;
> > > 
> > > NAK.  This ends up initializing this setting twice during the boot,
> > > potentially leading to bugs because they're both done in different ways.
> > 
> > In that case I should remove the other one.
> 
> If you do that, don't forget to fix nommu as well.

OK, so I moved this into a patch of its own not to confuse things.  Here 
it is:

----- >8

From: Nicolas Pitre <nicolas.pitre@linaro.org>
Subject: [PATCH] ARM: move initialization of the high_memory variable earlier

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 c82a817689..b5e953ea58 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -380,8 +380,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 594d677b92..eefb8ed5de 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -852,6 +852,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;
 }
 
 /*

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

* [PATCH 16/19] ARM: move iotable mappings within the vmalloc region
  2011-09-17 16:20       ` Russell King - ARM Linux
  2011-09-19  4:13         ` Nicolas Pitre
@ 2011-09-19  4:18         ` Nicolas Pitre
  2011-09-19 11:20           ` Russell King - ARM Linux
  1 sibling, 1 reply; 49+ messages in thread
From: Nicolas Pitre @ 2011-09-19  4:18 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, 17 Sep 2011, Russell King - ARM Linux wrote:

> On Sat, Sep 17, 2011 at 12:05:02PM -0400, Nicolas Pitre wrote:
> > On Sat, 17 Sep 2011, Russell King - ARM Linux wrote:
> > 
> > > Any reason not to adapt early_alloc() ?
> > 
> > It uses the size for the alignment argument.  This is way too large an 
> > alignment in this case.  The size as alignment makes perfect sense in 
> > the other cases, and providing it explicitly for those cases might look 
> > strange.  But if you prefer that I'll just do it.
> 
> Just change early_alloc() to also take the alignment and then fix up the
> existing callers.  It's silly to open-code the __va() + memset().
> 
> > > This is silly.  You're defining VMALLOC_END to be 0xff000000UL, and
> > > then defining this to be 0xf0000000UL - 8MB.  Why hide the 240MB
> > > inside these constants?  Why not set it to VMALLOC_END - 240MB -
> > > VMALLOC_OFFSET - making the size in their _explicit_ instead of hidden?
> > 
> > Actually I care more about the absolute start address than the size this 
> > ends up creating.  This is to accommodate some of the static mappings 
> > that starts at 0xf0000000 on machines with a potential to have enough 
> > RAM that could map higher than that.  It just happens that this 
> > corresponds to 240MB.
> 
> We should stick to dealing with the size of vmalloc area rather than an
> absolute address range as that's what we present to users via the
> vmalloc= argument to the kernel.
> 
> > > > @@ -977,6 +991,12 @@ static void __init devicemaps_init(struct machine_desc *mdesc)
> > > >  	}
> > > >  
> > > >  	/*
> > > > +	 * Clear the vmalloc area.
> > > > +	 */
> > > > +	for (addr = VMALLOC_START; addr < VMALLOC_END; addr += PGDIR_SIZE)
> > > > +		pmd_clear(pmd_off_k(addr));
> > > 
> > > Why not combine this with the clearance above:
> > > 
> > >         for (addr = VMALLOC_END; addr; addr += PGDIR_SIZE)
> > >                 pmd_clear(pmd_off_k(addr));
> > > 
> > > ?
> > 
> > Because I wanted to keep the mapping for the DEBUG_LL code alive as long 
> > as possible.
> 
> You can't put DEUBG_LL code into create_mapping() anyway because at some
> point it will be called without the mapping in place, even with your
> modified code.
> 
> It's not like we have a lot of code between those two points - we've
> done most of the allocation (eg vectors page), so the only failure point
> is if L2 page table allocation fails - but that's true of almost any
> create_mapping() call.
> 
> So, I don't see the benefit of delaying the clearance.

OK, here we go with version 2:

----- >8

From: Nicolas Pitre <nicolas.pitre@linaro.org>
Subject: [PATCH v2] ARM: move iotable mappings within the vmalloc region

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 in that case.

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              |   46 +++++++++++++++++++++++----------
 3 files changed, 38 insertions(+), 27 deletions(-)

diff --git a/Documentation/arm/memory.txt b/Documentation/arm/memory.txt
index 771d48d3b3..caee992bb8 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 at the beginning of the DMA mapping region.
 
 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 5750704e02..950dee3ce2 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>
 
 /*
@@ -31,15 +30,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
 
 /*
  * Hardware-wise, we have a two level page table structure, where the first
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index eefb8ed5de..b3842a448a 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>
@@ -521,13 +522,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)) {
@@ -677,9 +683,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);
 	}
 
@@ -721,18 +728,29 @@ static void __init create_mapping(struct map_desc *md)
  */
 void __init iotable_init(struct map_desc *io_desc, int nr)
 {
-	int i;
+	struct map_desc *md;
+	struct vm_struct *vm;
 
-	for (i = 0; i < nr; i++)
-		create_mapping(io_desc + i);
+	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)
 {
@@ -883,10 +901,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 += PGDIR_SIZE)
+	     addr < VMALLOC_START; addr += PGDIR_SIZE)
 		pmd_clear(pmd_off_k(addr));
 }
 
@@ -911,8 +929,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.
@@ -927,7 +945,7 @@ static void __init devicemaps_init(struct machine_desc *mdesc)
 	 */
 	vectors_page = early_alloc(PAGE_SIZE);
 
-	for (addr = VMALLOC_END; addr; addr += PGDIR_SIZE)
+	for (addr = VMALLOC_START; addr; addr += PGDIR_SIZE)
 		pmd_clear(pmd_off_k(addr));
 
 	/*

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

* [PATCH 0/19] removal of mach/vmalloc.h and generic optimizations
  2011-09-18  8:40     ` Arnd Bergmann
@ 2011-09-19  4:39       ` Nicolas Pitre
  2011-09-21  1:14       ` Nicolas Pitre
  1 sibling, 0 replies; 49+ messages in thread
From: Nicolas Pitre @ 2011-09-19  4:39 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, 18 Sep 2011, Arnd Bergmann wrote:

> On Saturday 17 September 2011 22:46:33 Nicolas Pitre wrote:
> > On Sat, 17 Sep 2011, Arnd Bergmann wrote:
> > 
> > > On Friday 16 September 2011 03:07:11 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 also provides a net reduction of more than 1200 lines of code.
> 
> > 
> > > Doing some randconfig tests, I noticed that your series is currently broken
> > > on shmobile, which triggers a 
> > > 
> > > 	BUILD_BUG_ON(VMALLOC_END > CONSISTENT_BASE);
> > > 
> > > in mem_init(), because the platform has a CONSISTENT_DMA_SIZE of 158MB.
> > > All other platforms have a CONSISTENT_DMA_SIZE of at most 14MB, which
> > > works correctly.
> > 
> > Any idea why shmobile requires such an amount of consistent memory?
> 
> No, I couldn't find anything in the code or the changelog why this was
> done. Magnus changed it in this commit:
> 
> commit 28f0721a79046056ced3b9bd79c319c5c417ec30
> Author: Magnus Damm <damm@opensource.se>
> Date:   Wed Apr 28 08:25:30 2010 +0000
> 
>     ARM: mach-shmobile: Set CONSISTENT_DMA_SIZE to 158 MB
>     
>     This patch sets CONSISTENT_DMA_SIZE to 158 MB
>     for all SH-Mobile ARM processors.
>     
>     The DMA area is mapped at 0xf6000000 - 0xffdfffff,
>     on top of the 256 MB I/O window at 0xe6000000.
>     
>     Signed-off-by: Magnus Damm <damm@opensource.se>
>     Signed-off-by: Paul Mundt <lethal@linux-sh.org>
> 
> Maybe he can give a better explanation and can say whether it's
> actually required. The patch series introducing it contained
> the introduction of the shdma dmaengine driver and some changes
> to video drivers, but I could not tell how they are related
> to this change.
> 
> > > My feeling is that a 158MB CONSISTENT_DMA_SIZE causes other problems
> > > anyway because we cannot map regular RAM both cached and uncached,
> > > but this is still a regression. The problem might be solved using
> > > Marek's CMA patches, which should eliminate the need for a huge
> > > CONSISTENT_DMA_SIZE.
> > 
> > Maybe.  However I don't want for this series to depend on CMA.  I'll 
> > find some temporary hack in the mean time.
> 
> Ok

I queued the patch below for the time being.  Alternatively, I could put 
the consistent DMA area into the vmalloc area too, but I don't really 
see the benefit of that.  I would prefer an explanation for the 158 MB 
instead.

----- >8

From: Nicolas Pitre <nicolas.pitre@linaro.org>
Subject: [PATCH] ARM: move VMALLOC_END down for shmobile

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

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

diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h
index 950dee3ce2..0d4fecf55f 100644
--- a/arch/arm/include/asm/pgtable.h
+++ b/arch/arm/include/asm/pgtable.h
@@ -35,6 +35,12 @@
 #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
+#undef VMALLOC_END
+#define VMALLOC_END		0xe6000000UL
+#endif
+
 /*
  * Hardware-wise, we have a two level page table structure, where the first
  * level has 4096 entries, and the second level has 256 entries.  Each entry

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

* [PATCH 16/19] ARM: move iotable mappings within the vmalloc region
  2011-09-19  4:18         ` Nicolas Pitre
@ 2011-09-19 11:20           ` Russell King - ARM Linux
  2011-09-19 15:05             ` Nicolas Pitre
  0 siblings, 1 reply; 49+ messages in thread
From: Russell King - ARM Linux @ 2011-09-19 11:20 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Sep 19, 2011 at 12:18:09AM -0400, Nicolas Pitre wrote:
> OK, here we go with version 2:

Looks fine, thanks.

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

* [PATCH 16/19] ARM: move iotable mappings within the vmalloc region
  2011-09-19  4:13         ` Nicolas Pitre
@ 2011-09-19 11:21           ` Russell King - ARM Linux
  0 siblings, 0 replies; 49+ messages in thread
From: Russell King - ARM Linux @ 2011-09-19 11:21 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Sep 19, 2011 at 12:13:02AM -0400, Nicolas Pitre wrote:
> OK, so I moved this into a patch of its own not to confuse things.  Here 
> it is:

Looks fine, thanks.

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

* [PATCH 01/19] ARM: sort the meminfo array earlier
  2011-09-19  4:06       ` Nicolas Pitre
@ 2011-09-19 11:22         ` Russell King - ARM Linux
  0 siblings, 0 replies; 49+ messages in thread
From: Russell King - ARM Linux @ 2011-09-19 11:22 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Sep 19, 2011 at 12:06:53AM -0400, Nicolas Pitre wrote:
> Well, I'm about to post some revised patches for this series, and I'm 
> now taking advantage of the sorted array.  So here's this patch again 
> which is also revised:

Looks fine, thanks.

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

* [PATCH 06/19] ARM: mach-at91: remove arch specific special handling for ioremap
  2011-09-16  7:07 ` [PATCH 06/19] ARM: mach-at91: remove arch specific special handling for ioremap Nicolas Pitre
@ 2011-09-19 13:35   ` Jean-Christophe PLAGNIOL-VILLARD
  2011-09-19 14:13     ` Russell King - ARM Linux
  2011-09-19 15:08     ` Nicolas Pitre
  0 siblings, 2 replies; 49+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2011-09-19 13:35 UTC (permalink / raw)
  To: linux-arm-kernel

On 03:07 Fri 16 Sep     , Nicolas Pitre wrote:
> From: Nicolas Pitre <nicolas.pitre@linaro.org>
> 
> A generic version should replace this later.
> 
> Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Untill the replace will availlable

do not remove it

Best Regards,
J.

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

* [PATCH 06/19] ARM: mach-at91: remove arch specific special handling for ioremap
  2011-09-19 13:35   ` Jean-Christophe PLAGNIOL-VILLARD
@ 2011-09-19 14:13     ` Russell King - ARM Linux
  2011-09-19 15:12       ` Nicolas Pitre
  2011-09-19 15:08     ` Nicolas Pitre
  1 sibling, 1 reply; 49+ messages in thread
From: Russell King - ARM Linux @ 2011-09-19 14:13 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Sep 19, 2011 at 03:35:47PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 03:07 Fri 16 Sep     , Nicolas Pitre wrote:
> > From: Nicolas Pitre <nicolas.pitre@linaro.org>
> > 
> > A generic version should replace this later.
> > 
> > Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
> Untill the replace will availlable
> 
> do not remove it

This patch series is all about adding that replacement.

But yes, as a general point of principle, the replacement should be
in place before the old stuff is pulled out.  I don't see any reason
why that can't be the case, because __arm_ioremap() can be rigged up
to use the static mappings first, and then the individual platform
interception of ioremap() can be removed afterwards.

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

* [PATCH 16/19] ARM: move iotable mappings within the vmalloc region
  2011-09-19 11:20           ` Russell King - ARM Linux
@ 2011-09-19 15:05             ` Nicolas Pitre
  0 siblings, 0 replies; 49+ messages in thread
From: Nicolas Pitre @ 2011-09-19 15:05 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, 19 Sep 2011, Russell King - ARM Linux wrote:

> On Mon, Sep 19, 2011 at 12:18:09AM -0400, Nicolas Pitre wrote:
> > OK, here we go with version 2:
> 
> Looks fine, thanks.

This is an ACK?


Nicolas

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

* [PATCH 06/19] ARM: mach-at91: remove arch specific special handling for ioremap
  2011-09-19 13:35   ` Jean-Christophe PLAGNIOL-VILLARD
  2011-09-19 14:13     ` Russell King - ARM Linux
@ 2011-09-19 15:08     ` Nicolas Pitre
  1 sibling, 0 replies; 49+ messages in thread
From: Nicolas Pitre @ 2011-09-19 15:08 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, 19 Sep 2011, Jean-Christophe PLAGNIOL-VILLARD wrote:

> On 03:07 Fri 16 Sep     , Nicolas Pitre wrote:
> > From: Nicolas Pitre <nicolas.pitre@linaro.org>
> > 
> > A generic version should replace this later.
> > 
> > Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
> Untill the replace will availlable
> 
> do not remove it

The replacement is introduced later in the same patch series.  Removing 
this first doesn't cause any functional regression.


Nicolas

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

* [PATCH 06/19] ARM: mach-at91: remove arch specific special handling for ioremap
  2011-09-19 14:13     ` Russell King - ARM Linux
@ 2011-09-19 15:12       ` Nicolas Pitre
  0 siblings, 0 replies; 49+ messages in thread
From: Nicolas Pitre @ 2011-09-19 15:12 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, 19 Sep 2011, Russell King - ARM Linux wrote:

> On Mon, Sep 19, 2011 at 03:35:47PM +0200, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > On 03:07 Fri 16 Sep     , Nicolas Pitre wrote:
> > > From: Nicolas Pitre <nicolas.pitre@linaro.org>
> > > 
> > > A generic version should replace this later.
> > > 
> > > Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
> > Untill the replace will availlable
> > 
> > do not remove it
> 
> This patch series is all about adding that replacement.
> 
> But yes, as a general point of principle, the replacement should be
> in place before the old stuff is pulled out.  I don't see any reason
> why that can't be the case, because __arm_ioremap() can be rigged up
> to use the static mappings first, and then the individual platform
> interception of ioremap() can be removed afterwards.

Some of them were using IOREMAP_END assuming it was below the static 
mappings, so it was easier to simply remove those first before the 
IOREMAP_END was redefined.  And then it looks strange to remove some of 
them before, then some others after.  Hence I opted for removing them 
all first.  And as I said, this doesn't create any functional 
regression to have this optimization removed temporarily.


Nicolas

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

* [PATCH 0/19] removal of mach/vmalloc.h and generic optimizations
  2011-09-18  8:40     ` Arnd Bergmann
  2011-09-19  4:39       ` Nicolas Pitre
@ 2011-09-21  1:14       ` Nicolas Pitre
  2011-09-21 17:09         ` Nicolas Pitre
  1 sibling, 1 reply; 49+ messages in thread
From: Nicolas Pitre @ 2011-09-21  1:14 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, 18 Sep 2011, Arnd Bergmann wrote:

> On Saturday 17 September 2011 22:46:33 Nicolas Pitre wrote:
> > On Sat, 17 Sep 2011, Arnd Bergmann wrote:
> > 
> > > On Friday 16 September 2011 03:07:11 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 also provides a net reduction of more than 1200 lines of code.
> 
> > 
> > > Doing some randconfig tests, I noticed that your series is currently broken
> > > on shmobile, which triggers a 
> > > 
> > > 	BUILD_BUG_ON(VMALLOC_END > CONSISTENT_BASE);
> > > 
> > > in mem_init(), because the platform has a CONSISTENT_DMA_SIZE of 158MB.
> > > All other platforms have a CONSISTENT_DMA_SIZE of at most 14MB, which
> > > works correctly.
> > 
> > Any idea why shmobile requires such an amount of consistent memory?
> 
> No, I couldn't find anything in the code or the changelog why this was
> done. Magnus changed it in this commit:
> 
> commit 28f0721a79046056ced3b9bd79c319c5c417ec30
> Author: Magnus Damm <damm@opensource.se>
> Date:   Wed Apr 28 08:25:30 2010 +0000
> 
>     ARM: mach-shmobile: Set CONSISTENT_DMA_SIZE to 158 MB
>     
>     This patch sets CONSISTENT_DMA_SIZE to 158 MB
>     for all SH-Mobile ARM processors.
>     
>     The DMA area is mapped at 0xf6000000 - 0xffdfffff,
>     on top of the 256 MB I/O window at 0xe6000000.
>     
>     Signed-off-by: Magnus Damm <damm@opensource.se>
>     Signed-off-by: Paul Mundt <lethal@linux-sh.org>
> 
> Maybe he can give a better explanation and can say whether it's
> actually required. The patch series introducing it contained
> the introduction of the shdma dmaengine driver and some changes
> to video drivers, but I could not tell how they are related
> to this change.

I found that drivers/video/sh_mobile_lcdcfb.c appears to be a heavy user 
of dma_alloc_coherent():

                buf = dma_alloc_coherent(&pdev->dev, info->fix.smem_len,
                                         &ch->dma_handle, GFP_KERNEL);

...

                info->fix.smem_len = max_size * 2 * cfg->bpp / 8;

...

                        max_size = MAX_XRES * MAX_YRES;

...

#define MAX_XRES 1920
#define MAX_YRES 1080

... and a switch statement on bpp shows it can be up to 32.

So for this particular hypothetical case: 1920 * 1080 * 2 * 32 / 8 = 16MB

We are far from the 158MB figure.  Furthermore, the highest allowed 
amount is 14MB according to the available documentation, and none of the 
other ARM targets use more than that either.

Magnus and/or Paul: please could you explain where this 158MB comes from?


Nicolas

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

* [PATCH 0/19] removal of mach/vmalloc.h and generic optimizations
  2011-09-21  1:14       ` Nicolas Pitre
@ 2011-09-21 17:09         ` Nicolas Pitre
  0 siblings, 0 replies; 49+ messages in thread
From: Nicolas Pitre @ 2011-09-21 17:09 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, 20 Sep 2011, Nicolas Pitre wrote:

> On Sun, 18 Sep 2011, Arnd Bergmann wrote:
> 
> > No, I couldn't find anything in the code or the changelog why this was
> > done.
> 
> I found that drivers/video/sh_mobile_lcdcfb.c appears to be a heavy user 
> of dma_alloc_coherent():
> 
>                 buf = dma_alloc_coherent(&pdev->dev, info->fix.smem_len,
>                                          &ch->dma_handle, GFP_KERNEL);
> 
> So for this particular hypothetical case: 1920 * 1080 * 2 * 32 / 8 = 16MB
> 
> We are far from the 158MB figure.  Furthermore, the highest allowed 
> amount is 14MB according to the available documentation, and none of the 
> other ARM targets use more than that either.

For the record, here's the patch I'm including in my series:

From: Nicolas Pitre <nicolas.pitre@linaro.org>
Date: Mon, 19 Sep 2011 00:28:45 -0400
Subject: [PATCH] ARM: move VMALLOC_END down temporarily for shmobile

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>

diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h
index 950dee3ce2..35eb517a21 100644
--- a/arch/arm/include/asm/pgtable.h
+++ b/arch/arm/include/asm/pgtable.h
@@ -35,6 +35,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
+
 /*
  * Hardware-wise, we have a two level page table structure, where the first
  * level has 4096 entries, and the second level has 256 entries.  Each entry


Nicolas

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

end of thread, other threads:[~2011-09-21 17:09 UTC | newest]

Thread overview: 49+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-16  7:07 [PATCH 0/19] removal of mach/vmalloc.h and generic optimizations Nicolas Pitre
2011-09-16  7:07 ` [PATCH 01/19] ARM: sort the meminfo array earlier Nicolas Pitre
2011-09-16 17:21   ` Stephen Boyd
2011-09-16 18:09     ` Nicolas Pitre
2011-09-16 19:21       ` Stephen Boyd
2011-09-16 20:44         ` Nicolas Pitre
2011-09-17 15:05   ` Russell King - ARM Linux
2011-09-17 15:49     ` Nicolas Pitre
2011-09-19  4:06       ` Nicolas Pitre
2011-09-19 11:22         ` Russell King - ARM Linux
2011-09-16  7:07 ` [PATCH 02/19] ARM: mach-dove: remove inclusion of <mach/vmalloc.h> Nicolas Pitre
2011-09-16  7:07 ` [PATCH 03/19] ARM: mach-prima2: don't define SIRFSOC_VA in terms of VMALLOC_END Nicolas Pitre
2011-09-16  7:25   ` Barry Song
2011-09-16  7:07 ` [PATCH 04/19] ARM: plat-mxc: remove inclusion of <mach/vmalloc.h> Nicolas Pitre
2011-09-16  7:07 ` [PATCH 05/19] ARM: plat-omap: don't define OMAP1_SRAM_VA in terms of VMALLOC_END Nicolas Pitre
2011-09-16  7:07 ` [PATCH 06/19] ARM: mach-at91: remove arch specific special handling for ioremap Nicolas Pitre
2011-09-19 13:35   ` Jean-Christophe PLAGNIOL-VILLARD
2011-09-19 14:13     ` Russell King - ARM Linux
2011-09-19 15:12       ` Nicolas Pitre
2011-09-19 15:08     ` Nicolas Pitre
2011-09-16  7:07 ` [PATCH 07/19] ARM: mach-davinci: " Nicolas Pitre
2011-09-16  7:07 ` [PATCH 08/19] ARM: mach-tegra: " Nicolas Pitre
2011-09-16  7:07 ` [PATCH 09/19] ARM: plat-omap: " Nicolas Pitre
2011-09-16  7:07 ` [PATCH 10/19] ARM: mach-bcmring: use proper constant to identify DMA memory area Nicolas Pitre
2011-09-16  7:07 ` [PATCH 11/19] ARM: mach-orion5x: remove arch specific special handling for ioremap Nicolas Pitre
2011-09-16  7:07 ` [PATCH 12/19] ARM: mach-kirkwood: " Nicolas Pitre
2011-09-16  7:07 ` [PATCH 13/19] ARM: mach-ixp23xx: " Nicolas Pitre
2011-09-16  7:07 ` [PATCH 14/19] ARM: plat-iop: " Nicolas Pitre
2011-09-16  7:07 ` [PATCH 15/19] mm: add vm_area_add_early() Nicolas Pitre
2011-09-16  7:07 ` [PATCH 16/19] ARM: move iotable mappings within the vmalloc region Nicolas Pitre
2011-09-16 10:39   ` Jamie Iles
2011-09-17 15:19   ` Russell King - ARM Linux
2011-09-17 16:05     ` Nicolas Pitre
2011-09-17 16:20       ` Russell King - ARM Linux
2011-09-19  4:13         ` Nicolas Pitre
2011-09-19 11:21           ` Russell King - ARM Linux
2011-09-19  4:18         ` Nicolas Pitre
2011-09-19 11:20           ` Russell King - ARM Linux
2011-09-19 15:05             ` Nicolas Pitre
2011-09-16  7:07 ` [PATCH 17/19] ARM: simplify __iounmap() when dealing with section based mapping Nicolas Pitre
2011-09-16  7:07 ` [PATCH 18/19] ARM: add generic ioremap optimization by reusing static mappings Nicolas Pitre
2011-09-16  7:07 ` [PATCH 19/19] ARM: big removal of now unused vmalloc.h files Nicolas Pitre
2011-09-16 13:26 ` [PATCH 0/19] removal of mach/vmalloc.h and generic optimizations Jamie Iles
2011-09-17 20:52 ` Arnd Bergmann
2011-09-18  2:46   ` Nicolas Pitre
2011-09-18  8:40     ` Arnd Bergmann
2011-09-19  4:39       ` Nicolas Pitre
2011-09-21  1:14       ` Nicolas Pitre
2011-09-21 17:09         ` Nicolas Pitre

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