From: Jim C. <jim...@gm...> - 2012-05-20 18:40:39
|
In kernel built with CONFIG_DMA_API_DEBUG=y, Ive seen warnings on cleanup, start tracking them down. Signed-off-by: Jim Cromie <jim...@gm...> --- merge.c | 6 +++++- pci.c | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/merge.c b/merge.c index e4808de..2e19c44 100644 --- a/merge.c +++ b/merge.c @@ -209,9 +209,13 @@ static int acx_allocate(acx_device_t *adev, struct desc_info *di, { void *ptr; - if (IS_PCI(adev)) + if (IS_PCI(adev)) { ptr = dma_alloc_coherent(adev->bus_dev, di->size, &di->phy, GFP_KERNEL); + + pr_info("bdev:%p size:%d phy:%p ptr:%p\n", + adev->bus_dev, di->size, (void*) di->phy, ptr); + } else { ptr = kmalloc(di->size, GFP_KERNEL); /* diff --git a/pci.c b/pci.c index 43fab72..c766665 100644 --- a/pci.c +++ b/pci.c @@ -136,6 +136,9 @@ static void vlynq_remove(struct vlynq_device *vdev); void acxpci_free_coherent(struct pci_dev *hwdev, size_t size, void *vaddr, dma_addr_t dma_handle) { + pr_info("hwdev:%p size:%d, vaddr:%p, dma_handle:%p\n", + hwdev, size, vaddr, (void*) dma_handle); + dma_free_coherent(hwdev == NULL ? NULL : &hwdev->dev, size, vaddr, dma_handle); } -- 1.7.10.1.487.ga3935e6 |