Subversion Repositories Kolibri OS

Rev

Rev 6934 | 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_UNINITIALIZED        0x00000020      /* vm_struct is not fully initialized */
  17. #define VM_NO_GUARD             0x00000040      /* don't add guard page */
  18. #define VM_KASAN                0x00000080      /* has allocated kasan shadow memory */
  19. /* bits [20..32] reserved for arch specific ioremap internals */
  20.  
  21. /*
  22.  * Maximum alignment for ioremap() regions.
  23.  * Can be overriden by arch-specific value.
  24.  */
  25. #ifndef IOREMAP_MAX_ORDER
  26. #define IOREMAP_MAX_ORDER       (7 + PAGE_SHIFT)        /* 128 pages */
  27. #endif
  28. extern void *vmalloc(unsigned long size);
  29. extern void *vzalloc(unsigned long size);
  30. extern void vfree(const void *addr);
  31.  
  32. extern void *vmap(struct page **pages, unsigned int count,
  33.                         unsigned long flags, pgprot_t prot);
  34. extern void vunmap(const void *addr);
  35.  
  36. #endif /* _LINUX_VMALLOC_H */
  37.