check if memory is aligned to 4K

This commit is contained in:
none 2021-03-01 12:57:45 +01:00
parent de82a50b4e
commit 177e6b0fd6
1 changed files with 2 additions and 0 deletions

View File

@ -305,6 +305,8 @@ static int dma_alloc(struct pci_dev *pdev, struct ddb_dma *dma, int dir)
if (!dma->vbuf[i])
return -ENOMEM;
}
if (((u64)dma->vbuf[i] & 0xfff))
dev_err(&pdev->dev, "DMA memory at %px not aligned!\n", dma->vbuf[i]);
}
return 0;
}