offest calculation from the dma_address

alexnln alex.nlnnfn at gmail.com
Fri Apr 14 03:54:51 PDT 2017


Hello,

In pci.c, in nvme_setup_prps() offset is calculated from the dma address:
int offset = dma_addr & (page_size - 1);

Why not to use sg->offset?

I mean, what if hypothetical dma allocator returns non-page aligned addresses?
In such case offset would be wrong.

Thanks,
Alex





More information about the Linux-nvme mailing list