aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChristoph Lameter <clameter@sgi.com>2008-02-05 01:28:31 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-05 12:44:13 -0500
commit48667e7a43c1a1e0ba743f93ae946f8cb34ff2f9 (patch)
treeb2fb79d16fbac46a859f8332cf95852b73839e07 /include
parenteebd2aa355692afaf9906f62118620f1a1c19dbb (diff)
Move vmalloc_to_page() to mm/vmalloc.
We already have page table manipulation for vmalloc in vmalloc.c. Move the vmalloc_to_page() function there as well. Move the definitions for vmalloc related functions in mm.h to a newly created section. A better place would be vmalloc.h but mm.h is basic and may depend on these functions. An alternative would be to include vmalloc.h in mm.h (like done for vmstat.h). Signed-off-by: Christoph Lameter <clameter@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mm.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 1bba6789a50a..1961056b1af7 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -231,6 +231,10 @@ static inline int get_page_unless_zero(struct page *page)
231 return atomic_inc_not_zero(&page->_count); 231 return atomic_inc_not_zero(&page->_count);
232} 232}
233 233
234/* Support for virtually mapped pages */
235struct page *vmalloc_to_page(void *addr);
236unsigned long vmalloc_to_pfn(void *addr);
237
234static inline struct page *compound_head(struct page *page) 238static inline struct page *compound_head(struct page *page)
235{ 239{
236 if (unlikely(PageTail(page))) 240 if (unlikely(PageTail(page)))
@@ -1089,8 +1093,6 @@ static inline unsigned long vma_pages(struct vm_area_struct *vma)
1089 1093
1090pgprot_t vm_get_page_prot(unsigned long vm_flags); 1094pgprot_t vm_get_page_prot(unsigned long vm_flags);
1091struct vm_area_struct *find_extend_vma(struct mm_struct *, unsigned long addr); 1095struct vm_area_struct *find_extend_vma(struct mm_struct *, unsigned long addr);
1092struct page *vmalloc_to_page(void *addr);
1093unsigned long vmalloc_to_pfn(void *addr);
1094int remap_pfn_range(struct vm_area_struct *, unsigned long addr, 1096int remap_pfn_range(struct vm_area_struct *, unsigned long addr,
1095 unsigned long pfn, unsigned long size, pgprot_t); 1097 unsigned long pfn, unsigned long size, pgprot_t);
1096int vm_insert_page(struct vm_area_struct *, unsigned long addr, struct page *); 1098int vm_insert_page(struct vm_area_struct *, unsigned long addr, struct page *);