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 @@ | |||
46 | __pgdat->node_start_pfn; \ | 46 | __pgdat->node_start_pfn; \ |
47 | }) | 47 | }) |
48 | 48 | ||
49 | #elif defined(CONFIG_SPARSEMEM_VMEMMAP) | ||
50 | |||
51 | /* memmap is virtually contigious. */ | ||
52 | #define __pfn_to_page(pfn) (vmemmap + (pfn)) | ||
53 | #define __page_to_pfn(page) ((page) - vmemmap) | ||
54 | |||
49 | #elif defined(CONFIG_SPARSEMEM) | 55 | #elif defined(CONFIG_SPARSEMEM) |
50 | /* | 56 | /* |
51 | * Note: section's mem_map is encorded to reflect its start_pfn. | 57 | * Note: section's mem_map is encorded to reflect its start_pfn. |