aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/Kconfig8
-rw-r--r--arch/arm/mach-clps711x/Kconfig2
-rw-r--r--include/asm-arm/memory.h3
-rw-r--r--include/asm-arm/sparsemem.h10
4 files changed, 23 insertions, 0 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 4039a133006e..df051bd24ba1 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -422,6 +422,8 @@ config ARCH_SA1100
422 bool "SA1100-based" 422 bool "SA1100-based"
423 select ISA 423 select ISA
424 select ARCH_DISCONTIGMEM_ENABLE 424 select ARCH_DISCONTIGMEM_ENABLE
425 select ARCH_SPARSEMEM_ENABLE
426 select ARCH_SELECT_MEMORY_MODEL
425 select ARCH_MTD_XIP 427 select ARCH_MTD_XIP
426 select GENERIC_GPIO 428 select GENERIC_GPIO
427 select GENERIC_TIME 429 select GENERIC_TIME
@@ -774,6 +776,12 @@ config ARCH_DISCONTIGMEM_ENABLE
774 or have huge holes in the physical address space for other reasons. 776 or have huge holes in the physical address space for other reasons.
775 See <file:Documentation/vm/numa> for more. 777 See <file:Documentation/vm/numa> for more.
776 778
779config ARCH_SPARSEMEM_ENABLE
780 bool
781
782config ARCH_SELECT_MEMORY_MODEL
783 bool
784
777config NODES_SHIFT 785config NODES_SHIFT
778 int 786 int
779 default "4" if ARCH_LH7A40X 787 default "4" if ARCH_LH7A40X
diff --git a/arch/arm/mach-clps711x/Kconfig b/arch/arm/mach-clps711x/Kconfig
index 0e2b641268ad..dbaae5f746a1 100644
--- a/arch/arm/mach-clps711x/Kconfig
+++ b/arch/arm/mach-clps711x/Kconfig
@@ -31,6 +31,8 @@ config ARCH_EDB7211
31 bool "EDB7211" 31 bool "EDB7211"
32 select ISA 32 select ISA
33 select ARCH_DISCONTIGMEM_ENABLE 33 select ARCH_DISCONTIGMEM_ENABLE
34 select ARCH_SPARSEMEM_ENABLE
35 select ARCH_SELECT_MEMORY_MODEL
34 help 36 help
35 Say Y here if you intend to run this kernel on a Cirrus Logic EDB-7211 37 Say Y here if you intend to run this kernel on a Cirrus Logic EDB-7211
36 evaluation board. 38 evaluation board.
diff --git a/include/asm-arm/memory.h b/include/asm-arm/memory.h
index d9bfb39adabf..9ba4d7136e6b 100644
--- a/include/asm-arm/memory.h
+++ b/include/asm-arm/memory.h
@@ -217,7 +217,10 @@ static inline __deprecated void *bus_to_virt(unsigned long x)
217#ifndef CONFIG_DISCONTIGMEM 217#ifndef CONFIG_DISCONTIGMEM
218 218
219#define ARCH_PFN_OFFSET PHYS_PFN_OFFSET 219#define ARCH_PFN_OFFSET PHYS_PFN_OFFSET
220
221#ifndef CONFIG_SPARSEMEM
220#define pfn_valid(pfn) ((pfn) >= PHYS_PFN_OFFSET && (pfn) < (PHYS_PFN_OFFSET + max_mapnr)) 222#define pfn_valid(pfn) ((pfn) >= PHYS_PFN_OFFSET && (pfn) < (PHYS_PFN_OFFSET + max_mapnr))
223#endif
221 224
222#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) 225#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
223#define virt_addr_valid(kaddr) ((unsigned long)(kaddr) >= PAGE_OFFSET && (unsigned long)(kaddr) < (unsigned long)high_memory) 226#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
index 000000000000..277158191a0d
--- /dev/null
+++ b/include/asm-arm/sparsemem.h
@@ -0,0 +1,10 @@
1#ifndef ASMARM_SPARSEMEM_H
2#define ASMARM_SPARSEMEM_H
3
4#include <asm/memory.h>
5
6#define MAX_PHYSADDR_BITS 32
7#define MAX_PHYSMEM_BITS 32
8#define SECTION_SIZE_BITS NODE_MEM_SIZE_BITS
9
10#endif