From: sboyd@codeaurora.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/2] ARM: mmu: Introduce iotable_init_caller()
Date: Fri, 14 Jun 2013 13:32:58 -0700 [thread overview]
Message-ID: <1371241978-6224-2-git-send-email-sboyd@codeaurora.org> (raw)
In-Reply-To: <1371241978-6224-1-git-send-email-sboyd@codeaurora.org>
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(-)
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
next prev parent reply other threads:[~2013-06-14 20:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-14 20:32 [PATCH v2 1/2] ARM: mmu: Add debug_ll_io_init() mappings to early mappings Stephen Boyd
2013-06-14 20:32 ` Stephen Boyd [this message]
2013-06-26 17:02 ` Stephen Boyd
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1371241978-6224-2-git-send-email-sboyd@codeaurora.org \
--to=sboyd@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).