search for: reclaim_consumed_buff

Displaying 20 results from an estimated 86 matches for "reclaim_consumed_buff".

2019 Mar 04
5
[PATCH] virtio_console: free unused buffers with virtio port
...id remove_port_data(struct port *port) { spin_lock_irq(&port->inbuf_lock); /* Remove unused data this port might have received. */ discard_port_data(port); + remove_unused_bufs(port->in_vq); spin_unlock_irq(&port->inbuf_lock); spin_lock_irq(&port->outvq_lock); reclaim_consumed_buffers(port); + remove_unused_bufs(port->out_vq); spin_unlock_irq(&port->outvq_lock); } @@ -1950,11 +1960,9 @@ static void remove_vqs(struct ports_device *portdev) struct virtqueue *vq; virtio_device_for_each_vq(portdev->vdev, vq) { - struct port_buffer *buf; flush_bufs(vq...
2019 Mar 04
5
[PATCH] virtio_console: free unused buffers with virtio port
...id remove_port_data(struct port *port) { spin_lock_irq(&port->inbuf_lock); /* Remove unused data this port might have received. */ discard_port_data(port); + remove_unused_bufs(port->in_vq); spin_unlock_irq(&port->inbuf_lock); spin_lock_irq(&port->outvq_lock); reclaim_consumed_buffers(port); + remove_unused_bufs(port->out_vq); spin_unlock_irq(&port->outvq_lock); } @@ -1950,11 +1960,9 @@ static void remove_vqs(struct ports_device *portdev) struct virtqueue *vq; virtio_device_for_each_vq(portdev->vdev, vq) { - struct port_buffer *buf; flush_bufs(vq...
2013 Jul 18
0
[PATCH 08/10] virtio: console: add locks around buffer removal in port unplug path
...ivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -1516,18 +1516,22 @@ static void remove_port_data(struct port *port) { struct port_buffer *buf; + spin_lock_irq(&port->inbuf_lock); /* Remove unused data this port might have received. */ discard_port_data(port); - reclaim_consumed_buffers(port); - /* Remove buffers we queued up for the Host to send us data in. */ while ((buf = virtqueue_detach_unused_buf(port->in_vq))) free_buf(buf, true); + spin_unlock_irq(&port->inbuf_lock); + + spin_lock_irq(&port->outvq_lock); + reclaim_consumed_buffers(port); /* F...
2013 Jul 25
0
[PATCH v3 6/9] virtio: console: add locks around buffer removal in port unplug path
...ivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -1512,18 +1512,22 @@ static void remove_port_data(struct port *port) { struct port_buffer *buf; + spin_lock_irq(&port->inbuf_lock); /* Remove unused data this port might have received. */ discard_port_data(port); - reclaim_consumed_buffers(port); - /* Remove buffers we queued up for the Host to send us data in. */ while ((buf = virtqueue_detach_unused_buf(port->in_vq))) free_buf(buf, true); + spin_unlock_irq(&port->inbuf_lock); + + spin_lock_irq(&port->outvq_lock); + reclaim_consumed_buffers(port); /* F...
2019 Mar 05
2
[PATCH] virtio_console: free unused buffers with virtio port
...e unused data this port might have received. */ > > discard_port_data(port); > > + remove_unused_bufs(port->in_vq); > > spin_unlock_irq(&port->inbuf_lock); > > > > spin_lock_irq(&port->outvq_lock); > > reclaim_consumed_buffers(port); > > + remove_unused_bufs(port->out_vq); > > spin_unlock_irq(&port->outvq_lock); > > } > > > > @@ -1950,11 +1960,9 @@ static void remove_vqs(struct ports_device *portdev) > > struct virtqueue *vq; > > > &g...
2019 Mar 05
2
[PATCH] virtio_console: free unused buffers with virtio port
...e unused data this port might have received. */ > > discard_port_data(port); > > + remove_unused_bufs(port->in_vq); > > spin_unlock_irq(&port->inbuf_lock); > > > > spin_lock_irq(&port->outvq_lock); > > reclaim_consumed_buffers(port); > > + remove_unused_bufs(port->out_vq); > > spin_unlock_irq(&port->outvq_lock); > > } > > > > @@ -1950,11 +1960,9 @@ static void remove_vqs(struct ports_device *portdev) > > struct virtqueue *vq; > > > &g...
2012 Sep 24
2
[PATCHv4] virtio_console: Add support for remoteproc serial
...get_device(buf->dev); + buf->buf = dma_alloc_coherent(buf->dev, buf_size, &buf->dma, + GFP_KERNEL); + } else { + buf->buf = kmalloc(buf_size, GFP_KERNEL); + buf->dev = NULL; + } + if (!buf->buf) goto free_buf; buf->len = 0; @@ -485,7 +582,10 @@ static void reclaim_consumed_buffers(struct port *port) return; } while ((buf = virtqueue_get_buf(port->out_vq, &len))) { - kfree(buf); + if (is_console_port(port)) + kfree(buf); + else + free_buf(buf); port->outvq_full = false; } } @@ -498,6 +598,7 @@ static ssize_t send_buf(struct port *port, void *i...
2012 Sep 24
2
[PATCHv4] virtio_console: Add support for remoteproc serial
...get_device(buf->dev); + buf->buf = dma_alloc_coherent(buf->dev, buf_size, &buf->dma, + GFP_KERNEL); + } else { + buf->buf = kmalloc(buf_size, GFP_KERNEL); + buf->dev = NULL; + } + if (!buf->buf) goto free_buf; buf->len = 0; @@ -485,7 +582,10 @@ static void reclaim_consumed_buffers(struct port *port) return; } while ((buf = virtqueue_get_buf(port->out_vq, &len))) { - kfree(buf); + if (is_console_port(port)) + kfree(buf); + else + free_buf(buf); port->outvq_full = false; } } @@ -498,6 +598,7 @@ static ssize_t send_buf(struct port *port, void *i...
2019 Aug 10
2
[PATCH v3 1/2] virtio_console: free unused buffers with port delete
...{ > spin_lock_irq(&port->inbuf_lock); > /* Remove unused data this port might have received. */ > discard_port_data(port); > + remove_unused_bufs(port->in_vq); > spin_unlock_irq(&port->inbuf_lock); > > spin_lock_irq(&port->outvq_lock); > reclaim_consumed_buffers(port); > + remove_unused_bufs(port->out_vq); > spin_unlock_irq(&port->outvq_lock); > } > > @@ -1938,11 +1948,9 @@ static void remove_vqs(struct ports_device *portdev) > struct virtqueue *vq; > > virtio_device_for_each_vq(portdev->vdev, vq) { > -...
2019 Aug 10
2
[PATCH v3 1/2] virtio_console: free unused buffers with port delete
...{ > spin_lock_irq(&port->inbuf_lock); > /* Remove unused data this port might have received. */ > discard_port_data(port); > + remove_unused_bufs(port->in_vq); > spin_unlock_irq(&port->inbuf_lock); > > spin_lock_irq(&port->outvq_lock); > reclaim_consumed_buffers(port); > + remove_unused_bufs(port->out_vq); > spin_unlock_irq(&port->outvq_lock); > } > > @@ -1938,11 +1948,9 @@ static void remove_vqs(struct ports_device *portdev) > struct virtqueue *vq; > > virtio_device_for_each_vq(portdev->vdev, vq) { > -...
2013 Jul 22
2
[PATCH 08/10] virtio: console: add locks around buffer removal in port unplug path
...r/virtio_console.c > @@ -1516,18 +1516,22 @@ static void remove_port_data(struct port *port) > { > struct port_buffer *buf; > > + spin_lock_irq(&port->inbuf_lock); > /* Remove unused data this port might have received. */ > discard_port_data(port); > > - reclaim_consumed_buffers(port); > - > /* Remove buffers we queued up for the Host to send us data in. */ > while ((buf = virtqueue_detach_unused_buf(port->in_vq))) > free_buf(buf, true); > + spin_unlock_irq(&port->inbuf_lock); > + > + spin_lock_irq(&port->outvq_lock); > +...
2013 Jul 22
2
[PATCH 08/10] virtio: console: add locks around buffer removal in port unplug path
...r/virtio_console.c > @@ -1516,18 +1516,22 @@ static void remove_port_data(struct port *port) > { > struct port_buffer *buf; > > + spin_lock_irq(&port->inbuf_lock); > /* Remove unused data this port might have received. */ > discard_port_data(port); > > - reclaim_consumed_buffers(port); > - > /* Remove buffers we queued up for the Host to send us data in. */ > while ((buf = virtqueue_detach_unused_buf(port->in_vq))) > free_buf(buf, true); > + spin_unlock_irq(&port->inbuf_lock); > + > + spin_lock_irq(&port->outvq_lock); > +...
2012 Oct 15
7
[PATCHv7 0/4] virtio_console: Add rproc_serial driver
From: Sjur Br?ndeland <sjur.brandeland at stericsson.com> 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. This patch-set is a rework of the
2012 Oct 15
7
[PATCHv7 0/4] virtio_console: Add rproc_serial driver
From: Sjur Br?ndeland <sjur.brandeland at stericsson.com> 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. This patch-set is a rework of the
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
2012 Sep 19
2
[PATCHv2] virtio_console: Add support for remoteproc serial
...(struct port *port) port->stats.bytes_discarded += buf->len - buf->offset; if (add_inbuf(port->in_vq, buf) < 0) { err++; - free_buf(buf); + free_buf(port->in_vq, buf, PAGE_SIZE); } port->inbuf = NULL; buf = get_inbuf(port); @@ -485,7 +535,7 @@ static void reclaim_consumed_buffers(struct port *port) return; } while ((buf = virtqueue_get_buf(port->out_vq, &len))) { - kfree(buf); + free_databuf(port->portdev->vdev, PAGE_SIZE, buf); port->outvq_full = false; } } @@ -672,6 +722,8 @@ static ssize_t port_fops_write(struct file *filp, const char __...
2012 Sep 19
2
[PATCHv2] virtio_console: Add support for remoteproc serial
...(struct port *port) port->stats.bytes_discarded += buf->len - buf->offset; if (add_inbuf(port->in_vq, buf) < 0) { err++; - free_buf(buf); + free_buf(port->in_vq, buf, PAGE_SIZE); } port->inbuf = NULL; buf = get_inbuf(port); @@ -485,7 +535,7 @@ static void reclaim_consumed_buffers(struct port *port) return; } while ((buf = virtqueue_get_buf(port->out_vq, &len))) { - kfree(buf); + free_databuf(port->portdev->vdev, PAGE_SIZE, buf); port->outvq_full = false; } } @@ -672,6 +722,8 @@ static ssize_t port_fops_write(struct file *filp, const char __...
2012 Oct 30
5
[PATCHv8 0/3]virtio_console: Add rproc_serial driver
From: Sjur Br?ndeland <sjur.brandeland at stericsson.com> 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. Changes since v7: - Rebased to
2012 Oct 30
5
[PATCHv8 0/3]virtio_console: Add rproc_serial driver
From: Sjur Br?ndeland <sjur.brandeland at stericsson.com> 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. Changes since v7: - Rebased to