All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: calculate VMALLOC_END by probing in mdesc->map_io()
@ 2011-01-22 22:56 Eric Miao
  2011-01-22 22:56 ` [PATCH 2/2] ARM: remove now useless vmalloc.h Eric Miao
  2011-01-22 23:15 ` [PATCH 1/2] ARM: calculate VMALLOC_END by probing in mdesc->map_io() Russell King - ARM Linux
  0 siblings, 2 replies; 12+ messages in thread
From: Eric Miao @ 2011-01-22 22:56 UTC (permalink / raw)
  To: linux-arm-kernel

From: Eric Miao <eric.miao@linaro.org>

Provided that the only place initializing the fixed IO mapping is
in mdesc->map_io(), the VMALLOC_END can actually be calculated by
first invoking the function without actually doing the map.

The original idea of auto-calculating the VMALLOC_END came from
Nicolas Pitre.

Signed-off-by: Eric Miao <eric.miao@linaro.org>
---
 arch/arm/include/asm/pgtable.h |    6 ++++-
 arch/arm/mm/init.c             |    1 -
 arch/arm/mm/mmu.c              |   44 ++++++++++++++++++++++++++++-----------
 3 files changed, 36 insertions(+), 15 deletions(-)

diff --git a/arch/arm/include/asm/pgtable.h b/arch/arm/include/asm/pgtable.h
index ebcb643..276972f 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>
 
 /*
@@ -41,6 +40,11 @@
 #define VMALLOC_START		(((unsigned long)high_memory + VMALLOC_OFFSET) & ~(VMALLOC_OFFSET-1))
 #endif
 
+#ifndef __ASSEMBLY__
+extern unsigned long vmalloc_end;
+#endif
+#define VMALLOC_END		(vmalloc_end)
+
 /*
  * 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
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 5164069..da870df 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -614,7 +614,6 @@ void __init mem_init(void)
 	 * be detected at build time already.
 	 */
 #ifdef CONFIG_MMU
-	BUILD_BUG_ON(VMALLOC_END			> CONSISTENT_BASE);
 	BUG_ON(VMALLOC_END				> CONSISTENT_BASE);
 
 	BUILD_BUG_ON(TASK_SIZE				> MODULES_VADDR);
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 3c67e92..98cdb35 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -703,6 +703,12 @@ static void __init create_mapping(struct map_desc *md)
 	} while (pgd++, addr != end);
 }
 
+unsigned long vmalloc_end = 0xff000000ul;
+EXPORT_SYMBOL(vmalloc_end);
+
+static int __initdata probe_vmalloc_end;
+static unsigned long vmalloc_reserve = SZ_128M;
+
 /*
  * Create the architecture specific mappings
  */
@@ -710,11 +716,16 @@ void __init iotable_init(struct map_desc *io_desc, int nr)
 {
 	int i;
 
-	for (i = 0; i < nr; i++)
-		create_mapping(io_desc + i);
+	for (i = 0; i < nr; i++) {
+		if (probe_vmalloc_end) {
+			/* align vmalloc_end to PGDIR_SIZE */
+			if (io_desc->virtual < vmalloc_end)
+				vmalloc_end = io_desc->virtual & PGDIR_MASK;
+		} else
+			create_mapping(io_desc + i);
+	}
 }
 
-static void * __initdata vmalloc_min = (void *)(VMALLOC_END - SZ_128M);
 
 /*
  * vmalloc=size forces the vmalloc area to be exactly 'size'
@@ -723,7 +734,7 @@ static void * __initdata vmalloc_min = (void *)(VMALLOC_END - SZ_128M);
  */
 static int __init early_vmalloc(char *arg)
 {
-	unsigned long vmalloc_reserve = memparse(arg, NULL);
+	vmalloc_reserve = memparse(arg, NULL);
 
 	if (vmalloc_reserve < SZ_16M) {
 		vmalloc_reserve = SZ_16M;
@@ -731,15 +742,6 @@ static int __init early_vmalloc(char *arg)
 			"vmalloc area too small, limiting to %luMB\n",
 			vmalloc_reserve >> 20);
 	}
-
-	if (vmalloc_reserve > VMALLOC_END - (PAGE_OFFSET + SZ_32M)) {
-		vmalloc_reserve = VMALLOC_END - (PAGE_OFFSET + SZ_32M);
-		printk(KERN_WARNING
-			"vmalloc area is too big, limiting to %luMB\n",
-			vmalloc_reserve >> 20);
-	}
-
-	vmalloc_min = (void *)(VMALLOC_END - vmalloc_reserve);
 	return 0;
 }
 early_param("vmalloc", early_vmalloc);
