mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] [DEV] dma mapping : export caller to vmallocinfo
@ 2017-10-02 13:01 Matthieu CASTET
  2017-10-02 14:03 ` Catalin Marinas
  0 siblings, 1 reply; 2+ messages in thread
From: Matthieu CASTET @ 2017-10-02 13:01 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel; +Cc: Catalin Marinas, Matthieu CASTET

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 <matthieu.castet@parrot.com>
---
 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;
 
-- 
2.14.2

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] [DEV] dma mapping : export caller to vmallocinfo
  2017-10-02 13:01 [PATCH] [DEV] dma mapping : export caller to vmallocinfo Matthieu CASTET
@ 2017-10-02 14:03 ` Catalin Marinas
  0 siblings, 0 replies; 2+ messages in thread
From: Catalin Marinas @ 2017-10-02 14:03 UTC (permalink / raw)
  To: Matthieu CASTET; +Cc: linux-kernel, linux-arm-kernel, Will Deacon

On Mon, Oct 02, 2017 at 03:01:55PM +0200, Matthieu CASTET wrote:
> 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 <matthieu.castet@parrot.com>
> ---
>  arch/arm64/mm/dma-mapping.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

It looks fine to me. Will (cc'ed) should pick it up for 4.15.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-10-02 14:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-02 13:01 [PATCH] [DEV] dma mapping : export caller to vmallocinfo Matthieu CASTET
2017-10-02 14:03 ` Catalin Marinas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®