Subversion Repositories Kolibri OS

Rev

Rev 6295 | Rev 6936 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. #ifndef _LINUX_VMALLOC_H
  2. #define _LINUX_VMALLOC_H
  3.  
  4. #include <linux/spinlock.h>
  5. #include <linux/init.h>
  6. #include <linux/list.h>
  7. #include <linux/rbtree.h>
  8.  
  9. struct vm_area_struct;          /* vma defining user mapping in mm_types.h */
  10.  
  11. /* bits in flags of vmalloc's vm_struct below */
  12. #define VM_IOREMAP              0x00000001      /* ioremap() and friends */
  13. #define VM_ALLOC                0x00000002      /* vmalloc() */
  14. #define VM_MAP                  0x00000004      /* vmap()ed pages */
  15. #define VM_USERMAP              0x00000008      /* suitable for remap_vmalloc_range */
  16. #define VM_VPAGES               0x00000010      /* buffer for pages was vmalloc'ed */
  17. #define VM_UNINITIALIZED        0x00000020      /* vm_struct is not fully initialized */
  18. #define VM_NO_GUARD             0x00000040      /* don't add guard page */
  19. #define VM_KASAN                0x00000080      /* has allocated kasan shadow memory */
  20. /* bits [20..32] reserved for arch specific ioremap internals */
  21.  
  22. /*
  23.  * Maximum alignment for ioremap() regions.
  24.  * Can be overriden by arch-specific value.
  25.  */
  26. #ifndef IOREMAP_MAX_ORDER
  27. #define IOREMAP_MAX_ORDER       (7 + PAGE_SHIFT)        /* 128 pages */
  28. #endif
  29. extern void *vmalloc(unsigned long size);
  30. extern void *vzalloc(unsigned long size);
  31. extern void vfree(const void *addr);
  32.  
  33. extern void *vmap(struct page **pages, unsigned int count,
  34.                         unsigned long flags, pgprot_t prot);
  35. extern void vunmap(const void *addr);
  36.  
  37. #endif /* _LINUX_VMALLOC_H */
  38.