[PATCH v2 2/2] ARM: mmu: Introduce iotable_init_caller()
From: Stephen Boyd
Date: Fri Jun 14 2013 - 16:33:18 EST
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@xxxxxxxxxxx>
Signed-off-by: Stephen Boyd <sboyd@xxxxxxxxxxxxxx>
---
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(-)
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 18b8aeb..0699bee 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -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
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/