[PATCH] change_page_attr and AGP update
[linux-2.6/history.git] / include / linux / vmalloc.h
blob9cc67b500368d3b3ec151daad32d962d6712570e
1 #ifndef __LINUX_VMALLOC_H
2 #define __LINUX_VMALLOC_H
4 #include <linux/spinlock.h>
6 #include <asm/pgtable.h>
8 /* bits in vm_struct->flags */
9 #define VM_IOREMAP 0x00000001 /* ioremap() and friends */
10 #define VM_ALLOC 0x00000002 /* vmalloc() */
12 struct vm_struct {
13 unsigned long flags;
14 void * addr;
15 unsigned long size;
16 unsigned long phys_addr;
17 struct vm_struct * next;
20 extern struct vm_struct * get_vm_area (unsigned long size, unsigned long flags);
21 extern void vfree(void * addr);
22 extern void * __vmalloc (unsigned long size, int gfp_mask, pgprot_t prot);
23 extern long vread(char *buf, char *addr, unsigned long count);
24 extern void vmfree_area_pages(unsigned long address, unsigned long size);
25 extern int vmalloc_area_pages(unsigned long address, unsigned long size,
26 int gfp_mask, pgprot_t prot);
27 extern struct vm_struct *remove_kernel_area(void *addr);
30 * Various ways to allocate pages.
33 extern void * vmalloc(unsigned long size);
34 extern void * vmalloc_32(unsigned long size);
37 * vmlist_lock is a read-write spinlock that protects vmlist
38 * Used in mm/vmalloc.c (get_vm_area() and vfree()) and fs/proc/kcore.c.
40 extern rwlock_t vmlist_lock;
42 extern struct vm_struct * vmlist;
43 #endif