summaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/vmregion.h
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2009-11-19 15:07:04 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-11-24 17:41:34 +0000
commit13ccf3ad99a45052664f2c1a6c64899f9d778152 (patch)
tree6e8f43fcb8e7f1c266b8c13a670c206bbf34bc96 /arch/arm/mm/vmregion.h
parentac50e950784cae1c26ad9e09ebd8f8c706131eb3 (diff)
downloadlinux-13ccf3ad99a45052664f2c1a6c64899f9d778152.tar.bz2
ARM: dma-mapping: split out vmregion code from dma coherent mapping code
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Greg Ungerer <gerg@uclinux.org>
Diffstat (limited to 'arch/arm/mm/vmregion.h')
-rw-r--r--arch/arm/mm/vmregion.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/arm/mm/vmregion.h b/arch/arm/mm/vmregion.h
new file mode 100644
index 000000000000..6b2cdbdf3a85
--- /dev/null
+++ b/arch/arm/mm/vmregion.h
@@ -0,0 +1,29 @@
+#ifndef VMREGION_H
+#define VMREGION_H
+
+#include <linux/spinlock.h>
+#include <linux/list.h>
+
+struct page;
+
+struct arm_vmregion_head {
+ spinlock_t vm_lock;
+ struct list_head vm_list;
+ unsigned long vm_start;
+ unsigned long vm_end;
+};
+
+struct arm_vmregion {
+ struct list_head vm_list;
+ unsigned long vm_start;
+ unsigned long vm_end;
+ struct page *vm_pages;
+ int vm_active;
+};
+
+struct arm_vmregion *arm_vmregion_alloc(struct arm_vmregion_head *, size_t, gfp_t);
+struct arm_vmregion *arm_vmregion_find(struct arm_vmregion_head *, unsigned long);
+struct arm_vmregion *arm_vmregion_find_remove(struct arm_vmregion_head *, unsigned long);
+void arm_vmregion_free(struct arm_vmregion_head *, struct arm_vmregion *);
+
+#endif