Russell King | 13ccf3a | 2009-11-19 15:07:04 +0000 | [diff] [blame] | 1 | #ifndef VMREGION_H |
| 2 | #define VMREGION_H |
| 3 | |
| 4 | #include <linux/spinlock.h> |
| 5 | #include <linux/list.h> |
| 6 | |
| 7 | struct page; |
| 8 | |
| 9 | struct 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 | |
| 16 | struct arm_vmregion { |
| 17 | struct list_head vm_list; |
| 18 | unsigned long vm_start; |
| 19 | unsigned long vm_end; |
Marek Szyprowski | 4ce63fc | 2012-05-16 15:48:21 +0200 | [diff] [blame] | 20 | void *priv; |
Russell King | 13ccf3a | 2009-11-19 15:07:04 +0000 | [diff] [blame] | 21 | int vm_active; |
Russell King | 45cd529 | 2012-01-12 23:08:07 +0000 | [diff] [blame] | 22 | const void *caller; |
Russell King | 13ccf3a | 2009-11-19 15:07:04 +0000 | [diff] [blame] | 23 | }; |
| 24 | |
Russell King | 45cd529 | 2012-01-12 23:08:07 +0000 | [diff] [blame] | 25 | struct arm_vmregion *arm_vmregion_alloc(struct arm_vmregion_head *, size_t, size_t, gfp_t, const void *); |
Russell King | 13ccf3a | 2009-11-19 15:07:04 +0000 | [diff] [blame] | 26 | struct arm_vmregion *arm_vmregion_find(struct arm_vmregion_head *, unsigned long); |
| 27 | struct arm_vmregion *arm_vmregion_find_remove(struct arm_vmregion_head *, unsigned long); |
| 28 | void arm_vmregion_free(struct arm_vmregion_head *, struct arm_vmregion *); |
| 29 | |
Russell King | 45cd529 | 2012-01-12 23:08:07 +0000 | [diff] [blame] | 30 | int arm_vmregion_create_proc(const char *, struct arm_vmregion_head *); |
| 31 | |
Russell King | 13ccf3a | 2009-11-19 15:07:04 +0000 | [diff] [blame] | 32 | #endif |