]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[ARM] Add initial sparsemem support
authorRussell King <rmk@dyn-67.arm.linux.org.uk>
Thu, 30 Nov 2006 20:43:51 +0000 (20:43 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 19 Apr 2008 10:36:48 +0000 (11:36 +0100)
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/Kconfig
arch/arm/mach-clps711x/Kconfig
include/asm-arm/memory.h
include/asm-arm/sparsemem.h [new file with mode: 0644]

index 4039a133006e8a2c0af987b99914334a6abac90f..df051bd24ba18c86625f9b969e427bf636b12374 100644 (file)
@@ -422,6 +422,8 @@ config ARCH_SA1100
        bool "SA1100-based"
        select ISA
        select ARCH_DISCONTIGMEM_ENABLE
+       select ARCH_SPARSEMEM_ENABLE
+       select ARCH_SELECT_MEMORY_MODEL
        select ARCH_MTD_XIP
        select GENERIC_GPIO
        select GENERIC_TIME
@@ -774,6 +776,12 @@ config ARCH_DISCONTIGMEM_ENABLE
          or have huge holes in the physical address space for other reasons.
          See <file:Documentation/vm/numa> for more.
 
+config ARCH_SPARSEMEM_ENABLE
+       bool
+
+config ARCH_SELECT_MEMORY_MODEL
+       bool
+
 config NODES_SHIFT
        int
        default "4" if ARCH_LH7A40X
index 0e2b641268ad172d4f4a481fbeba0918dbe4a170..dbaae5f746a1ced107faf56439c7f2bf71bc845c 100644 (file)
@@ -31,6 +31,8 @@ config ARCH_EDB7211
        bool "EDB7211"
        select ISA
        select ARCH_DISCONTIGMEM_ENABLE
+       select ARCH_SPARSEMEM_ENABLE
+       select ARCH_SELECT_MEMORY_MODEL
        help
          Say Y here if you intend to run this kernel on a Cirrus Logic EDB-7211
          evaluation board.
index d9bfb39adabf02650ad0d4410c8e8c461b508069..9ba4d7136e6b2dfeaf714df43f35be6c616da9ba 100644 (file)
@@ -217,7 +217,10 @@ static inline __deprecated void *bus_to_virt(unsigned long x)
 #ifndef CONFIG_DISCONTIGMEM
 
 #define ARCH_PFN_OFFSET                PHYS_PFN_OFFSET
+
+#ifndef CONFIG_SPARSEMEM
 #define pfn_valid(pfn)         ((pfn) >= PHYS_PFN_OFFSET && (pfn) < (PHYS_PFN_OFFSET + max_mapnr))
+#endif
 
 #define virt_to_page(kaddr)    pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
 #define virt_addr_valid(kaddr) ((unsigned long)(kaddr) >= PAGE_OFFSET && (unsigned long)(kaddr) < (unsigned long)high_memory)
diff --git a/include/asm-arm/sparsemem.h b/include/asm-arm/sparsemem.h
new file mode 100644 (file)
index 0000000..2771581
--- /dev/null
@@ -0,0 +1,10 @@
+#ifndef ASMARM_SPARSEMEM_H
+#define ASMARM_SPARSEMEM_H
+
+#include <asm/memory.h>
+
+#define MAX_PHYSADDR_BITS      32
+#define MAX_PHYSMEM_BITS       32
+#define SECTION_SIZE_BITS      NODE_MEM_SIZE_BITS
+
+#endif