summaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/vmregion.h
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2012-01-12 23:08:07 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-01-23 10:23:57 +0000
commit45cd5290bfd358e9885c0bf47a8c46671a92f716 (patch)
treea1831403d646336b022b973fd48427263d349e8b /arch/arm/mm/vmregion.h
parent6bebb572404f96d367170fb263603cda7251f932 (diff)
downloadop-kernel-dev-45cd5290bfd358e9885c0bf47a8c46671a92f716.zip
op-kernel-dev-45cd5290bfd358e9885c0bf47a8c46671a92f716.tar.gz
ARM: add dma coherent region reporting via procfs
Add a new seqfile for reporting coherent DMA allocations. This contains the address range, size and the function which was used to allocate each region, allowing these allocations to be viewed in much the same way as /proc/vmallocinfo. The DMA coherent region has limited space, so this allows allocation failures to be viewed, as well as finding out how much space is being used. Make sure this file is only readable by root - same as vmallocinfo - to prevent information leakage. Acked-by: Nicolas Pitre <nico@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mm/vmregion.h')
-rw-r--r--arch/arm/mm/vmregion.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/arm/mm/vmregion.h b/arch/arm/mm/vmregion.h
index 15e9f04..162be66 100644
--- a/arch/arm/mm/vmregion.h
+++ b/arch/arm/mm/vmregion.h
@@ -19,11 +19,14 @@ struct arm_vmregion {
unsigned long vm_end;
struct page *vm_pages;
int vm_active;
+ const void *caller;
};
-struct arm_vmregion *arm_vmregion_alloc(struct arm_vmregion_head *, size_t, size_t, gfp_t);
+struct arm_vmregion *arm_vmregion_alloc(struct arm_vmregion_head *, size_t, size_t, gfp_t, const void *);
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 *);
+int arm_vmregion_create_proc(const char *, struct arm_vmregion_head *);
+
#endif
OpenPOWER on IntegriCloud