All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvme: use __iowrite64_copy for SQs in the CMB
@ 2016-10-23 19:30 Saar Gross
  2016-11-21  8:54 ` Saar Gross
  0 siblings, 1 reply; 9+ messages in thread
From: Saar Gross @ 2016-10-23 19:30 UTC (permalink / raw)


Use __iowrite64_copy() instead of memcpy_toio() when copying SQ entries
to a SQ that's contained in the CMB.
__iowrite64_copy() writes to the MMIO in 64-bit units, whenever
possible.

Signed-off-by: Saar Gross <saar at annapurnalabs.com>
---
 drivers/nvme/host/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 0248d0e..0e603f0 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -289,7 +289,7 @@ static void __nvme_submit_cmd(struct nvme_queue *nvmeq,
        u16 tail = nvmeq->sq_tail;

        if (nvmeq->sq_cmds_io)
-               memcpy_toio(&nvmeq->sq_cmds_io[tail], cmd, sizeof(*cmd));
+               __iowrite64_copy(&nvmeq->sq_cmds_io[tail], cmd,
sizeof(*cmd) / 8);
        else
                memcpy(&nvmeq->sq_cmds[tail], cmd, sizeof(*cmd));

-- 
2.7.4

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

end of thread, other threads:[~2017-01-08 10:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-23 19:30 [PATCH] nvme: use __iowrite64_copy for SQs in the CMB Saar Gross
2016-11-21  8:54 ` Saar Gross
2016-11-21  9:14   ` Christoph Hellwig
2016-11-22  2:43     ` Stephen Bates
2016-11-30  8:31       ` Saar Gross
2016-12-19 12:18         ` Saar Gross
2016-12-21 10:22           ` Christoph Hellwig
2017-01-04  7:22             ` Saar Gross
2017-01-08 10:13               ` Christoph Hellwig

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.