[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 63/64] block/nvme: Use generic NvmeBar structure
From: |
Kevin Wolf |
Subject: |
[PULL 63/64] block/nvme: Use generic NvmeBar structure |
Date: |
Mon, 7 Sep 2020 13:09:35 +0200 |
From: Philippe Mathieu-Daudé <philmd@redhat.com>
Commit f3c507adcd7 ("NVMe: Initial commit for new storage interface")
introduced the NvmeBar structure. Unfortunately in commit bdd6a90a9e5
("block: Add VFIO based NVMe driver") we duplicated it.
Apparently in commit a3d9a352d48 ("block: Move NVMe constants to
a separate header") we tried to unify headers but forgot to remove
the structure declared in the block/nvme.c source file.
Do it now, and remove the structure size check which is redundant
with the header check added in commit 74e18435c0e ("hw/block/nvme:
Align I/O BAR to 4 KiB").
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20200904124130.583838-3-philmd@redhat.com>
Reviewed-by: Klaus Jensen <k.jensen@samsung.com>
Reviewed-by: Fam Zheng <fam@euphon.net>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
block/nvme.c | 20 +-------------------
1 file changed, 1 insertion(+), 19 deletions(-)
diff --git a/block/nvme.c b/block/nvme.c
index c9c3fc02fe..a216cc407f 100644
--- a/block/nvme.c
+++ b/block/nvme.c
@@ -83,28 +83,10 @@ typedef struct {
/* Memory mapped registers */
typedef volatile struct {
- struct {
- uint64_t cap;
- uint32_t vs;
- uint32_t intms;
- uint32_t intmc;
- uint32_t cc;
- uint32_t reserved0;
- uint32_t csts;
- uint32_t nssr;
- uint32_t aqa;
- uint64_t asq;
- uint64_t acq;
- uint32_t cmbloc;
- uint32_t cmbsz;
- uint8_t reserved1[0xec0];
- uint8_t cmd_set_specfic[0x100];
- } ctrl;
+ NvmeBar ctrl;
uint32_t doorbells[];
} NVMeRegs;
-QEMU_BUILD_BUG_ON(offsetof(NVMeRegs, doorbells) != 0x1000);
-
#define INDEX_ADMIN 0
#define INDEX_IO(n) (1 + n)
--
2.25.4
- [PULL 42/64] block: Report data child for query-blockstats, (continued)
- [PULL 42/64] block: Report data child for query-blockstats, Kevin Wolf, 2020/09/07
- [PULL 53/64] block: Leave BDS.backing_{file,format} constant, Kevin Wolf, 2020/09/07
- [PULL 54/64] iotests: Test that qcow2's data-file is flushed, Kevin Wolf, 2020/09/07
- [PULL 55/64] iotests: Let complete_and_wait() work with commit, Kevin Wolf, 2020/09/07
- [PULL 56/64] iotests: Add filter commit test cases, Kevin Wolf, 2020/09/07
- [PULL 52/64] block: Inline bdrv_co_block_status_from_*(), Kevin Wolf, 2020/09/07
- [PULL 58/64] iotests: Add test for commit in sub directory, Kevin Wolf, 2020/09/07
- [PULL 59/64] iotests: Test committing to overridden backing, Kevin Wolf, 2020/09/07
- [PULL 60/64] iotests: Allow running from different directory, Kevin Wolf, 2020/09/07
- [PULL 61/64] file-win32: Fix "locking" option, Kevin Wolf, 2020/09/07
- [PULL 63/64] block/nvme: Use generic NvmeBar structure,
Kevin Wolf <=
- [PULL 57/64] iotests: Add filter mirror test cases, Kevin Wolf, 2020/09/07
- [PULL 62/64] block/nvme: Group controller registers in NVMeRegs structure, Kevin Wolf, 2020/09/07
- [PULL 64/64] block/nvme: Pair doorbell registers, Kevin Wolf, 2020/09/07
- [PULL 37/64] block/snapshot: Fix fallback, Kevin Wolf, 2020/09/07
- [PULL 44/64] block-copy: Use CAF to find sync=top base, Kevin Wolf, 2020/09/07
- Re: [PULL 00/64] Block layer patches, Peter Maydell, 2020/09/07