]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/vmalloc.h
mm: rewrite vmap layer
[linux-2.6-omap-h63xx.git] / include / linux / vmalloc.h
index 364789aae9f335c44fa9e8b71848048134ab5ea2..4c28c4d564e2da1e5e6112e0e5081d4f08ebd942 100644 (file)
@@ -2,11 +2,12 @@
 #define _LINUX_VMALLOC_H
 
 #include <linux/spinlock.h>
+#include <linux/init.h>
 #include <asm/page.h>          /* pgprot_t */
 
-struct vm_area_struct;
+struct vm_area_struct;         /* vma defining user mapping in mm_types.h */
 
-/* bits in vm_struct->flags */
+/* bits in flags of vmalloc's vm_struct below */
 #define VM_IOREMAP     0x00000001      /* ioremap() and friends */
 #define VM_ALLOC       0x00000002      /* vmalloc() */
 #define VM_MAP         0x00000004      /* vmap()ed pages */
@@ -23,7 +24,6 @@ struct vm_area_struct;
 #endif
 
 struct vm_struct {
-       /* keep next,addr,size together to speedup lookups */
        struct vm_struct        *next;
        void                    *addr;
        unsigned long           size;
@@ -37,6 +37,19 @@ struct vm_struct {
 /*
  *     Highlevel APIs for driver use
  */
+extern void vm_unmap_ram(const void *mem, unsigned int count);
+extern void *vm_map_ram(struct page **pages, unsigned int count,
+                               int node, pgprot_t prot);
+extern void vm_unmap_aliases(void);
+
+#ifdef CONFIG_MMU
+extern void __init vmalloc_init(void);
+#else
+static inline void vmalloc_init(void)
+{
+}
+#endif
+
 extern void *vmalloc(unsigned long size);
 extern void *vmalloc_user(unsigned long size);
 extern void *vmalloc_node(unsigned long size, int node);