nvme header reshuffle
Subsystems (2)
Christoph Hellwig
maintainerThis series reworks the header organisation in the nvme driver. Currently there are two headers: include/uapi/linux/nvme.h, which contains the ioctl ABI and a lot of hardware description constants and include/linux/nvme.h which contains more hardware descriptions constants as well as driver internals.
This series splits them into one header each for the ioctl ABI, hardware descr?ption and driver internals.
Christoph Hellwig
maintainerPATCH 1/3 nvme: add a local nvme.h header
Add a new drivers/block/nvme.h which contains all the driver internal interface.
--- drivers/block/nvme-core.c | 3 +- drivers/block/nvme-scsi.c | 2 +- drivers/block/nvme.h | 133 ++++++++++++++++++++++++++++++++++++++++++++++ include/linux/nvme.h | 114 --------------------------------------- 4 files changed, 136 insertions(+), 116 deletions(-) create mode 100644 drivers/block/nvme.h
drivers/block/nvme-core.c +2 -1
@@ -12,7 +12,6 @@* more details. */ -#include <linux/nvme.h> #include <linux/bitops.h> #include <linux/blkdev.h> #include <linux/blk-mq.h>
@@ -43,6 +42,8 @@#include <scsi/sg.h> #include <asm-generic/io-64-nonatomic-lo-hi.h> +#include "nvme.h" +#define NVME_MINORS (1U << MINORBITS)#define NVME_Q_DEPTH 1024#define NVME_AQ_DEPTH 256
drivers/block/nvme-scsi.c +1 -1
@@ -17,7 +17,6 @@* each command is translated. */ -#include <linux/nvme.h> #include <linux/bio.h> #include <linux/bitops.h> #include <linux/blkdev.h>
@@ -45,6 +44,7 @@#include <scsi/sg.h> #include <scsi/scsi.h> +#include "nvme.h" static int sg_version_num =30534 ;/* 2 digits for each component */
drivers/block/nvme.h new file +133 -0
133 lines not on this page · raw message
include/linux/nvme.h +0 -114
124 lines not on this page · raw message
Signature · 1 line
1.9.1
Christoph Hellwig
maintainerPATCH 2/3 nvme: move hardware structures out of the uapi version of nvme.h
In reply to Christoph HellwigCurrently all NVMe command and completion structures are exposed to userspace through the uapi version of nvme.h. They are not an ABI between the kernel and userspace, and will change in C-incompatible way for future versions of the spec. Move them to the kernel version of the file and rename the uapi header to nvme_ioctl.h so that userspace can easily detect the presence of the new clean header. Nvme-cli already carries a local copy of the header, so it won't be affected by this move.
--- drivers/block/nvme-core.c | 1 + include/linux/nvme.h | 526 ++++++++++++++++++++++++++++++++++- include/uapi/linux/nvme.h | 589 ---------------------------------------- include/uapi/linux/nvme_ioctl.h | 65 +++++ 4 files changed, 590 insertions(+), 591 deletions(-) delete mode 100644 include/uapi/linux/nvme.h create mode 100644 include/uapi/linux/nvme_ioctl.h
drivers/block/nvme-core.c +1 -0
@@ -42,6 +42,7 @@#include <scsi/sg.h> #include <asm-generic/io-64-nonatomic-lo-hi.h> +#include <uapi/linux/nvme_ioctl.h> #include "nvme.h" #define NVME_MINORS (1U << MINORBITS)
include/linux/nvme.h +524 -2
536 lines not on this page · raw message
include/uapi/linux/nvme.h deleted +0 -589
589 lines not on this page · raw message
include/uapi/linux/nvme_ioctl.h new file +65 -0
65 lines not on this page · raw message
Signature · 1 line
1.9.1
Christoph Hellwig
maintainerPATCH 3/3 nvme.h: add missing nvme_id_ctrl endianess annotations
In reply to Christoph Hellwig--- include/linux/nvme.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/nvme.h +2 -2
@@ -104,8 +104,8 @@ struct nvme_id_ctrl {__u8 ieee[3 ];__u8 mic;__u8 mdts; -__u16 cntlid; -__u32 ver; +__le16 cntlid; +__le32 ver;__u8 rsvd84[172 ];__le16 oacs;__u8 acl;
Signature · 1 line
1.9.1
Keith Busch
Acked-byQuoted 8 lines · Christoph Hellwig
This series reworks the header organisation in the nvme driver. Currently there are two headers:
include/uapi/linux/nvme.h, which contains the ioctl ABI and a lot of hardware description constants andinclude/linux/nvme.hwhich contains more hardware descriptions constants as well as driver internals.This series splits them into one header each for the ioctl ABI, hardware descr?ption and driver internals.
Thanks, looks good. There are some clashes with my most recent series, but happy to sort it out as things merge.
For the series,
Christoph Hellwig
maintainerQuoted 2 lines · Keith Busch
Thanks, looks good. There are some clashes with my most recent series, but happy to sort it out as things merge.
I'll resend once the resume fixes are in, that's more important work and I'll send another series on top of it ASAP as well.