diff options
Diffstat (limited to 'include/asm-generic/memory_model.h')
-rw-r--r-- | include/asm-generic/memory_model.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/asm-generic/memory_model.h b/include/asm-generic/memory_model.h index 30d8d33491dd..52226e14bd7d 100644 --- a/include/asm-generic/memory_model.h +++ b/include/asm-generic/memory_model.h @@ -46,6 +46,12 @@ __pgdat->node_start_pfn; \ }) +#elif defined(CONFIG_SPARSEMEM_VMEMMAP) + +/* memmap is virtually contigious. */ +#define __pfn_to_page(pfn) (vmemmap + (pfn)) +#define __page_to_pfn(page) ((page) - vmemmap) + #elif defined(CONFIG_SPARSEMEM) /* * Note: section's mem_map is encorded to reflect its start_pfn. |