X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=include%2Flinux%2Fvmalloc.h;h=89338b468d0de9c90d857e7e6154ecebcd3bc598;hb=28d9aa613daa65b295a099a8433df97de1c56a2f;hp=132b260aef1e5afeee3529eed8d282a9342e6bbe;hpb=bf22f6fe2d72b4d7e9035be8ceb340414cf490e3;p=linux-2.6-omap-h63xx.git diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index 132b260aef1..89338b468d0 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h @@ -58,6 +58,13 @@ void vmalloc_sync_all(void); /* * Lowlevel-APIs (not for driver use!) */ + +static inline size_t get_vm_area_size(const struct vm_struct *area) +{ + /* return actual size without guard page */ + return area->size - PAGE_SIZE; +} + extern struct vm_struct *get_vm_area(unsigned long size, unsigned long flags); extern struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags, unsigned long start, unsigned long end); @@ -70,6 +77,10 @@ extern int map_vm_area(struct vm_struct *area, pgprot_t prot, struct page ***pages); extern void unmap_kernel_range(unsigned long addr, unsigned long size); +/* Allocate/destroy a 'vmalloc' VM area. */ +extern struct vm_struct *alloc_vm_area(size_t size); +extern void free_vm_area(struct vm_struct *area); + /* * Internals. Dont't use.. */