summaryrefslogtreecommitdiffstats
path: root/include/linux/vmalloc.h
blob: d360d41bc75287576c2268074c94a77e458648dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef __LINUX_VMALLOC_H
#define __LINUX_VMALLOC_H

#include <linux/sched.h>
#include <linux/mm.h>

#include <asm/pgtable.h>

/* bits in vm_struct->flags */
#define VM_IOREMAP	0x00000001	/* ioremap() and friends */
#define VM_ALLOC	0x00000002	/* vmalloc() */

struct vm_struct {
	unsigned long flags;
	void * addr;
	unsigned long size;
	struct vm_struct * next;
};

struct vm_struct * get_vm_area(unsigned long size, unsigned long flags);
void vfree(void * addr);
void * vmalloc_prot(unsigned long size, pgprot_t prot);
void * vmalloc_uncached(unsigned long size);
extern void * vmalloc(unsigned long size);


long vread(char *buf, char *addr, unsigned long count);
void vmfree_area_pages(unsigned long address, unsigned long size);
int vmalloc_area_pages(unsigned long address, unsigned long size, pgprot_t prot);

extern struct vm_struct * vmlist;
#endif