search for: use_multiport

Displaying 20 results from an estimated 155 matches for "use_multiport".

2015 Feb 28
2
[PATCH] virtio_console: avoid config access from irq
...har/virtio_console.c @@ -142,6 +142,7 @@ struct ports_device { * notification */ struct work_struct control_work; + struct work_struct config_work; struct list_head ports; @@ -1837,10 +1838,21 @@ static void config_intr(struct virtio_device *vdev) portdev = vdev->priv; + if (!use_multiport(portdev)) + schedule_work(&portdev->config_work); +} + +static void config_work_handler(struct work_struct *work) +{ + struct ports_device *portdev; + + portdev = container_of(work, struct ports_device, control_work); if (!use_multiport(portdev)) { + struct virtio_device *vdev; struct...
2015 Feb 28
2
[PATCH] virtio_console: avoid config access from irq
...har/virtio_console.c @@ -142,6 +142,7 @@ struct ports_device { * notification */ struct work_struct control_work; + struct work_struct config_work; struct list_head ports; @@ -1837,10 +1838,21 @@ static void config_intr(struct virtio_device *vdev) portdev = vdev->priv; + if (!use_multiport(portdev)) + schedule_work(&portdev->config_work); +} + +static void config_work_handler(struct work_struct *work) +{ + struct ports_device *portdev; + + portdev = container_of(work, struct ports_device, control_work); if (!use_multiport(portdev)) { + struct virtio_device *vdev; struct...
2012 Sep 19
2
[PATCHv2] virtio_console: Add support for remoteproc serial
...struct device *dev = &vdev->dev; + dma_addr_t dma_handle = virt_to_bus(cpu_addr); + dev = dev->parent ? dev->parent : dev; + dev = dev->parent ? dev->parent : dev; + dma_free_coherent(dev, size, cpu_addr, dma_handle); + return; + } + kfree(cpu_addr); +} + static inline bool use_multiport(struct ports_device *portdev) { /* @@ -334,20 +382,22 @@ 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) +static void +free_buf(struct virtq...
2012 Sep 19
2
[PATCHv2] virtio_console: Add support for remoteproc serial
...struct device *dev = &vdev->dev; + dma_addr_t dma_handle = virt_to_bus(cpu_addr); + dev = dev->parent ? dev->parent : dev; + dev = dev->parent ? dev->parent : dev; + dma_free_coherent(dev, size, cpu_addr, dma_handle); + return; + } + kfree(cpu_addr); +} + static inline bool use_multiport(struct ports_device *portdev) { /* @@ -334,20 +382,22 @@ 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) +static void +free_buf(struct virtq...
2009 Aug 25
3
Extending virtio_console to support multiple ports
Hello all, Here is a new iteration of the patch series that implements a transport for guest and host communications. The code has been updated to reuse the virtio-console device instead of creating a new virtio-serial device. I've tested for compatibility (old qemu & new kernel, new qemu & old kernel, new qemu & new kernel) and it all works fine. There are a few items on my
2009 Aug 25
3
Extending virtio_console to support multiple ports
Hello all, Here is a new iteration of the patch series that implements a transport for guest and host communications. The code has been updated to reuse the virtio-console device instead of creating a new virtio-serial device. I've tested for compatibility (old qemu & new kernel, new qemu & old kernel, new qemu & new kernel) and it all works fine. There are a few items on my
2012 Sep 13
0
[PATCH] virtio_console: Add support for remoteproc serial
...struct device *dev = &vdev->dev; + dma_addr_t dma_handle = virt_to_bus(cpu_addr); + dev = dev->parent ? dev->parent : dev; + dev = dev->parent ? dev->parent : dev; + dma_free_coherent(dev, size, cpu_addr, dma_handle); + return; + } + kfree(cpu_addr); +} + static inline bool use_multiport(struct ports_device *portdev) { /* @@ -334,20 +382,22 @@ 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) +static void +free_buf(struct virtq...
2012 Sep 13
0
[PATCH] virtio_console: Add support for remoteproc serial
...struct device *dev = &vdev->dev; + dma_addr_t dma_handle = virt_to_bus(cpu_addr); + dev = dev->parent ? dev->parent : dev; + dev = dev->parent ? dev->parent : dev; + dma_free_coherent(dev, size, cpu_addr, dma_handle); + return; + } + kfree(cpu_addr); +} + static inline bool use_multiport(struct ports_device *portdev) { /* @@ -334,20 +382,22 @@ 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) +static void +free_buf(struct virtq...
2012 Sep 07
4
[RFCv2 1/2] virtio_console: Add support for DMA memory allocation
...nclude "../tty/hvc/hvc_console.h" +#ifdef CONFIG_HAS_DMA +#define VIRTIO_CONSOLE_HAS_DMA (1) +#else +#define VIRTIO_CONSOLE_HAS_DMA (0) +#endif + /* * This is a global struct for storing common data for all the devices * this driver handles. @@ -334,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...
2012 Sep 07
4
[RFCv2 1/2] virtio_console: Add support for DMA memory allocation
...nclude "../tty/hvc/hvc_console.h" +#ifdef CONFIG_HAS_DMA +#define VIRTIO_CONSOLE_HAS_DMA (1) +#else +#define VIRTIO_CONSOLE_HAS_DMA (0) +#endif + /* * This is a global struct for storing common data for all the devices * this driver handles. @@ -334,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...
2012 Sep 24
2
[PATCHv4] virtio_console: Add support for remoteproc serial
...e */ + struct list_head list; }; /* @@ -323,6 +336,11 @@ static bool is_console_port(struct port *port) return false; } +static bool is_rproc_serial(const struct virtio_device *vdev) +{ + return rproc_enabled && vdev->id.device == VIRTIO_ID_RPROC_SERIAL; +} + static inline bool use_multiport(struct ports_device *portdev) { /* @@ -334,20 +352,99 @@ static inline bool use_multiport(struct ports_device *portdev) return portdev->vdev->features[0] & (1 << VIRTIO_CONSOLE_F_MULTIPORT); } +static DEFINE_SPINLOCK(list_lock); +static LIST_HEAD(pending_free_list); + stati...
2012 Sep 24
2
[PATCHv4] virtio_console: Add support for remoteproc serial
...e */ + struct list_head list; }; /* @@ -323,6 +336,11 @@ static bool is_console_port(struct port *port) return false; } +static bool is_rproc_serial(const struct virtio_device *vdev) +{ + return rproc_enabled && vdev->id.device == VIRTIO_ID_RPROC_SERIAL; +} + static inline bool use_multiport(struct ports_device *portdev) { /* @@ -334,20 +352,99 @@ static inline bool use_multiport(struct ports_device *portdev) return portdev->vdev->features[0] & (1 << VIRTIO_CONSOLE_F_MULTIPORT); } +static DEFINE_SPINLOCK(list_lock); +static LIST_HEAD(pending_free_list); + stati...
2012 Sep 20
0
[PATCHv3] virtio_console: Add support for remoteproc serial
...ruct device *dev = &vdev->dev; + dma_addr_t dma_addr; + + dev = dev->parent ? dev->parent : dev; + dev = dev->parent ? dev->parent : dev; + dma_addr = virt_to_bus(vaddr); + dma_free_coherent(dev, size, vaddr, dma_addr); + return; + } + kfree(vaddr); +} + static inline bool use_multiport(struct ports_device *portdev) { /* @@ -334,22 +385,24 @@ 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) +static void free_buf(struct virtqu...
2012 Sep 20
0
[PATCHv3] virtio_console: Add support for remoteproc serial
...ruct device *dev = &vdev->dev; + dma_addr_t dma_addr; + + dev = dev->parent ? dev->parent : dev; + dev = dev->parent ? dev->parent : dev; + dma_addr = virt_to_bus(vaddr); + dma_free_coherent(dev, size, vaddr, dma_addr); + return; + } + kfree(vaddr); +} + static inline bool use_multiport(struct ports_device *portdev) { /* @@ -334,22 +385,24 @@ 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) +static void free_buf(struct virtqu...
2010 Jan 29
3
virtio: console: Return -EFAULT on copy_xx_user errors, allow larger writes
...ee_device; } - port->outbuf = alloc_buf(PAGE_SIZE); - if (!port->outbuf) { - err = -ENOMEM; - goto free_inbuf; - } /* Register the input buffer the first time. */ add_inbuf(port->in_vq, inbuf); @@ -1158,7 +1144,7 @@ static int add_port(struct ports_device *portdev, u32 id) if (!use_multiport(port->portdev)) { err = init_port_console(port); if (err) - goto free_outbuf; + goto free_inbuf; } spin_lock_irq(&portdev->ports_lock); @@ -1186,8 +1172,6 @@ static int add_port(struct ports_device *portdev, u32 id) } return 0; -free_outbuf: - free_buf(port->outbu...
2010 Jan 29
3
virtio: console: Return -EFAULT on copy_xx_user errors, allow larger writes
...ee_device; } - port->outbuf = alloc_buf(PAGE_SIZE); - if (!port->outbuf) { - err = -ENOMEM; - goto free_inbuf; - } /* Register the input buffer the first time. */ add_inbuf(port->in_vq, inbuf); @@ -1158,7 +1144,7 @@ static int add_port(struct ports_device *portdev, u32 id) if (!use_multiport(port->portdev)) { err = init_port_console(port); if (err) - goto free_outbuf; + goto free_inbuf; } spin_lock_irq(&portdev->ports_lock); @@ -1186,8 +1172,6 @@ static int add_port(struct ports_device *portdev, u32 id) } return 0; -free_outbuf: - free_buf(port->outbu...
2017 Mar 29
1
[PATCH] virtio_console: fix uninitialized variable use
.../drivers/char/virtio_console.c index 5da4c8e..d0699c5 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -2202,14 +2202,16 @@ static int virtcons_freeze(struct virtio_device *vdev) vdev->config->reset(vdev); - virtqueue_disable_cb(portdev->c_ivq); + if (use_multiport(portdev)) + virtqueue_disable_cb(portdev->c_ivq); cancel_work_sync(&portdev->control_work); cancel_work_sync(&portdev->config_work); /* * Once more: if control_work_handler() was running, it would * enable the cb as the last step. */ - virtqueue_disable_cb(portdev-&...
2017 Mar 29
1
[PATCH] virtio_console: fix uninitialized variable use
.../drivers/char/virtio_console.c index 5da4c8e..d0699c5 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -2202,14 +2202,16 @@ static int virtcons_freeze(struct virtio_device *vdev) vdev->config->reset(vdev); - virtqueue_disable_cb(portdev->c_ivq); + if (use_multiport(portdev)) + virtqueue_disable_cb(portdev->c_ivq); cancel_work_sync(&portdev->control_work); cancel_work_sync(&portdev->config_work); /* * Once more: if control_work_handler() was running, it would * enable the cb as the last step. */ - virtqueue_disable_cb(portdev-&...
2012 Dec 12
2
[PATCHv9 0/2] virtio_console: Add rproc_serial driver
This patch-set introduces a new virtio type "rproc_serial" for communicating with remote processors over shared memory. The driver depends on the the remoteproc framework. As preparation for introducing "rproc_serial" I've done a refactoring of the transmit buffer handling. NOTE: These two patches are identical to first two patches of the V8 patch-set, but are rebased to
2012 Dec 12
2
[PATCHv9 0/2] virtio_console: Add rproc_serial driver
This patch-set introduces a new virtio type "rproc_serial" for communicating with remote processors over shared memory. The driver depends on the the remoteproc framework. As preparation for introducing "rproc_serial" I've done a refactoring of the transmit buffer handling. NOTE: These two patches are identical to first two patches of the V8 patch-set, but are rebased to