blob: 0f5a5f2a2c7bbc1bb79668ac291dde283741be7a [file] [log] [blame]
Russell King13ccf3a2009-11-19 15:07:04 +00001#ifndef VMREGION_H
2#define VMREGION_H
3
4#include <linux/spinlock.h>
5#include <linux/list.h>
6
7struct page;
8
9struct arm_vmregion_head {
10 spinlock_t vm_lock;
11 struct list_head vm_list;
12 unsigned long vm_start;
13 unsigned long vm_end;
14};
15
16struct arm_vmregion {
17 struct list_head vm_list;
18 unsigned long vm_start;
19 unsigned long vm_end;
Russell King13ccf3a2009-11-19 15:07:04 +000020 int vm_active;
Russell King45cd5292012-01-12 23:08:07 +000021 const void *caller;
Russell King13ccf3a2009-11-19 15:07:04 +000022};
23
Russell King45cd5292012-01-12 23:08:07 +000024struct arm_vmregion *arm_vmregion_alloc(struct arm_vmregion_head *, size_t, size_t, gfp_t, const void *);
Russell King13ccf3a2009-11-19 15:07:04 +000025struct arm_vmregion *arm_vmregion_find(struct arm_vmregion_head *, unsigned long);
26struct arm_vmregion *arm_vmregion_find_remove(struct arm_vmregion_head *, unsigned long);
27void arm_vmregion_free(struct arm_vmregion_head *, struct arm_vmregion *);
28
Russell King45cd5292012-01-12 23:08:07 +000029int arm_vmregion_create_proc(const char *, struct arm_vmregion_head *);
30
Russell King13ccf3a2009-11-19 15:07:04 +000031#endif