@@ -62,9 +62,7 @@ EXPORT_SYMBOL_GPL(vfio_pci_core_iowrite##size);
62
62
VFIO_IOWRITE (8 )
63
63
VFIO_IOWRITE (16 )
64
64
VFIO_IOWRITE (32 )
65
- #ifdef iowrite64
66
65
VFIO_IOWRITE (64 )
67
- #endif
68
66
69
67
#define VFIO_IOREAD (size ) \
70
68
int vfio_pci_core_ioread##size(struct vfio_pci_core_device *vdev, \
@@ -90,9 +88,7 @@ EXPORT_SYMBOL_GPL(vfio_pci_core_ioread##size);
90
88
VFIO_IOREAD (8 )
91
89
VFIO_IOREAD (16 )
92
90
VFIO_IOREAD (32 )
93
- #ifdef ioread64
94
91
VFIO_IOREAD (64 )
95
- #endif
96
92
97
93
#define VFIO_IORDWR (size ) \
98
94
static int vfio_pci_iordwr##size(struct vfio_pci_core_device *vdev,\
@@ -128,9 +124,7 @@ static int vfio_pci_iordwr##size(struct vfio_pci_core_device *vdev,\
128
124
VFIO_IORDWR (8 )
129
125
VFIO_IORDWR (16 )
130
126
VFIO_IORDWR (32 )
131
- #if defined(ioread64 ) && defined(iowrite64 )
132
127
VFIO_IORDWR (64 )
133
- #endif
134
128
135
129
/*
136
130
* Read or write from an __iomem region (MMIO or I/O port) with an excluded
@@ -156,15 +150,13 @@ ssize_t vfio_pci_core_do_io_rw(struct vfio_pci_core_device *vdev, bool test_mem,
156
150
else
157
151
fillable = 0 ;
158
152
159
- #if defined(ioread64 ) && defined(iowrite64 )
160
153
if (fillable >= 8 && !(off % 8 )) {
161
154
ret = vfio_pci_iordwr64 (vdev , iswrite , test_mem ,
162
155
io , buf , off , & filled );
163
156
if (ret )
164
157
return ret ;
165
158
166
159
} else
167
- #endif
168
160
if (fillable >= 4 && !(off % 4 )) {
169
161
ret = vfio_pci_iordwr32 (vdev , iswrite , test_mem ,
170
162
io , buf , off , & filled );
@@ -382,12 +374,10 @@ static void vfio_pci_ioeventfd_do_write(struct vfio_pci_ioeventfd *ioeventfd,
382
374
vfio_pci_core_iowrite32 (ioeventfd -> vdev , test_mem ,
383
375
ioeventfd -> data , ioeventfd -> addr );
384
376
break ;
385
- #ifdef iowrite64
386
377
case 8 :
387
378
vfio_pci_core_iowrite64 (ioeventfd -> vdev , test_mem ,
388
379
ioeventfd -> data , ioeventfd -> addr );
389
380
break ;
390
- #endif
391
381
}
392
382
}
393
383
@@ -441,10 +431,8 @@ int vfio_pci_ioeventfd(struct vfio_pci_core_device *vdev, loff_t offset,
441
431
pos >= vdev -> msix_offset + vdev -> msix_size ))
442
432
return - EINVAL ;
443
433
444
- #ifndef iowrite64
445
434
if (count == 8 )
446
435
return - EINVAL ;
447
- #endif
448
436
449
437
ret = vfio_pci_core_setup_barmap (vdev , bar );
450
438
if (ret )
0 commit comments