mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
block/nvme: Move definitions before structure declarations
To be able to use some definitions in structure declarations, move them earlier. No logical change. Reviewed-by: Eric Auger <eric.auger@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Tested-by: Eric Auger <eric.auger@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-id: 20201029093306.1063879-9-philmd@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Tested-by: Eric Auger <eric.auger@redhat.com>
This commit is contained in:
parent
6e1e9ff2d3
commit
3214b0f094
1 changed files with 10 additions and 9 deletions
19
block/nvme.c
19
block/nvme.c
|
@ -41,6 +41,16 @@
|
||||||
|
|
||||||
typedef struct BDRVNVMeState BDRVNVMeState;
|
typedef struct BDRVNVMeState BDRVNVMeState;
|
||||||
|
|
||||||
|
/* Same index is used for queues and IRQs */
|
||||||
|
#define INDEX_ADMIN 0
|
||||||
|
#define INDEX_IO(n) (1 + n)
|
||||||
|
|
||||||
|
/* This driver shares a single MSIX IRQ for the admin and I/O queues */
|
||||||
|
enum {
|
||||||
|
MSIX_SHARED_IRQ_IDX = 0,
|
||||||
|
MSIX_IRQ_COUNT = 1
|
||||||
|
};
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int32_t head, tail;
|
int32_t head, tail;
|
||||||
uint8_t *queue;
|
uint8_t *queue;
|
||||||
|
@ -81,15 +91,6 @@ typedef struct {
|
||||||
QEMUBH *completion_bh;
|
QEMUBH *completion_bh;
|
||||||
} NVMeQueuePair;
|
} NVMeQueuePair;
|
||||||
|
|
||||||
#define INDEX_ADMIN 0
|
|
||||||
#define INDEX_IO(n) (1 + n)
|
|
||||||
|
|
||||||
/* This driver shares a single MSIX IRQ for the admin and I/O queues */
|
|
||||||
enum {
|
|
||||||
MSIX_SHARED_IRQ_IDX = 0,
|
|
||||||
MSIX_IRQ_COUNT = 1
|
|
||||||
};
|
|
||||||
|
|
||||||
struct BDRVNVMeState {
|
struct BDRVNVMeState {
|
||||||
AioContext *aio_context;
|
AioContext *aio_context;
|
||||||
QEMUVFIOState *vfio;
|
QEMUVFIOState *vfio;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue