From patchwork Mon Oct 2 13:01:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthieu CASTET X-Patchwork-Id: 9980837 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A82AC603FF for ; Mon, 2 Oct 2017 13:02:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9A493201F3 for ; Mon, 2 Oct 2017 13:02:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8F1BC2888C; Mon, 2 Oct 2017 13:02:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 15F6E207A7 for ; Mon, 2 Oct 2017 13:02:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=8zRjs8WZF2sCH+/A7XgBtsI+M8VAWApQMCDmy+FTDkU=; b=sSV T011G2vPtODOATjgZdQi6SHSGj92fRiWDKq1X4mQ9FZhqObtTcmVtNS2aD2IVavRXjbrYL7eJBuHl BqZ5M3a0lQYanhyf5CPRV1IswerS5wXmztwgO+5IyjRdBlcBZPYzJKspwQfooZYYGyGZCKzuPyKgi YziI59A6n4wnbCDcZilCKKW6v/7T2Gibc1XdRB6+XVMG7aoESx8xkO+tP8kCO1V/vjBQihgBtzo1x kCABVQg0sknxlgf1S+gF6k3ys+ExlvaQT5pEBKJaTddu/9sfrJvs8VNRNo7VulP9iDqL9K+7jdk+V EhMSarReV/ZDo38bb5t8U1gn7iKfMIQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dz0Mk-0006Rv-GG; Mon, 02 Oct 2017 13:02:34 +0000 Received: from mail-wr0-x244.google.com ([2a00:1450:400c:c0c::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dz0Md-0006Ci-93 for linux-arm-kernel@lists.infradead.org; Mon, 02 Oct 2017 13:02:32 +0000 Received: by mail-wr0-x244.google.com with SMTP id z1so3762829wre.1 for ; Mon, 02 Oct 2017 06:02:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id; bh=jJM1crKQAsigHgVnAMZ3veF29QkkTZZsfJmuSkHHHaw=; b=Z/pSbMGkUbUqFvWpLX04K8BsVmToV+25xRvS+2Qqx1+kkDUKP2DEqnMVrIijy7sY5e CezOwRuxzV0hGbjF0DxMcBWWrm2A9qk9OCMN23yfY5xwTlWyCx2HdxPwMDwbDPEhqeW8 yAdJ9OOJGTBn/H9iRcDZB6BVcsVjPzppnLNRj1hu6ZxkGJ+oW9P8lqu2Zbm1J28N+5Ga HTaVi4kmCF1gMXcyzfgeyRzon8Byxz3Yt7Hqyq4grPPEaZeBl39rp3HSZ0si5GnSgv8S P3/XqHrPbTpvEZ6j1F9IkSDtymmzXy3cgkvpLAr4+j2BVQL+KqBEGfwQl3hLOIgVJm5X 1OSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=jJM1crKQAsigHgVnAMZ3veF29QkkTZZsfJmuSkHHHaw=; b=ueXnuPhwvOdWobLgELSDC41iesmZg27laZSRmq9qRah7V1MNJeZVq+xt7qx1vrVnya t39OPsMySlVVMDYEAfv7J0OSu57czBtIx1Tog9soUwxyaBQp/ZJA/r3qbhxEwUugJzxX /1DqhghJW4iNgpRdPgfPobIo9U2sI/MQQiu0qAd3vTUC85S2YePBgtdCoqrP7zEMjqLB WAIW6kpQ/jaTByd+9NklOlMYDhYIDrFhY8i7ivOWybipnG3hNinYVE49EWfVvF7ShDIi s7MULabFmXco+q7sCcEwSUSn04jllIwgO8PomxAEFKGYlX01ElRWcQv+b7RnmB9a4Hyf qokQ== X-Gm-Message-State: AMCzsaXu7taaM6D1+U7s9fMJd1qPLGQusoPMk160QIWAK7Zm5WPCid3r FILKic3NkDDs+nD7H/l+Ow== X-Google-Smtp-Source: AOwi7QCYYdcAYrl3tdirPRlwai7CPAGN5GP6JPl/4bD9zg1JP8bmq33u+wQe3pf0L4VpazH4LO1PSA== X-Received: by 10.223.175.210 with SMTP id y18mr467497wrd.206.1506949324768; Mon, 02 Oct 2017 06:02:04 -0700 (PDT) Received: from perruche.Parrot.Biz ([46.218.109.88]) by smtp.gmail.com with ESMTPSA id z192sm11523523wmz.28.2017.10.02.06.02.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Oct 2017 06:02:02 -0700 (PDT) From: Matthieu CASTET To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] [DEV] dma mapping : export caller to vmallocinfo Date: Mon, 2 Oct 2017 15:01:55 +0200 Message-Id: <20171002130155.19325-1-matthieu.castet@parrot.com> X-Mailer: git-send-email 2.14.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171002_060227_473130_1316039F X-CRM114-Status: UNSURE ( 9.93 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Catalin Marinas , Matthieu CASTET 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 For example on arm64 board, this add info to "user" entries in vmallocinfo Before : [...] 0xffffff8008997000 0xffffff80089d8000 266240 user [...] Afer : [...] 0xffffff8008997000 0xffffff80089d8000 266240 atomic_pool_init+0x0/0x1d8 user [...] This help to debug mapping issues, and is consistent with others entries (ioremap, vmalloc, ...) that already provide caller. Signed-off-by: Matthieu CASTET Acked-by: Catalin Marinas --- arch/arm64/mm/dma-mapping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c index 614af886b7ef..115b32639a3c 100644 --- a/arch/arm64/mm/dma-mapping.c +++ b/arch/arm64/mm/dma-mapping.c @@ -166,7 +166,7 @@ static void *__dma_alloc(struct device *dev, size_t size, /* create a coherent mapping */ page = virt_to_page(ptr); coherent_ptr = dma_common_contiguous_remap(page, size, VM_USERMAP, - prot, NULL); + prot, __builtin_return_address(0)); if (!coherent_ptr) goto no_map;