@@ -749,6 +751,16 @@ static phys_addr_t lowmem_limit __initdata = 0;
 static void __init sanity_check_meminfo(void)
 {
 	int i, j, highmem = 0;
+	void *vmalloc_min;
+
+	if (vmalloc_reserve > VMALLOC_END - (PAGE_OFFSET + SZ_32M)) {
+		vmalloc_reserve = VMALLOC_END - (PAGE_OFFSET + SZ_32M);
+		printk(KERN_WARNING
+			"vmalloc area is too big, limiting to %luMB\n",
+			vmalloc_reserve >> 20);
+	}
+
+	vmalloc_min = (void *)(VMALLOC_END - vmalloc_reserve);
 
 	lowmem_limit = __pa(vmalloc_min - 1) + 1;
 	memblock_set_current_limit(lowmem_limit);
@@ -1026,6 +1038,12 @@ void __init paging_init(struct machine_desc *mdesc)
 {
 	void *zero_page;
 
+	if (mdesc->map_io) {
+		probe_vmalloc_end = 1;
+		mdesc->map_io();
+		probe_vmalloc_end = 0;
+	}
+
 	build_mem_type_table();
 	sanity_check_meminfo();
 	prepare_page_table();
-- 
1.7.1

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

* [PATCH 2/2] ARM: remove now useless vmalloc.h
  2011-01-22 22:56 [PATCH 1/2] ARM: calculate VMALLOC_END by probing in mdesc->map_io() Eric Miao
@ 2011-01-22 22:56 ` Eric Miao
  2011-01-22 23:15 ` [PATCH 1/2] ARM: calculate VMALLOC_END by probing in mdesc->map_io() Russell King - ARM Linux
  1 sibling, 0 replies; 12+ messages in thread
From: Eric Miao @ 2011-01-22 22:56 UTC (permalink / raw)
  To: linux-arm-kernel

From: Eric Miao <eric.miao@linaro.org>

Since VMALLOC_END is now calucated instead of hardcoded, the mach
specific vmalloc.h where only VMALLOC_END is defined can be safely
removed.

Signed-off-by: Eric Miao <eric.miao@linaro.org>
---
 arch/arm/mach-aaec2000/include/mach/vmalloc.h   |   16 -------------
 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-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-lh7a40x/include/mach/vmalloc.h    |   10 --------
 arch/arm/mach-loki/include/mach/vmalloc.h       |    5 ----
 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-ns9xxx/include/mach/vmalloc.h     |   16 -------------
 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-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-s3c24a0/include/mach/vmalloc.h    |   17 --------------
 arch/arm/mach-s3c64xx/include/mach/vmalloc.h    |   20 ----------------
 arch/arm/mach-s5p6442/include/mach/vmalloc.h    |   17 --------------
 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-s5pv310/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-w90x900/include/mach/vmalloc.h    |   23 ------------------
 arch/arm/plat-mxc/include/mach/vmalloc.h        |   22 ------------------
 arch/arm/plat-spear/include/plat/vmalloc.h      |   19 ---------------
 arch/arm/plat-stmp3xxx/include/mach/vmalloc.h   |   12 ---------
 arch/arm/plat-tcc/include/mach/vmalloc.h        |   10 --------
 62 files changed, 0 insertions(+), 909 deletions(-)
 delete mode 100644 arch/arm/mach-aaec2000/include/mach/vmalloc.h
 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-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-lh7a40x/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-loki/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-ns9xxx/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-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-s3c24a0/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-s3c64xx/include/mach/vmalloc.h
 delete mode 100644 arch/arm/mach-s5p6442/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-s5pv310/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-w90x900/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-stmp3xxx/include/mach/vmalloc.h
 delete mode 100644 arch/arm/plat-tcc/include/mach/vmalloc.h

diff --git a/arch/arm/mach-aaec2000/include/mach/vmalloc.h b/arch/arm/mach-aaec2000/include/mach/vmalloc.h
deleted file mode 100644
index a6299e8..0000000
--- a/arch/arm/mach-aaec2000/include/mach/vmalloc.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- *  arch/arm/mach-aaec2000/include/mach/vmalloc.h
- *
- *  Copyright (c) 2005 Nicolas Bellido Y Ortega
- *
- *  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		0xd0000000UL
-
-#endif /* __ASM_ARCH_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 8eb459f..0000000
--- 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 7397bd7..0000000
--- 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 467b961..0000000
--- 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 4d381ec..0000000
--- 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		0xd8000000
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 d49646a..0000000
--- 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 a28792c..0000000
--- 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 ea141b7..0000000
--- 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 1b3f25d..0000000
--- 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-footbridge/include/mach/vmalloc.h b/arch/arm/mach-footbridge/include/mach/vmalloc.h
deleted file mode 100644
index 40ba78e..0000000
--- 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 45371eb..0000000
--- 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 8520b4a..0000000
--- 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 2f5a2ba..0000000
--- 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 c534567..0000000
--- 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 c4862d4..0000000
--- 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 48331dc..0000000
--- 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 61c8dae..0000000
--- 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 896c56a..0000000
--- 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 9bcd64d..0000000
--- 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 bf162ca..0000000
--- 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 744ac66..0000000
--- 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-lh7a40x/include/mach/vmalloc.h b/arch/arm/mach-lh7a40x/include/mach/vmalloc.h
deleted file mode 100644
index d62da73..0000000
--- a/arch/arm/mach-lh7a40x/include/mach/vmalloc.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/* arch/arm/mach-lh7a40x/include/mach/vmalloc.h
- *
- *  Copyright (C) 2004 Coastal Environmental Systems
- *
- *  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-loki/include/mach/vmalloc.h b/arch/arm/mach-loki/include/mach/vmalloc.h
deleted file mode 100644
index 5dcbd86..0000000
--- a/arch/arm/mach-loki/include/mach/vmalloc.h
+++ /dev/null
@@ -1,5 +0,0 @@
-/*
- * arch/arm/mach-loki/include/mach/vmalloc.h
- */
-
-#define VMALLOC_END	0xfe800000UL
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 d1d936c..0000000
--- 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	0xF0000000
-
-#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 1d0bac0..0000000
--- 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 d138448..0000000
--- 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 ba26fe9..0000000
--- 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 103b016..0000000
--- 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 871f1ef..0000000
--- 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 f83d574..0000000
--- 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-ns9xxx/include/mach/vmalloc.h b/arch/arm/mach-ns9xxx/include/mach/vmalloc.h
deleted file mode 100644
index c865197..0000000
--- a/arch/arm/mach-ns9xxx/include/mach/vmalloc.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * arch/arm/mach-ns9xxx/include/mach/vmalloc.h
- *
- * Copyright (C) 2006 by Digi International 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 version 2 as published by
- * the Free Software Foundation.
- */
-#ifndef __ASM_ARCH_VMALLOC_H
-#define __ASM_ARCH_VMALLOC_H
-
-#define VMALLOC_END     (0xf0000000UL)
-
-#endif /* ifndef __ASM_ARCH_VMALLOC_H */
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 98a21b8..0000000
--- 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	  (0xE0000000)
-
-#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 22ec4a4..0000000
--- 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 8663199..0000000
--- 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 06b50ae..0000000
--- 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 184913c..0000000
--- 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-pxa/include/mach/vmalloc.h b/arch/arm/mach-pxa/include/mach/vmalloc.h
deleted file mode 100644
index bfecfbf..0000000
--- 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 a2a4c68..0000000
--- 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 fb70022..0000000
--- 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 7a311e8..0000000
--- 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-s3c24a0/include/mach/vmalloc.h b/arch/arm/mach-s3c24a0/include/mach/vmalloc.h
deleted file mode 100644
index 6480b15..0000000
--- a/arch/arm/mach-s3c24a0/include/mach/vmalloc.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/* linux/include/asm-arm/arch-s3c24ao/vmalloc.h
- *
- * Copyright 2008 Simtec Electronics <linux@simtec.co.uk>
-
- * 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.
- *
- * S3C24A0 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 23f75e5..0000000
--- 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-s5p6442/include/mach/vmalloc.h b/arch/arm/mach-s5p6442/include/mach/vmalloc.h
deleted file mode 100644
index 4aa55e5..0000000
--- a/arch/arm/mach-s5p6442/include/mach/vmalloc.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/* arch/arm/mach-s5p6442/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.
- *
- * S5P6442 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 38dcc71..0000000
--- 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 44c8e57..0000000
--- 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 a6c659d..0000000
--- 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-s5pv310/include/mach/vmalloc.h b/arch/arm/mach-s5pv310/include/mach/vmalloc.h
deleted file mode 100644
index 65759fb..0000000
--- a/arch/arm/mach-s5pv310/include/mach/vmalloc.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* linux/arch/arm/mach-s5pv310/include/mach/vmalloc.h
- *
- * Copyright (c) 2010 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.
- *
- * S5PV310 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-sa1100/include/mach/vmalloc.h b/arch/arm/mach-sa1100/include/mach/vmalloc.h
deleted file mode 100644
index b3d0023..0000000
--- 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 b10df98..0000000
--- 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 2b8fd8b..0000000
--- 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 df977b3..0000000
--- 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 4a0b56c..0000000
--- 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 fd6aa65..0000000
--- 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 ec423b9..0000000
--- 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 a4945cb..0000000
--- 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 7d8e069..0000000
--- 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 f43a36e..0000000
--- 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-w90x900/include/mach/vmalloc.h b/arch/arm/mach-w90x900/include/mach/vmalloc.h
deleted file mode 100644
index b067e44..0000000
--- 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/plat-mxc/include/mach/vmalloc.h b/arch/arm/plat-mxc/include/mach/vmalloc.h
deleted file mode 100644
index ef6379c..0000000
--- 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 09e9372..0000000
--- 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		0xF0000000
-
-#endif /* __PLAT_VMALLOC_H */
diff --git a/arch/arm/plat-stmp3xxx/include/mach/vmalloc.h b/arch/arm/plat-stmp3xxx/include/mach/vmalloc.h
deleted file mode 100644
index 943c1a2..0000000
--- a/arch/arm/plat-stmp3xxx/include/mach/vmalloc.h
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
- * Copyright 2008 Freescale Semiconductor, Inc. All Rights Reserved.
- * Copyright 2008 Embedded Alley Solutions, Inc All Rights Reserved.
- *
- * The code contained herein is licensed under the GNU General Public
- * License. You may obtain a copy of the GNU General Public License
- * Version 2 or later at the following locations:
- *
- * http://www.opensource.org/licenses/gpl-license.html
- * http://www.gnu.org/copyleft/gpl.html
- */
-#define VMALLOC_END       0xf0000000UL
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 99414d9..0000000
--- 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.1

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

* [PATCH 1/2] ARM: calculate VMALLOC_END by probing in mdesc->map_io()
  2011-01-22 22:56 [PATCH 1/2] ARM: calculate VMALLOC_END by probing in mdesc->map_io() Eric Miao
  2011-01-22 22:56 ` [PATCH 2/2] ARM: remove now useless vmalloc.h Eric Miao
@ 2011-01-22 23:15 ` Russell King - ARM Linux
  2011-01-23  4:59   ` Eric Miao
  1 sibling, 1 reply; 12+ messages in thread
From: Russell King - ARM Linux @ 2011-01-22 23:15 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Jan 23, 2011 at 06:56:40AM +0800, Eric Miao wrote:
> From: Eric Miao <eric.miao@linaro.org>
> 
> Provided that the only place initializing the fixed IO mapping is
> in mdesc->map_io(), the VMALLOC_END can actually be calculated by
> first invoking the function without actually doing the map.

We really can't do this.  You're assuming that platforms only do IO
mapping in their map_io callback - that's way far from the truth.

Samsung platforms for instance register clocks and other stuff.

OMAP platforms issue cache flushes which won't work on CPUs requiring
a mapping to be setup for this to work.  They also check CPU revisions
(requiring mappings in place for that), probe the size of sram, etc.
None of this will work without mappings setup.

And there's a catch-you in OMAP there - it needs accessible mappings
to work out what other mappings (eg, sram size) to setup.  It can't map
a larger area than is actually present because that's known to cause
problems.

So, without a lot of effort to clean up platform code first, it's
really unsafe to do this double-call of map_io().  Given that it
takes some platform support _years_ to change, I really don't see
that this is a practical approach.

I'd instead suggest adding vmalloc_end to the machine description
record.

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

* [PATCH 1/2] ARM: calculate VMALLOC_END by probing in mdesc->map_io()
  2011-01-22 23:15 ` [PATCH 1/2] ARM: calculate VMALLOC_END by probing in mdesc->map_io() Russell King - ARM Linux
@ 2011-01-23  4:59   ` Eric Miao
  2011-01-23  5:30     ` Nicolas Pitre
                       ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Eric Miao @ 2011-01-23  4:59 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Jan 23, 2011 at 7:15 AM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Sun, Jan 23, 2011 at 06:56:40AM +0800, Eric Miao wrote:
>> From: Eric Miao <eric.miao@linaro.org>
>>
>> Provided that the only place initializing the fixed IO mapping is
>> in mdesc->map_io(), the VMALLOC_END can actually be calculated by
>> first invoking the function without actually doing the map.
>
> We really can't do this. ?You're assuming that platforms only do IO
> mapping in their map_io callback - that's way far from the truth.
>
> Samsung platforms for instance register clocks and other stuff.
>
> OMAP platforms issue cache flushes which won't work on CPUs requiring
> a mapping to be setup for this to work. ?They also check CPU revisions
> (requiring mappings in place for that), probe the size of sram, etc.
> None of this will work without mappings setup.
>
> And there's a catch-you in OMAP there - it needs accessible mappings
> to work out what other mappings (eg, sram size) to setup. ?It can't map
> a larger area than is actually present because that's known to cause
> problems.
>
> So, without a lot of effort to clean up platform code first, it's
> really unsafe to do this double-call of map_io(). ?Given that it
> takes some platform support _years_ to change, I really don't see
> that this is a practical approach.

Indeed. One other way I was thinking of is to use data representation
instead of calling iotable_init() in .map_io, i.e. introduce .iotable instead
of .map_io. All the other hacking stuffs we are currently doing can be
moved to .init_early(). But this still needs a lot clean-up, thoughts?

>
> I'd instead suggest adding vmalloc_end to the machine description
> record.
>

And since all boards sharing a same machine_class is going to use
the same value, I'd rather we first introduce struct machine_class
like in the patch I posted months ago?

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

* [PATCH 1/2] ARM: calculate VMALLOC_END by probing in mdesc->map_io()
  2011-01-23  4:59   ` Eric Miao
@ 2011-01-23  5:30     ` Nicolas Pitre
  2011-01-23  7:15       ` [PATCH 1/2] ARM: calculate VMALLOC_END by probing inmdesc->map_io() Santosh Shilimkar
  2011-01-23  9:40     ` [PATCH 1/2] ARM: calculate VMALLOC_END by probing in mdesc->map_io() Russell King - ARM Linux
  2011-01-23 14:21     ` Nicolas Pitre
  2 siblings, 1 reply; 12+ messages in thread
From: Nicolas Pitre @ 2011-01-23  5:30 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, 23 Jan 2011, Eric Miao wrote:

> On Sun, Jan 23, 2011 at 7:15 AM, Russell King - ARM Linux
> <linux@arm.linux.org.uk> wrote:
> > I'd instead suggest adding vmalloc_end to the machine description
> > record.
> >
> 
> And since all boards sharing a same machine_class is going to use
> the same value, I'd rather we first introduce struct machine_class
> like in the patch I posted months ago?

Can we possibly get away with a global VMALLOC_END?  What if we were to 
decide it is fixed at 0xf0000000 for everyone?


Nicolas

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

* [PATCH 1/2] ARM: calculate VMALLOC_END by probing inmdesc->map_io()
  2011-01-23  5:30     ` Nicolas Pitre
@ 2011-01-23  7:15       ` Santosh Shilimkar
  2011-01-23 14:17         ` Nicolas Pitre
  0 siblings, 1 reply; 12+ messages in thread
From: Santosh Shilimkar @ 2011-01-23  7:15 UTC (permalink / raw)
  To: linux-arm-kernel

> -----Original Message-----
> From: linux-arm-kernel-bounces at lists.infradead.org [mailto:linux-
> arm-kernel-bounces at lists.infradead.org] On Behalf Of Nicolas Pitre
> Sent: Sunday, January 23, 2011 11:01 AM
> To: Eric Miao
> Cc: Russell King - ARM Linux; linux-arm-kernel at lists.infradead.org
> Subject: Re: [PATCH 1/2] ARM: calculate VMALLOC_END by probing
> inmdesc->map_io()
>
> On Sun, 23 Jan 2011, Eric Miao wrote:
>
> > On Sun, Jan 23, 2011 at 7:15 AM, Russell King - ARM Linux
> > <linux@arm.linux.org.uk> wrote:
> > > I'd instead suggest adding vmalloc_end to the machine
> description
> > > record.
> > >
> >
> > And since all boards sharing a same machine_class is going to use
> > the same value, I'd rather we first introduce struct machine_class
> > like in the patch I posted months ago?
>
> Can we possibly get away with a global VMALLOC_END?  What if we were
> to
> decide it is fixed at 0xf0000000 for everyone?
>
Which would potentialy shrink the lowmem and vmalloc area. With
current flexibility of adjustable VMALLOC_END, in 1G:3G model,
we managed to  have almost ~ 896 MB virtual space available
for lowmem + vmalloc. So keeping 128MB for vmalloc ~768MB of
memory can be directly addressable without highmem support.

Regards,
Santosh

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

* [PATCH 1/2] ARM: calculate VMALLOC_END by probing in mdesc->map_io()
  2011-01-23  4:59   ` Eric Miao
  2011-01-23  5:30     ` Nicolas Pitre
@ 2011-01-23  9:40     ` Russell King - ARM Linux
  2011-01-23 14:21     ` Nicolas Pitre
  2 siblings, 0 replies; 12+ messages in thread
From: Russell King - ARM Linux @ 2011-01-23  9:40 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Jan 23, 2011 at 12:59:52PM +0800, Eric Miao wrote:
> On Sun, Jan 23, 2011 at 7:15 AM, Russell King - ARM Linux
> <linux@arm.linux.org.uk> wrote:
> > On Sun, Jan 23, 2011 at 06:56:40AM +0800, Eric Miao wrote:
> >> From: Eric Miao <eric.miao@linaro.org>
> >>
> >> Provided that the only place initializing the fixed IO mapping is
> >> in mdesc->map_io(), the VMALLOC_END can actually be calculated by
> >> first invoking the function without actually doing the map.
> >
> > We really can't do this. ?You're assuming that platforms only do IO
> > mapping in their map_io callback - that's way far from the truth.
> >
> > Samsung platforms for instance register clocks and other stuff.
> >
> > OMAP platforms issue cache flushes which won't work on CPUs requiring
> > a mapping to be setup for this to work. ?They also check CPU revisions
> > (requiring mappings in place for that), probe the size of sram, etc.
> > None of this will work without mappings setup.
> >
> > And there's a catch-you in OMAP there - it needs accessible mappings
> > to work out what other mappings (eg, sram size) to setup. ?It can't map
> > a larger area than is actually present because that's known to cause
> > problems.
> >
> > So, without a lot of effort to clean up platform code first, it's
> > really unsafe to do this double-call of map_io(). ?Given that it
> > takes some platform support _years_ to change, I really don't see
> > that this is a practical approach.
> 
> Indeed. One other way I was thinking of is to use data representation
> instead of calling iotable_init() in .map_io, i.e. introduce .iotable instead
> of .map_io. All the other hacking stuffs we are currently doing can be
> moved to .init_early(). But this still needs a lot clean-up, thoughts?

No, that still doesn't work.  As I said, some platforms need to create
mappings and access through those mappings to work out what other
mappings to create - iow, they aren't representable as a static set of
mappings.

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

* [PATCH 1/2] ARM: calculate VMALLOC_END by probing inmdesc->map_io()
  2011-01-23  7:15       ` [PATCH 1/2] ARM: calculate VMALLOC_END by probing inmdesc->map_io() Santosh Shilimkar
@ 2011-01-23 14:17         ` Nicolas Pitre
  2011-01-23 14:27           ` Santosh Shilimkar
  0 siblings, 1 reply; 12+ messages in thread
From: Nicolas Pitre @ 2011-01-23 14:17 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, 23 Jan 2011, Santosh Shilimkar wrote:

> > -----Original Message-----
> > From: linux-arm-kernel-bounces at lists.infradead.org [mailto:linux-
> > arm-kernel-bounces at lists.infradead.org] On Behalf Of Nicolas Pitre
> > Sent: Sunday, January 23, 2011 11:01 AM
> > To: Eric Miao
> > Cc: Russell King - ARM Linux; linux-arm-kernel at lists.infradead.org
> > Subject: Re: [PATCH 1/2] ARM: calculate VMALLOC_END by probing
> > inmdesc->map_io()
> >
> > On Sun, 23 Jan 2011, Eric Miao wrote:
> >
> > > On Sun, Jan 23, 2011 at 7:15 AM, Russell King - ARM Linux
> > > <linux@arm.linux.org.uk> wrote:
> > > > I'd instead suggest adding vmalloc_end to the machine
> > description
> > > > record.
> > > >
> > >
> > > And since all boards sharing a same machine_class is going to use
> > > the same value, I'd rather we first introduce struct machine_class
> > > like in the patch I posted months ago?
> >
> > Can we possibly get away with a global VMALLOC_END?  What if we were
> > to
> > decide it is fixed at 0xf0000000 for everyone?
> >
> Which would potentialy shrink the lowmem and vmalloc area. With
> current flexibility of adjustable VMALLOC_END, in 1G:3G model,
> we managed to  have almost ~ 896 MB virtual space available
> for lowmem + vmalloc. So keeping 128MB for vmalloc ~768MB of
> memory can be directly addressable without highmem support.

OK, I just wanted to see if people do think that the simplicity of a 
global definition would have made the per-architecture flexibility 
irrelevant.  But looking at some of the mappings it seems that quite a 
lot of virtual space wastage would be imposed in some cases.

Plus, moving vmalloc_end to the machine record is almost as simple while 
preserving the current flexibility.


Nicolas

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

* [PATCH 1/2] ARM: calculate VMALLOC_END by probing in mdesc->map_io()
  2011-01-23  4:59   ` Eric Miao
  2011-01-23  5:30     ` Nicolas Pitre
  2011-01-23  9:40     ` [PATCH 1/2] ARM: calculate VMALLOC_END by probing in mdesc->map_io() Russell King - ARM Linux
@ 2011-01-23 14:21     ` Nicolas Pitre
  2011-01-23 14:34       ` Russell King - ARM Linux
  2 siblings, 1 reply; 12+ messages in thread
From: Nicolas Pitre @ 2011-01-23 14:21 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, 23 Jan 2011, Eric Miao wrote:

> > I'd instead suggest adding vmalloc_end to the machine description
> > record.
> >
> 
> And since all boards sharing a same machine_class is going to use
> the same value, I'd rather we first introduce struct machine_class
> like in the patch I posted months ago?

Another way to look at it is to move vmalloc_end and the like into each 
machine record now, and look at the machine class changes afterwards 
with a better view of all that might be consolidated at that point.


Nicolas

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

* [PATCH 1/2] ARM: calculate VMALLOC_END by probing inmdesc->map_io()
  2011-01-23 14:17         ` Nicolas Pitre
@ 2011-01-23 14:27           ` Santosh Shilimkar
  0 siblings, 0 replies; 12+ messages in thread
From: Santosh Shilimkar @ 2011-01-23 14:27 UTC (permalink / raw)
  To: linux-arm-kernel

> -----Original Message-----
> From: Nicolas Pitre [mailto:nico at fluxnic.net]
> Sent: Sunday, January 23, 2011 7:48 PM
> To: Santosh Shilimkar
> Cc: Eric Miao; Russell King - ARM Linux; linux-arm-
> kernel at lists.infradead.org
> Subject: RE: [PATCH 1/2] ARM: calculate VMALLOC_END by probing
> inmdesc->map_io()
>
[...]

> > > Can we possibly get away with a global VMALLOC_END?  What if we
> were
> > > to
> > > decide it is fixed at 0xf0000000 for everyone?
> > >
> > Which would potentialy shrink the lowmem and vmalloc area. With
> > current flexibility of adjustable VMALLOC_END, in 1G:3G model,
> > we managed to  have almost ~ 896 MB virtual space available
> > for lowmem + vmalloc. So keeping 128MB for vmalloc ~768MB of
> > memory can be directly addressable without highmem support.
>
> OK, I just wanted to see if people do think that the simplicity of a
> global definition would have made the per-architecture flexibility
> irrelevant.  But looking at some of the mappings it seems that quite
> a
> lot of virtual space wastage would be imposed in some cases.
>
Yep.

> Plus, moving vmalloc_end to the machine record is almost as simple
> while
> preserving the current flexibility.
>
As long we can maintain current flexibility, there shouldn't be
any problem.

Regards,
Santosh

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

* [PATCH 1/2] ARM: calculate VMALLOC_END by probing in mdesc->map_io()
  2011-01-23 14:21     ` Nicolas Pitre
@ 2011-01-23 14:34       ` Russell King - ARM Linux
  2011-01-23 23:05         ` Eric Miao
  0 siblings, 1 reply; 12+ messages in thread
From: Russell King - ARM Linux @ 2011-01-23 14:34 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Jan 23, 2011 at 09:21:19AM -0500, Nicolas Pitre wrote:
> On Sun, 23 Jan 2011, Eric Miao wrote:
> 
> > > I'd instead suggest adding vmalloc_end to the machine description
> > > record.
> > >
> > 
> > And since all boards sharing a same machine_class is going to use
> > the same value, I'd rather we first introduce struct machine_class
> > like in the patch I posted months ago?
> 
> Another way to look at it is to move vmalloc_end and the like into each 
> machine record now, and look at the machine class changes afterwards 
> with a better view of all that might be consolidated at that point.

The machine class stuff is only worthwhile if it results in a net
reduction in complexity.  I don't remember whether the previous set
of patches for this showed any platforms being converted - searching
the list archives seems to suggest not.

While the simpler platforms seem to have (eg) their .map_io in a class
pointing at the same function, more complex platforms tend to have it
pointing at board-level functions.  Same goes for the .init_irq
function.

I don't think there's a clear-cut case where this approach will result
in a net reduction of complexity.  I suspect it might actually end up
making things more complicated.

What I'm basically saying is that I'd like to see the effect of having
existing board stuff converted over to show whether this is worthwhile
or not.

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

* [PATCH 1/2] ARM: calculate VMALLOC_END by probing in mdesc->map_io()
  2011-01-23 14:34       ` Russell King - ARM Linux
@ 2011-01-23 23:05         ` Eric Miao
  0 siblings, 0 replies; 12+ messages in thread
From: Eric Miao @ 2011-01-23 23:05 UTC (permalink / raw)
  To: linux-arm-kernel

On Sun, Jan 23, 2011 at 10:34 PM, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Sun, Jan 23, 2011 at 09:21:19AM -0500, Nicolas Pitre wrote:
>> On Sun, 23 Jan 2011, Eric Miao wrote:
>>
>> > > I'd instead suggest adding vmalloc_end to the machine description
>> > > record.
>> > >
>> >
>> > And since all boards sharing a same machine_class is going to use
>> > the same value, I'd rather we first introduce struct machine_class
>> > like in the patch I posted months ago?
>>
>> Another way to look at it is to move vmalloc_end and the like into each
>> machine record now, and look at the machine class changes afterwards
>> with a better view of all that might be consolidated at that point.
>
> The machine class stuff is only worthwhile if it results in a net
> reduction in complexity. ?I don't remember whether the previous set
> of patches for this showed any platforms being converted - searching
> the list archives seems to suggest not.
>
> While the simpler platforms seem to have (eg) their .map_io in a class
> pointing at the same function, more complex platforms tend to have it
> pointing at board-level functions. ?Same goes for the .init_irq
> function.
>
> I don't think there's a clear-cut case where this approach will result
> in a net reduction of complexity. ?I suspect it might actually end up
> making things more complicated.
>
> What I'm basically saying is that I'd like to see the effect of having
> existing board stuff converted over to show whether this is worthwhile
> or not.
>

OK, that makes sense.

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

end of thread, other threads:[~2011-01-23 23:05 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-22 22:56 [PATCH 1/2] ARM: calculate VMALLOC_END by probing in mdesc->map_io() Eric Miao
2011-01-22 22:56 ` [PATCH 2/2] ARM: remove now useless vmalloc.h Eric Miao
2011-01-22 23:15 ` [PATCH 1/2] ARM: calculate VMALLOC_END by probing in mdesc->map_io() Russell King - ARM Linux
2011-01-23  4:59   ` Eric Miao
2011-01-23  5:30     ` Nicolas Pitre
2011-01-23  7:15       ` [PATCH 1/2] ARM: calculate VMALLOC_END by probing inmdesc->map_io() Santosh Shilimkar
2011-01-23 14:17         ` Nicolas Pitre
2011-01-23 14:27           ` Santosh Shilimkar
2011-01-23  9:40     ` [PATCH 1/2] ARM: calculate VMALLOC_END by probing in mdesc->map_io() Russell King - ARM Linux
2011-01-23 14:21     ` Nicolas Pitre
2011-01-23 14:34       ` Russell King - ARM Linux
2011-01-23 23:05         ` Eric Miao

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.