diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-12 18:08:07 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-01-23 05:23:57 -0500 |
commit | 45cd5290bfd358e9885c0bf47a8c46671a92f716 (patch) | |
tree | a1831403d646336b022b973fd48427263d349e8b /arch/arm/mm/vmregion.h | |
parent | 6bebb572404f96d367170fb263603cda7251f932 (diff) |
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.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/arm/mm/vmregion.h b/arch/arm/mm/vmregion.h index 15e9f044db9f..162be662c088 100644 --- a/arch/arm/mm/vmregion.h +++ b/arch/arm/mm/vmregion.h | |||
@@ -19,11 +19,14 @@ struct arm_vmregion { | |||
19 | unsigned long vm_end; | 19 | unsigned long vm_end; |
20 | struct page *vm_pages; | 20 | struct page *vm_pages; |
21 | int vm_active; | 21 | int vm_active; |
22 | const void *caller; | ||
22 | }; | 23 | }; |
23 | 24 | ||
24 | struct arm_vmregion *arm_vmregion_alloc(struct arm_vmregion_head *, size_t, size_t, gfp_t); | 25 | struct arm_vmregion *arm_vmregion_alloc(struct arm_vmregion_head *, size_t, size_t, gfp_t, const void *); |
25 | struct arm_vmregion *arm_vmregion_find(struct arm_vmregion_head *, unsigned long); | 26 | struct arm_vmregion *arm_vmregion_find(struct arm_vmregion_head *, unsigned long); |
26 | struct arm_vmregion *arm_vmregion_find_remove(struct arm_vmregion_head *, unsigned long); | 27 | struct arm_vmregion *arm_vmregion_find_remove(struct arm_vmregion_head *, unsigned long); |
27 | void arm_vmregion_free(struct arm_vmregion_head *, struct arm_vmregion *); | 28 | void arm_vmregion_free(struct arm_vmregion_head *, struct arm_vmregion *); |
28 | 29 | ||
30 | int arm_vmregion_create_proc(const char *, struct arm_vmregion_head *); | ||
31 | |||
29 | #endif | 32 | #endif |