diff options
| author | Linus Torvalds <torvalds@home.transmeta.com> | 2002-08-12 18:04:35 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-08-12 18:04:35 -0700 |
| commit | 630986cd7db778443b1a8dd4d1f0afcab5870aa0 (patch) | |
| tree | 82ad1f43de91529aa7d8f0ec280faedffe32b5bb /include/linux/vmalloc.h | |
| parent | 7366f03f1be18574ba18bacc2725431a2eabd830 (diff) | |
| parent | d24919a7fbc635bea6ecc267058dcdbadf03f565 (diff) | |
Automerge
Diffstat (limited to 'include/linux/vmalloc.h')
| -rw-r--r-- | include/linux/vmalloc.h | 57 |
1 files changed, 30 insertions, 27 deletions
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index 9cc67b500368..5da711fefc6f 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h @@ -1,44 +1,47 @@ -#ifndef __LINUX_VMALLOC_H -#define __LINUX_VMALLOC_H +#ifndef _LINUX_VMALLOC_H +#define _LINUX_VMALLOC_H #include <linux/spinlock.h> -#include <asm/pgtable.h> - /* bits in vm_struct->flags */ #define VM_IOREMAP 0x00000001 /* ioremap() and friends */ #define VM_ALLOC 0x00000002 /* vmalloc() */ +#define VM_MAP 0x00000004 /* vmap()ed pages */ struct vm_struct { - unsigned long flags; - void * addr; - unsigned long size; - unsigned long phys_addr; - struct vm_struct * next; + void *addr; + unsigned long size; + unsigned long flags; + struct page **pages; + unsigned int nr_pages; + unsigned long phys_addr; + struct vm_struct *next; }; -extern struct vm_struct * get_vm_area (unsigned long size, unsigned long flags); -extern void vfree(void * addr); -extern void * __vmalloc (unsigned long size, int gfp_mask, pgprot_t prot); -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); -extern struct vm_struct *remove_kernel_area(void *addr); - /* - * Various ways to allocate pages. + * Highlevel APIs for driver use */ - -extern void * vmalloc(unsigned long size); -extern void * vmalloc_32(unsigned long size); +extern void *vmalloc(unsigned long size); +extern void *vmalloc_32(unsigned long size); +extern void *__vmalloc(unsigned long size, int gfp_mask, pgprot_t prot); +extern void vfree(void *addr); + +extern void *vmap(struct page **pages, unsigned int count); +extern void vunmap(void *addr); + +/* + * Lowlevel-APIs (not for driver use!) + */ +extern struct vm_struct *get_vm_area(unsigned long size, unsigned long flags); +extern struct vm_struct *remove_vm_area(void *addr); +extern int map_vm_area(struct vm_struct *area, pgprot_t prot, + struct page ***pages); +extern void unmap_vm_area(struct vm_struct *area); /* - * vmlist_lock is a read-write spinlock that protects vmlist - * Used in mm/vmalloc.c (get_vm_area() and vfree()) and fs/proc/kcore.c. + * Internals. Dont't use.. */ extern rwlock_t vmlist_lock; +extern struct vm_struct *vmlist; -extern struct vm_struct * vmlist; -#endif - +#endif /* _LINUX_VMALLOC_H */ |
