diff options
Diffstat (limited to 'include/asm-arm')
-rw-r--r-- | include/asm-arm/memory.h | 3 | ||||
-rw-r--r-- | include/asm-arm/sparsemem.h | 10 |
2 files changed, 13 insertions, 0 deletions
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 | ||