search for: vc_dma_alloc_struct

Displaying 15 results from an estimated 15 matches for "vc_dma_alloc_struct".

2019 Apr 26
0
[PATCH 09/10] virtio/s390: use DMA memory for ccw I/O and classic notifiers
...t virtio_device *vdev, size_t size) +{ + return ccw_device_dma_zalloc(to_vc_device(vdev)->cdev, size); +} + +static inline void __vc_dma_free(struct virtio_device *vdev, size_t size, + void *cpu_addr) +{ + return ccw_device_dma_free(to_vc_device(vdev)->cdev, cpu_addr, size); +} + +#define vc_dma_alloc_struct(vdev, ptr) \ + ({ptr = __vc_dma_alloc(vdev, sizeof(*(ptr))); }) +#define vc_dma_free_struct(vdev, ptr) \ + __vc_dma_free(vdev, sizeof(*(ptr)), (ptr)) + static void drop_airq_indicator(struct virtqueue *vq, struct airq_info *info) { unsigned long i, flags; @@ -335,8 +355,7 @@ static void virtio_...
2019 May 23
0
[PATCH v2 7/8] virtio/s390: use DMA memory for ccw I/O and classic notifiers
...t virtio_device *vdev, size_t size) +{ + return ccw_device_dma_zalloc(to_vc_device(vdev)->cdev, size); +} + +static inline void __vc_dma_free(struct virtio_device *vdev, size_t size, + void *cpu_addr) +{ + return ccw_device_dma_free(to_vc_device(vdev)->cdev, cpu_addr, size); +} + +#define vc_dma_alloc_struct(vdev, ptr) \ + ({ptr = __vc_dma_alloc(vdev, sizeof(*(ptr))); }) +#define vc_dma_free_struct(vdev, ptr) \ + __vc_dma_free(vdev, sizeof(*(ptr)), (ptr)) + static void drop_airq_indicator(struct virtqueue *vq, struct airq_info *info) { unsigned long i, flags; @@ -336,8 +356,7 @@ static void virtio_...
2019 May 29
0
[PATCH v3 7/8] virtio/s390: use DMA memory for ccw I/O and classic notifiers
...t virtio_device *vdev, size_t size) +{ + return ccw_device_dma_zalloc(to_vc_device(vdev)->cdev, size); +} + +static inline void __vc_dma_free(struct virtio_device *vdev, size_t size, + void *cpu_addr) +{ + return ccw_device_dma_free(to_vc_device(vdev)->cdev, cpu_addr, size); +} + +#define vc_dma_alloc_struct(vdev, ptr) \ + ({ptr = __vc_dma_alloc(vdev, sizeof(*(ptr))); }) +#define vc_dma_free_struct(vdev, ptr) \ + __vc_dma_free(vdev, sizeof(*(ptr)), (ptr)) + static void drop_airq_indicator(struct virtqueue *vq, struct airq_info *info) { unsigned long i, flags; @@ -336,8 +356,7 @@ static void virtio_...
2019 Jun 03
2
[PATCH v3 7/8] virtio/s390: use DMA memory for ccw I/O and classic notifiers
...rn ccw_device_dma_zalloc(to_vc_device(vdev)->cdev, size); > +} > + > +static inline void __vc_dma_free(struct virtio_device *vdev, size_t size, > + void *cpu_addr) > +{ > + return ccw_device_dma_free(to_vc_device(vdev)->cdev, cpu_addr, size); > +} > + > +#define vc_dma_alloc_struct(vdev, ptr) \ > + ({ptr = __vc_dma_alloc(vdev, sizeof(*(ptr))); }) > +#define vc_dma_free_struct(vdev, ptr) \ > + __vc_dma_free(vdev, sizeof(*(ptr)), (ptr)) > + I *still* don't like these #defines (and the __vc_dma_* functions), as I already commented last time. I think they make it...
2019 Jun 03
2
[PATCH v3 7/8] virtio/s390: use DMA memory for ccw I/O and classic notifiers
...rn ccw_device_dma_zalloc(to_vc_device(vdev)->cdev, size); > +} > + > +static inline void __vc_dma_free(struct virtio_device *vdev, size_t size, > + void *cpu_addr) > +{ > + return ccw_device_dma_free(to_vc_device(vdev)->cdev, cpu_addr, size); > +} > + > +#define vc_dma_alloc_struct(vdev, ptr) \ > + ({ptr = __vc_dma_alloc(vdev, sizeof(*(ptr))); }) > +#define vc_dma_free_struct(vdev, ptr) \ > + __vc_dma_free(vdev, sizeof(*(ptr)), (ptr)) > + I *still* don't like these #defines (and the __vc_dma_* functions), as I already commented last time. I think they make it...
2019 Jun 04
0
[PATCH v3 7/8] virtio/s390: use DMA memory for ccw I/O and classic notifiers
...gt;cdev, size); > > +} > > + > > +static inline void __vc_dma_free(struct virtio_device *vdev, size_t size, > > + void *cpu_addr) > > +{ > > + return ccw_device_dma_free(to_vc_device(vdev)->cdev, cpu_addr, size); > > +} > > + > > +#define vc_dma_alloc_struct(vdev, ptr) \ > > + ({ptr = __vc_dma_alloc(vdev, sizeof(*(ptr))); }) > > +#define vc_dma_free_struct(vdev, ptr) \ > > + __vc_dma_free(vdev, sizeof(*(ptr)), (ptr)) > > + > > I *still* don't like these #defines (and the __vc_dma_* functions), as I > already commen...
2019 Jun 04
1
[PATCH v3 7/8] virtio/s390: use DMA memory for ccw I/O and classic notifiers
...gt; + > > > +static inline void __vc_dma_free(struct virtio_device *vdev, size_t size, > > > + void *cpu_addr) > > > +{ > > > + return ccw_device_dma_free(to_vc_device(vdev)->cdev, cpu_addr, size); > > > +} > > > + > > > +#define vc_dma_alloc_struct(vdev, ptr) \ > > > + ({ptr = __vc_dma_alloc(vdev, sizeof(*(ptr))); }) > > > +#define vc_dma_free_struct(vdev, ptr) \ > > > + __vc_dma_free(vdev, sizeof(*(ptr)), (ptr)) > > > + > > > > I *still* don't like these #defines (and the __vc_dma_* func...
2019 May 29
16
[PATCH v3 0/8] s390: virtio: support protected virtualization
Enhanced virtualization protection technology may require the use of bounce buffers for I/O. While support for this was built into the virtio core, virtio-ccw wasn't changed accordingly. Some background on technology (not part of this series) and the terminology used. * Protected Virtualization (PV): Protected Virtualization guarantees, that non-shared memory of a guest that operates in PV
2019 May 23
18
[PATCH v2 0/8] s390: virtio: support protected virtualization
Enhanced virtualization protection technology may require the use of bounce buffers for I/O. While support for this was built into the virtio core, virtio-ccw wasn't changed accordingly. Some background on technology (not part of this series) and the terminology used. * Protected Virtualization (PV): Protected Virtualization guarantees, that non-shared memory of a guest that operates in PV
2019 Apr 10
0
[RFC PATCH 07/12] virtio/s390: use DMA memory for ccw I/O
...+ GFP_DMA | GFP_KERNEL | __GFP_ZERO); > +} > + > +static inline void __vc_dma_free(struct virtio_device *vdev, size_t size, > + void *cpu_addr, dma_addr_t dma_handle) > +{ > + dma_free_coherent(vdev->dev.parent, size, cpu_addr, dma_handle); > +} > + > +#define vc_dma_alloc_struct(vdev, ptr) \ > + ({ ptr = __vc_dma_alloc(vdev, (sizeof(*(ptr))), &(ptr ## _dma_addr)); }) > +#define vc_dma_free_struct(vdev, ptr) \ > + __vc_dma_free(vdev, sizeof(*(ptr)), (ptr), (ptr ## _dma_addr)) Not sure I'm a fan of those wrappers... I think they actually hurt readability of...
2019 May 08
2
[PATCH 09/10] virtio/s390: use DMA memory for ccw I/O and classic notifiers
...rn ccw_device_dma_zalloc(to_vc_device(vdev)->cdev, size); > +} > + > +static inline void __vc_dma_free(struct virtio_device *vdev, size_t size, > + void *cpu_addr) > +{ > + return ccw_device_dma_free(to_vc_device(vdev)->cdev, cpu_addr, size); > +} > + > +#define vc_dma_alloc_struct(vdev, ptr) \ > + ({ptr = __vc_dma_alloc(vdev, sizeof(*(ptr))); }) > +#define vc_dma_free_struct(vdev, ptr) \ > + __vc_dma_free(vdev, sizeof(*(ptr)), (ptr)) > + > static void drop_airq_indicator(struct virtqueue *vq, struct airq_info *info) > { > unsigned long i, flags; &...
2019 May 08
2
[PATCH 09/10] virtio/s390: use DMA memory for ccw I/O and classic notifiers
...rn ccw_device_dma_zalloc(to_vc_device(vdev)->cdev, size); > +} > + > +static inline void __vc_dma_free(struct virtio_device *vdev, size_t size, > + void *cpu_addr) > +{ > + return ccw_device_dma_free(to_vc_device(vdev)->cdev, cpu_addr, size); > +} > + > +#define vc_dma_alloc_struct(vdev, ptr) \ > + ({ptr = __vc_dma_alloc(vdev, sizeof(*(ptr))); }) > +#define vc_dma_free_struct(vdev, ptr) \ > + __vc_dma_free(vdev, sizeof(*(ptr)), (ptr)) > + > static void drop_airq_indicator(struct virtqueue *vq, struct airq_info *info) > { > unsigned long i, flags; &...
2019 Apr 26
33
[PATCH 00/10] s390: virtio: support protected virtualization
Enhanced virtualization protection technology may require the use of bounce buffers for I/O. While support for this was built into the virtio core, virtio-ccw wasn't changed accordingly. Some background on technology (not part of this series) and the terminology used. * Protected Virtualization (PV): Protected Virtualization guarantees, that non-shared memory of a guest that operates in PV
2019 Apr 26
33
[PATCH 00/10] s390: virtio: support protected virtualization
Enhanced virtualization protection technology may require the use of bounce buffers for I/O. While support for this was built into the virtio core, virtio-ccw wasn't changed accordingly. Some background on technology (not part of this series) and the terminology used. * Protected Virtualization (PV): Protected Virtualization guarantees, that non-shared memory of a guest that operates in PV
2019 Apr 10
0
[RFC PATCH 07/12] virtio/s390: use DMA memory for ccw I/O
...t; +static inline void __vc_dma_free(struct virtio_device *vdev, size_t size, > > > + void *cpu_addr, dma_addr_t dma_handle) > > > +{ > > > + dma_free_coherent(vdev->dev.parent, size, cpu_addr, dma_handle); > > > +} > > > + > > > +#define vc_dma_alloc_struct(vdev, ptr) \ > > > + ({ ptr = __vc_dma_alloc(vdev, (sizeof(*(ptr))), &(ptr ## _dma_addr)); }) > > > +#define vc_dma_free_struct(vdev, ptr) \ > > > + __vc_dma_free(vdev, sizeof(*(ptr)), (ptr), (ptr ## _dma_addr)) > > > > Not sure I'm a fan of those w...