diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-generic/memory_model.h | 6 | ||||
-rw-r--r-- | include/linux/mm.h | 6 |
2 files changed, 12 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. diff --git a/include/linux/mm.h b/include/linux/mm.h index 1692dd6cb915..d216abbd0574 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -1218,5 +1218,11 @@ extern int randomize_va_space; const char * arch_vma_name(struct vm_area_struct *vma); +struct page *sparse_early_mem_map_populate(unsigned long pnum, int nid); +int vmemmap_populate(struct page *start_page, unsigned long pages, int node); +int vmemmap_populate_pmd(pud_t *, unsigned long, unsigned long, int); +void *vmemmap_alloc_block(unsigned long size, int node); +void vmemmap_verify(pte_t *, int, unsigned long, unsigned long); + #endif /* __KERNEL__ */ #endif /* _LINUX_MM_H */ |