The patch titled Subject: dma-debug-fix-incorrect-pfn-calculation-v4 has been removed from the -mm tree. Its filename was dma-debug-fix-incorrect-pfn-calculation-v4.patch This patch was dropped because it was folded into dma-debug-fix-incorrect-pfn-calculation.patch ------------------------------------------------------ From: Miles Chen <miles.chen@xxxxxxxxxxxx> Subject: dma-debug-fix-incorrect-pfn-calculation-v4 Link: http://lkml.kernel.org/r/1510872972-23919-1-git-send-email-miles.chen@xxxxxxxxxxxx Signed-off-by: Miles Chen <miles.chen@xxxxxxxxxxxx> Cc: Robin Murphy <robin.murphy@xxxxxxx> Cc: Christoph Hellwig <hch@xxxxxx> Cc: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- lib/dma-debug.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff -puN lib/dma-debug.c~dma-debug-fix-incorrect-pfn-calculation-v4 lib/dma-debug.c --- a/lib/dma-debug.c~dma-debug-fix-incorrect-pfn-calculation-v4 +++ a/lib/dma-debug.c @@ -1495,15 +1495,22 @@ void debug_dma_alloc_coherent(struct dev if (!entry) return; + /* handle vmalloc and linear addresses */ + if (!is_vmalloc_addr(virt) && !virt_to_page(virt)) + return; + entry->type = dma_debug_coherent; entry->dev = dev; - entry->pfn = is_vmalloc_addr(virt) ? vmalloc_to_pfn(virt) : - page_to_pfn(virt_to_page(virt)); entry->offset = offset_in_page(virt); entry->size = size; entry->dev_addr = dma_addr; entry->direction = DMA_BIDIRECTIONAL; + if (is_vmalloc_addr(virt)) + entry->pfn = vmalloc_to_pfn(virt); + else + entry->pfn = page_to_pfn(virt_to_page(virt)); + add_dma_entry(entry); } EXPORT_SYMBOL(debug_dma_alloc_coherent); @@ -1514,14 +1521,21 @@ void debug_dma_free_coherent(struct devi struct dma_debug_entry ref = { .type = dma_debug_coherent, .dev = dev, - .pfn = is_vmalloc_addr(virt) ? vmalloc_to_pfn(virt) : - page_to_pfn(virt_to_page(virt)), .offset = offset_in_page(virt), .dev_addr = addr, .size = size, .direction = DMA_BIDIRECTIONAL, }; + /* handle vmalloc and linear addresses */ + if (!is_vmalloc_addr(virt) && !virt_to_page(virt)) + return; + + if (is_vmalloc_addr(virt)) + ref.pfn = vmalloc_to_pfn(virt); + else + ref.pfn = page_to_pfn(virt_to_page(virt)); + if (unlikely(dma_debug_disabled())) return; _ Patches currently in -mm which might be from miles.chen@xxxxxxxxxxxx are dma-debug-fix-incorrect-pfn-calculation.patch checkpatch-support-function-pointers-for-unnamed-function-definition-arguments.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html