2014-02-06 07:52:49 +01:00
|
|
|
#ifndef _LINUX_VMALLOC_H
|
|
|
|
#define _LINUX_VMALLOC_H
|
2016-02-27 21:06:12 +01:00
|
|
|
|
|
|
|
#include <linux/spinlock.h>
|
|
|
|
#include <linux/init.h>
|
|
|
|
#include <linux/list.h>
|
2018-02-02 15:53:42 +01:00
|
|
|
#include <asm/page.h> /* pgprot_t */
|
2017-07-27 12:22:14 +02:00
|
|
|
#include <linux/rbtree.h>
|
|
|
|
|
2016-02-27 21:06:12 +01:00
|
|
|
struct vm_area_struct; /* vma defining user mapping in mm_types.h */
|
|
|
|
|
|
|
|
/* 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 */
|
|
|
|
#define VM_USERMAP 0x00000008 /* suitable for remap_vmalloc_range */
|
|
|
|
#define VM_UNINITIALIZED 0x00000020 /* vm_struct is not fully initialized */
|
|
|
|
#define VM_NO_GUARD 0x00000040 /* don't add guard page */
|
|
|
|
#define VM_KASAN 0x00000080 /* has allocated kasan shadow memory */
|
|
|
|
/* bits [20..32] reserved for arch specific ioremap internals */
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Maximum alignment for ioremap() regions.
|
|
|
|
* Can be overriden by arch-specific value.
|
|
|
|
*/
|
|
|
|
#ifndef IOREMAP_MAX_ORDER
|
|
|
|
#define IOREMAP_MAX_ORDER (7 + PAGE_SHIFT) /* 128 pages */
|
|
|
|
#endif
|
|
|
|
extern void *vmalloc(unsigned long size);
|
|
|
|
extern void *vzalloc(unsigned long size);
|
|
|
|
extern void vfree(const void *addr);
|
|
|
|
|
|
|
|
extern void *vmap(struct page **pages, unsigned int count,
|
|
|
|
unsigned long flags, pgprot_t prot);
|
|
|
|
extern void vunmap(const void *addr);
|
|
|
|
|
2014-02-06 07:52:49 +01:00
|
|
|
#endif /* _LINUX_VMALLOC_H */
|