From 29c71111d0557385328211b130246a90f9223b46 Mon Sep 17 00:00:00 2001 From: Andy Whitcroft Date: Tue, 16 Oct 2007 01:24:14 -0700 Subject: vmemmap: generify initialisation via helpers Convert the common vmemmap population into initialisation helpers for use by architecture vmemmap populators. All architecture implementing the SPARSEMEM_VMEMMAP variant supply an architecture specific vmemmap_populate() initialiser, which may make use of the helpers. This allows us to clean up and remove the initialisation Kconfig entries. With this patch there is a single SPARSEMEM_VMEMMAP_ENABLE Kconfig option to indicate use of that variant. Signed-off-by: Andy Whitcroft Acked-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/mm.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'include/linux/mm.h') diff --git a/include/linux/mm.h b/include/linux/mm.h index d216abbd0574..fbff8e481cc4 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -1219,10 +1219,15 @@ 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); +pgd_t *vmemmap_pgd_populate(unsigned long addr, int node); +pud_t *vmemmap_pud_populate(pgd_t *pgd, unsigned long addr, int node); +pmd_t *vmemmap_pmd_populate(pud_t *pud, unsigned long addr, int node); +pte_t *vmemmap_pte_populate(pmd_t *pmd, unsigned long addr, int node); void *vmemmap_alloc_block(unsigned long size, int node); void vmemmap_verify(pte_t *, int, unsigned long, unsigned long); +int vmemmap_populate_basepages(struct page *start_page, + unsigned long pages, int node); +int vmemmap_populate(struct page *start_page, unsigned long pages, int node); #endif /* __KERNEL__ */ #endif /* _LINUX_MM_H */ -- cgit v1.2.3