Commit 3f77edfe authored by Tom Rini's avatar Tom Rini Committed by Linus Torvalds

[PATCH] Move vmalloc wrappers out of include/linux/vmalloc.h

This moves the vmalloc wrappers from <linux/vmalloc.h> into mm/vmalloc.c.

Doing this will later allow us to remove <linux/mm.h> from <linux/vmalloc.h>,
along with some other #include fixups.
parent 3102f3d2
......@@ -24,33 +24,13 @@ extern long vread(char *buf, char *addr, unsigned long count);
extern void vmfree_area_pages(unsigned long address, unsigned long size);
extern int vmalloc_area_pages(unsigned long address, unsigned long size,
int gfp_mask, pgprot_t prot);
/*
* Allocate any pages
*/
static inline void * vmalloc (unsigned long size)
{
return __vmalloc(size, GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL);
}
/*
* Allocate ISA addressable pages for broke crap
* Various ways to allocate pages.
*/
static inline void * vmalloc_dma (unsigned long size)
{
return __vmalloc(size, GFP_KERNEL|GFP_DMA, PAGE_KERNEL);
}
/*
* vmalloc 32bit PA addressable pages - eg for PCI 32bit devices
*/
static inline void * vmalloc_32(unsigned long size)
{
return __vmalloc(size, GFP_KERNEL, PAGE_KERNEL);
}
extern void * vmalloc(unsigned long size);
extern void * vmalloc_dma(unsigned long size);
extern void * vmalloc_32(unsigned long size);
/*
* vmlist_lock is a read-write spinlock that protects vmlist
......
......@@ -232,6 +232,33 @@ void vfree(void * addr)
printk(KERN_ERR "Trying to vfree() nonexistent vm area (%p)\n", addr);
}
/*
* Allocate any pages
*/
void * vmalloc (unsigned long size)
{
return __vmalloc(size, GFP_KERNEL | __GFP_HIGHMEM, PAGE_KERNEL);
}
/*
* Allocate ISA addressable pages for broke crap
*/
void * vmalloc_dma (unsigned long size)
{
return __vmalloc(size, GFP_KERNEL|GFP_DMA, PAGE_KERNEL);
}
/*
* vmalloc 32bit PA addressable pages - eg for PCI 32bit devices
*/
void * vmalloc_32(unsigned long size)
{
return __vmalloc(size, GFP_KERNEL, PAGE_KERNEL);
}
void * __vmalloc (unsigned long size, int gfp_mask, pgprot_t prot)
{
void * addr;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment