search for: alloc_databuf

Displaying 10 results from an estimated 10 matches for "alloc_databuf".

2012 Sep 03
3
[RFC 1/2] virtio_console: Add support for DMA memory allocation
...4,20 +335,60 @@ static inline bool use_multiport(struct ports_device *portdev) return portdev->vdev->features[0] & (1 << VIRTIO_CONSOLE_F_MULTIPORT); } -static void free_buf(struct port_buffer *buf) +/* Allcoate data buffer from DMA memory if requested */ +static inline void * +alloc_databuf(struct virtio_device *vdev, size_t size, dma_addr_t *dma_handle, + gfp_t flag) { - kfree(buf->buf); +#ifdef CONFIG_HAS_DMA + if (virtio_has_feature(vdev, VIRTIO_CONSOLE_F_DMA_MEM)) { + struct device *dev = &vdev->dev; + /* + * Allocate DMA memory from ancestors. Finding the ances...
2012 Sep 03
3
[RFC 1/2] virtio_console: Add support for DMA memory allocation
...4,20 +335,60 @@ static inline bool use_multiport(struct ports_device *portdev) return portdev->vdev->features[0] & (1 << VIRTIO_CONSOLE_F_MULTIPORT); } -static void free_buf(struct port_buffer *buf) +/* Allcoate data buffer from DMA memory if requested */ +static inline void * +alloc_databuf(struct virtio_device *vdev, size_t size, dma_addr_t *dma_handle, + gfp_t flag) { - kfree(buf->buf); +#ifdef CONFIG_HAS_DMA + if (virtio_has_feature(vdev, VIRTIO_CONSOLE_F_DMA_MEM)) { + struct device *dev = &vdev->dev; + /* + * Allocate DMA memory from ancestors. Finding the ances...
2012 Sep 19
2
[PATCHv2] virtio_console: Add support for remoteproc serial
...inline bool is_rproc_serial(struct virtio_device *vdev) +{ + return vdev->id.device == VIRTIO_ID_RPROC_SERIAL; +} +#else +static inline bool is_rproc_serial(struct virtio_device *vdev) +{ + return false; +} +#endif + +/* Allocate data buffer from DMA memory if requested */ +static inline void * +alloc_databuf(struct virtio_device *vdev, size_t size, gfp_t flag) +{ + if (is_rproc_serial(vdev)) { + dma_addr_t dma; + struct device *dev = &vdev->dev; + /* + * Allocate DMA memory from ancestors. Finding the ancestor + * is a bit quirky when DMA_MEMORY_INCLUDES_CHILDREN is not + * implemented....
2012 Sep 19
2
[PATCHv2] virtio_console: Add support for remoteproc serial
...inline bool is_rproc_serial(struct virtio_device *vdev) +{ + return vdev->id.device == VIRTIO_ID_RPROC_SERIAL; +} +#else +static inline bool is_rproc_serial(struct virtio_device *vdev) +{ + return false; +} +#endif + +/* Allocate data buffer from DMA memory if requested */ +static inline void * +alloc_databuf(struct virtio_device *vdev, size_t size, gfp_t flag) +{ + if (is_rproc_serial(vdev)) { + dma_addr_t dma; + struct device *dev = &vdev->dev; + /* + * Allocate DMA memory from ancestors. Finding the ancestor + * is a bit quirky when DMA_MEMORY_INCLUDES_CHILDREN is not + * implemented....
2012 Sep 07
4
[RFCv2 1/2] virtio_console: Add support for DMA memory allocation
...4,20 +341,56 @@ static inline bool use_multiport(struct ports_device *portdev) return portdev->vdev->features[0] & (1 << VIRTIO_CONSOLE_F_MULTIPORT); } -static void free_buf(struct port_buffer *buf) +/* Allocate data buffer from DMA memory if requested */ +static inline void * +alloc_databuf(struct virtio_device *vdev, size_t size, gfp_t flag) +{ + if (VIRTIO_CONSOLE_HAS_DMA && + virtio_has_feature(vdev, VIRTIO_CONSOLE_F_DMA_MEM)) { + struct device *dev = &vdev->dev; + dma_addr_t dma; + /* + * Allocate DMA memory from ancestors. Finding the ancestor + * is a b...
2012 Sep 07
4
[RFCv2 1/2] virtio_console: Add support for DMA memory allocation
...4,20 +341,56 @@ static inline bool use_multiport(struct ports_device *portdev) return portdev->vdev->features[0] & (1 << VIRTIO_CONSOLE_F_MULTIPORT); } -static void free_buf(struct port_buffer *buf) +/* Allocate data buffer from DMA memory if requested */ +static inline void * +alloc_databuf(struct virtio_device *vdev, size_t size, gfp_t flag) +{ + if (VIRTIO_CONSOLE_HAS_DMA && + virtio_has_feature(vdev, VIRTIO_CONSOLE_F_DMA_MEM)) { + struct device *dev = &vdev->dev; + dma_addr_t dma; + /* + * Allocate DMA memory from ancestors. Finding the ancestor + * is a b...
2012 Sep 13
0
[PATCH] virtio_console: Add support for remoteproc serial
...inline bool is_rproc_serial(struct virtio_device *vdev) +{ + return vdev->id.device == VIRTIO_ID_RPROC_SERIAL; +} +#else +static inline bool is_rproc_serial(struct virtio_device *vdev) +{ + return false; +} +#endif + +/* Allocate data buffer from DMA memory if requested */ +static inline void * +alloc_databuf(struct virtio_device *vdev, size_t size, gfp_t flag) +{ + if (is_rproc_serial(vdev)) { + dma_addr_t dma; + struct device *dev = &vdev->dev; + /* + * Allocate DMA memory from ancestors. Finding the ancestor + * is a bit quirky when DMA_MEMORY_INCLUDES_CHILDREN is not + * implemented....
2012 Sep 13
0
[PATCH] virtio_console: Add support for remoteproc serial
...inline bool is_rproc_serial(struct virtio_device *vdev) +{ + return vdev->id.device == VIRTIO_ID_RPROC_SERIAL; +} +#else +static inline bool is_rproc_serial(struct virtio_device *vdev) +{ + return false; +} +#endif + +/* Allocate data buffer from DMA memory if requested */ +static inline void * +alloc_databuf(struct virtio_device *vdev, size_t size, gfp_t flag) +{ + if (is_rproc_serial(vdev)) { + dma_addr_t dma; + struct device *dev = &vdev->dev; + /* + * Allocate DMA memory from ancestors. Finding the ancestor + * is a bit quirky when DMA_MEMORY_INCLUDES_CHILDREN is not + * implemented....
2012 Sep 20
0
[PATCHv3] virtio_console: Add support for remoteproc serial
...C) +static bool is_rproc_serial(const struct virtio_device *vdev) +{ + return vdev->id.device == VIRTIO_ID_RPROC_SERIAL; +} +#else +static bool is_rproc_serial(const struct virtio_device *vdev) +{ + return false; +} +#endif + +/* Allocate data buffer from DMA memory if requested */ +static void *alloc_databuf(struct virtio_device *vdev, size_t size, gfp_t flag) +{ + if (is_rproc_serial(vdev)) { + dma_addr_t dma_addr; + struct device *dev = &vdev->dev; + /* + * Allocate DMA memory from ancestor. When a virtio + * device is created by remoteproc, the DMA memory is + * associated with the g...
2012 Sep 20
0
[PATCHv3] virtio_console: Add support for remoteproc serial
...C) +static bool is_rproc_serial(const struct virtio_device *vdev) +{ + return vdev->id.device == VIRTIO_ID_RPROC_SERIAL; +} +#else +static bool is_rproc_serial(const struct virtio_device *vdev) +{ + return false; +} +#endif + +/* Allocate data buffer from DMA memory if requested */ +static void *alloc_databuf(struct virtio_device *vdev, size_t size, gfp_t flag) +{ + if (is_rproc_serial(vdev)) { + dma_addr_t dma_addr; + struct device *dev = &vdev->dev; + /* + * Allocate DMA memory from ancestor. When a virtio + * device is created by remoteproc, the DMA memory is + * associated with the g...