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