All of lore.kernel.org
 help / color / mirror / Atom feed
* offest calculation from the dma_address
@ 2017-04-14 10:54 alexnln
  2017-04-14 14:00 ` Keith Busch
  0 siblings, 1 reply; 2+ messages in thread
From: alexnln @ 2017-04-14 10:54 UTC (permalink / raw)


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

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

end of thread, other threads:[~2017-04-14 14:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-14 10:54 offest calculation from the dma_address alexnln
2017-04-14 14:00 ` Keith Busch

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.