diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-02-22 11:19:14 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-03-11 02:10:14 -0400 |
commit | 1cdab55d8a8313f77a95fb8ca966dc4334f8e810 (patch) | |
tree | 09649768514553e9c25d1a5a53a5cd567d0e138d /arch/powerpc/mm/pgtable_32.c | |
parent | 16962e7ce1dce29e1e92d231ac7d6844d7385d54 (diff) |
powerpc: Wire up /proc/vmallocinfo to our ioremap()
This adds the necessary bits and pieces to powerpc implementation of
ioremap to benefit from caller tracking in /proc/vmallocinfo, at least
for ioremap's done after mem init as the older ones aren't tracked.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/mm/pgtable_32.c')
-rw-r--r-- | arch/powerpc/mm/pgtable_32.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c index 58bcaeba728d..0f8c4371dfab 100644 --- a/arch/powerpc/mm/pgtable_32.c +++ b/arch/powerpc/mm/pgtable_32.c | |||
@@ -129,7 +129,8 @@ pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long address) | |||
129 | void __iomem * | 129 | void __iomem * |
130 | ioremap(phys_addr_t addr, unsigned long size) | 130 | ioremap(phys_addr_t addr, unsigned long size) |
131 | { | 131 | { |
132 | return __ioremap(addr, size, _PAGE_NO_CACHE | _PAGE_GUARDED); | 132 | return __ioremap_caller(addr, size, _PAGE_NO_CACHE | _PAGE_GUARDED, |
133 | __builtin_return_address(0)); | ||
133 | } | 134 | } |
134 | EXPORT_SYMBOL(ioremap); | 135 | EXPORT_SYMBOL(ioremap); |
135 | 136 | ||
@@ -143,13 +144,20 @@ ioremap_flags(phys_addr_t addr, unsigned long size, unsigned long flags) | |||
143 | /* we don't want to let _PAGE_USER and _PAGE_EXEC leak out */ | 144 | /* we don't want to let _PAGE_USER and _PAGE_EXEC leak out */ |
144 | flags &= ~(_PAGE_USER | _PAGE_EXEC | _PAGE_HWEXEC); | 145 | flags &= ~(_PAGE_USER | _PAGE_EXEC | _PAGE_HWEXEC); |
145 | 146 | ||
146 | return __ioremap(addr, size, flags); | 147 | return __ioremap_caller(addr, size, flags, __builtin_return_address(0)); |
147 | } | 148 | } |
148 | EXPORT_SYMBOL(ioremap_flags); | 149 | EXPORT_SYMBOL(ioremap_flags); |
149 | 150 | ||
150 | void __iomem * | 151 | void __iomem * |
151 | __ioremap(phys_addr_t addr, unsigned long size, unsigned long flags) | 152 | __ioremap(phys_addr_t addr, unsigned long size, unsigned long flags) |
152 | { | 153 | { |
154 | return __ioremap_caller(addr, size, flags, __builtin_return_address(0)); | ||
155 | } | ||
156 | |||
157 | void __iomem * | ||
158 | __ioremap_caller(phys_addr_t addr, unsigned long size, unsigned long flags, | ||
159 | void *caller) | ||
160 | { | ||
153 | unsigned long v, i; | 161 | unsigned long v, i; |
154 | phys_addr_t p; | 162 | phys_addr_t p; |
155 | int err; | 163 | int err; |
@@ -212,7 +220,7 @@ __ioremap(phys_addr_t addr, unsigned long size, unsigned long flags) | |||
212 | 220 | ||
213 | if (mem_init_done) { | 221 | if (mem_init_done) { |
214 | struct vm_struct *area; | 222 | struct vm_struct *area; |
215 | area = get_vm_area(size, VM_IOREMAP); | 223 | area = get_vm_area_caller(size, VM_IOREMAP, caller); |
216 | if (area == 0) | 224 | if (area == 0) |
217 | return NULL; | 225 | return NULL; |
218 | v = (unsigned long) area->addr; | 226 | v = (unsigned long) area->addr; |