diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-10-01 12:11:06 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-10-01 12:24:04 -0400 |
commit | 07f841b7c587a3cbf481509be09ba5eda05f8d31 (patch) | |
tree | 44f7a45c56568f17841c1a37afc49193fecb1714 /arch | |
parent | b7a69ac303cbfc8d6fa8e91d10e8049244ba6847 (diff) |
[ARM] mm: enable sparsemem on clps7500 and RiscPC
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/Kconfig | 2 | ||||
-rw-r--r-- | arch/arm/include/asm/sparsemem.h | 20 | ||||
-rw-r--r-- | arch/arm/mach-clps7500/include/mach/memory.h | 8 | ||||
-rw-r--r-- | arch/arm/mach-rpc/include/mach/memory.h | 8 |
4 files changed, 35 insertions, 3 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 4eb816c4df7d..83106c98755c 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -250,6 +250,7 @@ config ARCH_CLPS7500 | |||
250 | select TIMER_ACORN | 250 | select TIMER_ACORN |
251 | select ISA | 251 | select ISA |
252 | select NO_IOPORT | 252 | select NO_IOPORT |
253 | select ARCH_SPARSEMEM_ENABLE | ||
253 | help | 254 | help |
254 | Support for the Cirrus Logic PS7500FE system-on-a-chip. | 255 | Support for the Cirrus Logic PS7500FE system-on-a-chip. |
255 | 256 | ||
@@ -470,6 +471,7 @@ config ARCH_RPC | |||
470 | select HAVE_PATA_PLATFORM | 471 | select HAVE_PATA_PLATFORM |
471 | select ISA_DMA_API | 472 | select ISA_DMA_API |
472 | select NO_IOPORT | 473 | select NO_IOPORT |
474 | select ARCH_SPARSEMEM_ENABLE | ||
473 | help | 475 | help |
474 | On the Acorn Risc-PC, Linux can support the internal IDE disk and | 476 | On the Acorn Risc-PC, Linux can support the internal IDE disk and |
475 | CD-ROM interface, serial and parallel port, and the floppy drive. | 477 | CD-ROM interface, serial and parallel port, and the floppy drive. |
diff --git a/arch/arm/include/asm/sparsemem.h b/arch/arm/include/asm/sparsemem.h index 277158191a0d..00098615c6f0 100644 --- a/arch/arm/include/asm/sparsemem.h +++ b/arch/arm/include/asm/sparsemem.h | |||
@@ -3,8 +3,22 @@ | |||
3 | 3 | ||
4 | #include <asm/memory.h> | 4 | #include <asm/memory.h> |
5 | 5 | ||
6 | #define MAX_PHYSADDR_BITS 32 | 6 | /* |
7 | #define MAX_PHYSMEM_BITS 32 | 7 | * Two definitions are required for sparsemem: |
8 | #define SECTION_SIZE_BITS NODE_MEM_SIZE_BITS | 8 | * |
9 | * MAX_PHYSMEM_BITS: The number of physical address bits required | ||
10 | * to address the last byte of memory. | ||
11 | * | ||
12 | * SECTION_SIZE_BITS: The number of physical address bits to cover | ||
13 | * the maximum amount of memory in a section. | ||
14 | * | ||
15 | * Eg, if you have 2 banks of up to 64MB at 0x80000000, 0x84000000, | ||
16 | * then MAX_PHYSMEM_BITS is 32, SECTION_SIZE_BITS is 26. | ||
17 | * | ||
18 | * Define these in your mach/memory.h. | ||
19 | */ | ||
20 | #if !defined(SECTION_SIZE_BITS) || !defined(MAX_PHYSMEM_BITS) | ||
21 | #error Sparsemem is not supported on this platform | ||
22 | #endif | ||
9 | 23 | ||
10 | #endif | 24 | #endif |
diff --git a/arch/arm/mach-clps7500/include/mach/memory.h b/arch/arm/mach-clps7500/include/mach/memory.h index 3326aa99d3ec..87b32db470c8 100644 --- a/arch/arm/mach-clps7500/include/mach/memory.h +++ b/arch/arm/mach-clps7500/include/mach/memory.h | |||
@@ -32,4 +32,12 @@ | |||
32 | #define FLUSH_BASE_PHYS 0x00000000 | 32 | #define FLUSH_BASE_PHYS 0x00000000 |
33 | #define FLUSH_BASE 0xdf000000 | 33 | #define FLUSH_BASE 0xdf000000 |
34 | 34 | ||
35 | /* | ||
36 | * Sparsemem support. Each section is a maximum of 64MB. The sections | ||
37 | * are offset by 128MB and can cover 128MB, so that gives us a maximum | ||
38 | * of 29 physmem bits. | ||
39 | */ | ||
40 | #define MAX_PHYSMEM_BITS 29 | ||
41 | #define SECTION_SIZE_BITS 26 | ||
42 | |||
35 | #endif | 43 | #endif |
diff --git a/arch/arm/mach-rpc/include/mach/memory.h b/arch/arm/mach-rpc/include/mach/memory.h index 05425d558ee7..9bf7e43e2863 100644 --- a/arch/arm/mach-rpc/include/mach/memory.h +++ b/arch/arm/mach-rpc/include/mach/memory.h | |||
@@ -36,4 +36,12 @@ | |||
36 | #define FLUSH_BASE_PHYS 0x00000000 | 36 | #define FLUSH_BASE_PHYS 0x00000000 |
37 | #define FLUSH_BASE 0xdf000000 | 37 | #define FLUSH_BASE 0xdf000000 |
38 | 38 | ||
39 | /* | ||
40 | * Sparsemem support. Each section is a maximum of 64MB. The sections | ||
41 | * are offset by 128MB and can cover 128MB, so that gives us a maximum | ||
42 | * of 29 physmem bits. | ||
43 | */ | ||
44 | #define MAX_PHYSMEM_BITS 29 | ||
45 | #define SECTION_SIZE_BITS 26 | ||
46 | |||
39 | #endif | 47 | #endif |