From: keith.busch@intel.com (Keith Busch)
Subject: [PATCH 6/8] nvme/pci: Remove q_dmadev from nvme_queue
Date: Fri, 8 Mar 2019 10:43:11 -0700 [thread overview]
Message-ID: <20190308174313.5134-6-keith.busch@intel.com> (raw)
In-Reply-To: <20190308174313.5134-1-keith.busch@intel.com>
We don't need to save the dma device as it's not used in the hot path
and hasn't in a long time. Shrink the struct nvme_queue removing this
unnecessary member.
Signed-off-by: Keith Busch <keith.busch at intel.com>
---
drivers/nvme/host/pci.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 06db19b45d2b..3481f3e3d6a1 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -177,7 +177,6 @@ static inline struct nvme_dev *to_nvme_dev(struct nvme_ctrl *ctrl)
* commands and one for I/O commands).
*/
struct nvme_queue {
- struct device *q_dmadev;
struct nvme_dev *dev;
spinlock_t sq_lock;
struct nvme_command *sq_cmds;
@@ -1336,16 +1335,16 @@ static enum blk_eh_timer_return nvme_timeout(struct request *req, bool reserved)
static void nvme_free_queue(struct nvme_queue *nvmeq)
{
- dma_free_coherent(nvmeq->q_dmadev, CQ_SIZE(nvmeq->q_depth),
+ dma_free_coherent(nvmeq->dev->dev, CQ_SIZE(nvmeq->q_depth),
(void *)nvmeq->cqes, nvmeq->cq_dma_addr);
if (!nvmeq->sq_cmds)
return;
if (test_and_clear_bit(NVMEQ_SQ_CMB, &nvmeq->flags)) {
- pci_free_p2pmem(to_pci_dev(nvmeq->q_dmadev),
+ pci_free_p2pmem(to_pci_dev(nvmeq->dev->dev),
nvmeq->sq_cmds, SQ_SIZE(nvmeq->q_depth));
} else {
- dma_free_coherent(nvmeq->q_dmadev, SQ_SIZE(nvmeq->q_depth),
+ dma_free_coherent(nvmeq->dev->dev, SQ_SIZE(nvmeq->q_depth),
nvmeq->sq_cmds, nvmeq->sq_dma_addr);
}
}
@@ -1457,7 +1456,6 @@ static int nvme_alloc_queue(struct nvme_dev *dev, int qid, int depth)
if (nvme_alloc_sq_cmds(dev, nvmeq, qid, depth))
goto free_cqdma;
- nvmeq->q_dmadev = dev->dev;
nvmeq->dev = dev;
spin_lock_init(&nvmeq->sq_lock);
spin_lock_init(&nvmeq->cq_poll_lock);
--
2.14.4
next prev parent reply other threads:[~2019-03-08 17:43 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-08 17:43 [PATCH 1/8] nvme/pci: Use a flag for polled queues Keith Busch
2019-03-08 17:43 ` [PATCH 2/8] nvme/pci: Don't poll polled queues in timeout Keith Busch
2019-03-11 18:25 ` Christoph Hellwig
2019-03-11 23:33 ` Sagi Grimberg
2019-03-08 17:43 ` [PATCH 3/8] nvme/pci: Remove tag check in nvme_process_cq Keith Busch
2019-03-11 18:26 ` Christoph Hellwig
2019-03-11 23:35 ` Sagi Grimberg
2019-03-08 17:43 ` [PATCH 4/8] nvme/pci: Remove last_cq_seen Keith Busch
2019-03-11 18:28 ` Christoph Hellwig
2019-03-11 23:40 ` Sagi Grimberg
2019-03-27 13:55 ` Christoph Hellwig
2019-03-08 17:43 ` [PATCH 5/8] nvme/pci: Remove last_sq_tail Keith Busch
2019-03-11 18:31 ` Christoph Hellwig
2019-03-11 19:21 ` Keith Busch
2019-03-11 23:53 ` Sagi Grimberg
2019-03-08 17:43 ` Keith Busch [this message]
2019-03-11 18:31 ` [PATCH 6/8] nvme/pci: Remove q_dmadev from nvme_queue Christoph Hellwig
2019-03-11 23:54 ` Sagi Grimberg
2019-03-27 13:53 ` Christoph Hellwig
2019-03-08 17:43 ` [PATCH 7/8] nvme/pci: Remove volatile from cqe Keith Busch
2019-03-11 18:33 ` Christoph Hellwig
2019-03-11 23:56 ` Sagi Grimberg
2019-03-27 13:55 ` Christoph Hellwig
2019-03-08 17:43 ` [PATCH 8/8] nvme/pci: Remove unused nvme_iod member Keith Busch
2019-03-11 18:33 ` Christoph Hellwig
2019-03-11 23:56 ` Sagi Grimberg
2019-03-27 13:53 ` Christoph Hellwig
2019-03-11 18:25 ` [PATCH 1/8] nvme/pci: Use a flag for polled queues Christoph Hellwig
2019-03-11 23:31 ` Sagi Grimberg
2019-03-27 13:53 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190308174313.5134-6-keith.busch@intel.com \
--to=keith.busch@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.