nvme: split a new struct nvme_ctrl out of struct nvme_dev
authorChristoph Hellwig <hch@lst.de>
Thu, 26 Nov 2015 09:06:56 +0000 (10:06 +0100)
committerJens Axboe <axboe@fb.com>
Tue, 1 Dec 2015 17:59:38 +0000 (10:59 -0700)
commit1c63dc66580d4bbb6d2b75bf184b5aa105ba5bdb
tree84fac8a49904df3f5f4997fc80803bcd1d4bece5
parent01fec28a6f3ba96d4f46a538eae089dd92189fd1
nvme: split a new struct nvme_ctrl out of struct nvme_dev

The new struct nvme_ctrl will be used by the common NVMe code that sits
on top of struct request_queue and the new nvme_ctrl_ops abstraction.
It only contains the bare minimum required, which consists of values
sampled during controller probe, the admin queue pointer and a second
struct device pointer at the moment, but more will follow later.  Only
values that are not used in the I/O fast path should be moved to
struct nvme_ctrl so that drivers can optimize their cache line usage
easily.  That's also the reason why we have two device pointers as
the struct device is used for DMA mapping purposes.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
drivers/nvme/host/core.c
drivers/nvme/host/nvme.h
drivers/nvme/host/pci.c
drivers/nvme/host/scsi.c