aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/memory.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/include/asm/memory.h')
-rw-r--r--arch/arm/include/asm/memory.h17
1 files changed, 0 insertions, 17 deletions
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
index 376be1a62866..cefedf062138 100644
--- a/arch/arm/include/asm/memory.h
+++ b/arch/arm/include/asm/memory.h
@@ -218,7 +218,6 @@ static inline __deprecated void *bus_to_virt(unsigned long x)
218 * 218 *
219 * page_to_pfn(page) convert a struct page * to a PFN number 219 * page_to_pfn(page) convert a struct page * to a PFN number
220 * pfn_to_page(pfn) convert a _valid_ PFN number to struct page * 220 * pfn_to_page(pfn) convert a _valid_ PFN number to struct page *
221 * pfn_valid(pfn) indicates whether a PFN number is valid
222 * 221 *
223 * virt_to_page(k) convert a _valid_ virtual address to struct page * 222 * virt_to_page(k) convert a _valid_ virtual address to struct page *
224 * virt_addr_valid(k) indicates whether a virtual address is valid 223 * virt_addr_valid(k) indicates whether a virtual address is valid
@@ -227,10 +226,6 @@ static inline __deprecated void *bus_to_virt(unsigned long x)
227 226
228#define ARCH_PFN_OFFSET PHYS_PFN_OFFSET 227#define ARCH_PFN_OFFSET PHYS_PFN_OFFSET
229 228
230#ifndef CONFIG_SPARSEMEM
231#define pfn_valid(pfn) ((pfn) >= PHYS_PFN_OFFSET && (pfn) < (PHYS_PFN_OFFSET + max_mapnr))
232#endif
233
234#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) 229#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT)
235#define virt_addr_valid(kaddr) ((unsigned long)(kaddr) >= PAGE_OFFSET && (unsigned long)(kaddr) < (unsigned long)high_memory) 230#define virt_addr_valid(kaddr) ((unsigned long)(kaddr) >= PAGE_OFFSET && (unsigned long)(kaddr) < (unsigned long)high_memory)
236 231
@@ -247,18 +242,6 @@ static inline __deprecated void *bus_to_virt(unsigned long x)
247#define arch_pfn_to_nid(pfn) PFN_TO_NID(pfn) 242#define arch_pfn_to_nid(pfn) PFN_TO_NID(pfn)
248#define arch_local_page_offset(pfn, nid) LOCAL_MAP_NR((pfn) << PAGE_SHIFT) 243#define arch_local_page_offset(pfn, nid) LOCAL_MAP_NR((pfn) << PAGE_SHIFT)
249 244
250#define pfn_valid(pfn) \
251 ({ \
252 unsigned int nid = PFN_TO_NID(pfn); \
253 int valid = nid < MAX_NUMNODES; \
254 if (valid) { \
255 pg_data_t *node = NODE_DATA(nid); \
256 valid = (pfn - node->node_start_pfn) < \
257 node->node_spanned_pages; \
258 } \
259 valid; \
260 })
261
262#define virt_to_page(kaddr) \ 245#define virt_to_page(kaddr) \
263 (ADDR_TO_MAPBASE(kaddr) + LOCAL_MAP_NR(kaddr)) 246 (ADDR_TO_MAPBASE(kaddr) + LOCAL_MAP_NR(kaddr))
264 247