diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2006-11-30 15:43:51 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-04-19 06:36:48 -0400 |
commit | 05944d74bc28fffbcce159cb915d0acff82f30a1 (patch) | |
tree | 6151f1a21d7171542ca84906207030d26f9b792d /include/asm-arm/memory.h | |
parent | 05dda977f2574c3341abef9b74c27d2b362e1e3a (diff) |
[ARM] Add initial sparsemem support
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include/asm-arm/memory.h')
-rw-r--r-- | include/asm-arm/memory.h | 3 |
1 files changed, 3 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) |