@@ -811,10 +811,8 @@ static void __init create_mapping(struct map_desc *md)
} while (pgd++, addr != end);
}
-/*
- * Create the architecture specific mappings
- */
-void __init iotable_init(struct map_desc *io_desc, int nr)
+static void __init
+iotable_init_caller(struct map_desc *io_desc, int nr, void *caller)
{
struct map_desc *md;
struct vm_struct *vm;
@@ -834,11 +832,19 @@ void __init iotable_init(struct map_desc *io_desc, int nr)
vm->phys_addr = __pfn_to_phys(md->pfn);
vm->flags = VM_IOREMAP | VM_ARM_STATIC_MAPPING;
vm->flags |= VM_ARM_MTYPE(md->type);
- vm->caller = iotable_init;
+ vm->caller = caller;
add_static_vm_early(svm++);
}
}
+/*
+ * Create the architecture specific mappings
+ */
+void __init iotable_init(struct map_desc *io_desc, int nr)
+{
+ iotable_init_caller(io_desc, nr, iotable_init);
+}
+
void __init vm_reserve_area_early(unsigned long addr, unsigned long size,
void *caller)
{
@@ -947,7 +953,7 @@ void __init debug_ll_io_init(void)
map.virtual &= PAGE_MASK;
map.length = PAGE_SIZE;
map.type = MT_DEVICE;
- iotable_init(&map, 1);
+ iotable_init_caller(&map, 1, debug_ll_io_init);
}
#endif
Now that debug_ll_io_init() maps memory via iotable_init() we don't get much information in vmallocinfo about what the mapping corresponds to. Introduce iotable_init_caller() that does the same thing as iotable_init() except that it allows us to specify the function that should appear in vmallocinfo. This allows us to differentiate the debug_ll mapping from the other iotable_init() mappings. Cc: Rob Herring <rob.herring@calxeda.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> --- I'm ok without this patch. Using __builtin_return_address(0) seems to do alright on framepointer builds but fails on unwind table builds so I went with this approach. arch/arm/mm/mmu.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-)