From: Akinobu Mita <akinobu.mita@gmail.com>
To: linux-nvme@lists.infradead.org, linux-pm@vger.kernel.org
Cc: Akinobu Mita <akinobu.mita@gmail.com>,
Zhang Rui <rui.zhang@intel.com>,
Eduardo Valentin <edubezval@gmail.com>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Keith Busch <keith.busch@intel.com>, Jens Axboe <axboe@fb.com>,
Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>
Subject: [PATCH 2/2] nvme-pci: support thermal zone
Date: Thu, 16 May 2019 00:17:17 +0900 [thread overview]
Message-ID: <1557933437-4693-3-git-send-email-akinobu.mita@gmail.com> (raw)
In-Reply-To: <1557933437-4693-1-git-send-email-akinobu.mita@gmail.com>
This enables to use thermal zone interfaces for NVMe
temperature sensors.
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Eduardo Valentin <edubezval@gmail.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Keith Busch <keith.busch@intel.com>
Cc: Jens Axboe <axboe@fb.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
---
drivers/nvme/host/pci.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index fad5395..88a25dc 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -2470,6 +2470,7 @@ static void nvme_pci_free_ctrl(struct nvme_ctrl *ctrl)
if (dev->ctrl.admin_q)
blk_put_queue(dev->ctrl.admin_q);
kfree(dev->queues);
+ nvme_thermal_zones_unregister(&dev->ctrl);
free_opal_dev(dev->ctrl.opal_dev);
mempool_destroy(dev->iod_mempool);
kfree(dev);
@@ -2553,6 +2554,10 @@ static void nvme_reset_work(struct work_struct *work)
dev->ctrl.opal_dev = NULL;
}
+ result = nvme_thermal_zones_register(&dev->ctrl);
+ if (result < 0)
+ goto out;
+
if (dev->ctrl.oacs & NVME_CTRL_OACS_DBBUF_SUPP) {
result = nvme_dbbuf_dma_alloc(dev);
if (result)
--
2.7.4
next prev parent reply other threads:[~2019-05-15 15:17 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-15 15:17 [PATCH 0/2] nvme: add thermal zone devices Akinobu Mita
2019-05-15 15:17 ` [PATCH 1/2] nvme: add thermal zone infrastructure Akinobu Mita
2019-05-15 19:15 ` Keith Busch
2019-05-16 15:22 ` Akinobu Mita
2019-05-16 15:26 ` Keith Busch
2019-05-16 14:23 ` Minwoo Im
2019-05-16 14:32 ` Minwoo Im
2019-05-16 16:17 ` Akinobu Mita
2019-05-16 16:48 ` Minwoo Im
2019-05-16 14:35 ` Akinobu Mita
2019-05-16 21:22 ` Heitke, Kenneth
2019-05-17 15:01 ` Akinobu Mita
2019-05-17 15:09 ` Keith Busch
2019-05-17 15:36 ` Akinobu Mita
2019-05-16 21:25 ` Heitke, Kenneth
2019-05-17 15:03 ` Akinobu Mita
2019-05-16 23:44 ` Chaitanya Kulkarni
2019-05-17 15:35 ` Akinobu Mita
2019-05-15 15:17 ` Akinobu Mita [this message]
2019-05-15 17:03 ` [PATCH 2/2] nvme-pci: support thermal zone Keith Busch
2019-05-16 14:30 ` Akinobu Mita
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=1557933437-4693-3-git-send-email-akinobu.mita@gmail.com \
--to=akinobu.mita@gmail.com \
--cc=axboe@fb.com \
--cc=daniel.lezcano@linaro.org \
--cc=edubezval@gmail.com \
--cc=hch@lst.de \
--cc=keith.busch@intel.com \
--cc=linux-nvme@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=rui.zhang@intel.com \
--cc=sagi@grimberg.me \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox