From patchwork Fri Jun 14 20:32:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 2724201 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A1152C0AB1 for ; Fri, 14 Jun 2013 20:33:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CD05F2024E for ; Fri, 14 Jun 2013 20:33:33 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C93E320243 for ; Fri, 14 Jun 2013 20:33:32 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Unagc-00055j-C4; Fri, 14 Jun 2013 20:33:30 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UnagZ-0000Rq-GZ; Fri, 14 Jun 2013 20:33:27 +0000 Received: from smtp.codeaurora.org ([198.145.11.231]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UnagV-0000Pt-Py for linux-arm-kernel@lists.infradead.org; Fri, 14 Jun 2013 20:33:24 +0000 Received: from smtp.codeaurora.org (localhost [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id EA43313F07A; Fri, 14 Jun 2013 20:33:02 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 486) id DD81E13EFED; Fri, 14 Jun 2013 20:33:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from sboyd-linux.qualcomm.com (i-global252.qualcomm.com [199.106.103.252]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: sboyd@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 64C2F13EFED; Fri, 14 Jun 2013 20:33:02 +0000 (UTC) From: Stephen Boyd To: Russell King Subject: [PATCH v2 2/2] ARM: mmu: Introduce iotable_init_caller() Date: Fri, 14 Jun 2013 13:32:58 -0700 Message-Id: <1371241978-6224-2-git-send-email-sboyd@codeaurora.org> X-Mailer: git-send-email 1.8.3.1.378.g9926f66 In-Reply-To: <1371241978-6224-1-git-send-email-sboyd@codeaurora.org> References: <1371241978-6224-1-git-send-email-sboyd@codeaurora.org> X-Virus-Scanned: ClamAV using ClamSMTP X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130614_163323_901949_A99B5875 X-CRM114-Status: GOOD ( 17.07 ) X-Spam-Score: -2.2 (--) Cc: linux-arm-msm@vger.kernel.org, Rob Herring , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Signed-off-by: Stephen Boyd --- 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