Displaying 20 results from an estimated 48 matches for "port_fops_writ".
Did you mean:
port_fops_write
2012 Sep 03
3
[RFC 1/2] virtio_console: Add support for DMA memory allocation
...@@ -485,7 +526,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, len, buf);
port->outvq_full = false;
}
}
@@ -672,6 +713,8 @@ static ssize_t port_fops_write(struct file *filp, const char __user *ubuf,
char *buf;
ssize_t ret;
bool nonblock;
+ struct virtio_device *vdev;
+ dma_addr_t dma;
/* Userspace could be out to fool us */
if (!count)
@@ -694,9 +737,10 @@ static ssize_t port_fops_write(struct file *filp, const char __user *ubuf,
if (!...
2012 Sep 03
3
[RFC 1/2] virtio_console: Add support for DMA memory allocation
...@@ -485,7 +526,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, len, buf);
port->outvq_full = false;
}
}
@@ -672,6 +713,8 @@ static ssize_t port_fops_write(struct file *filp, const char __user *ubuf,
char *buf;
ssize_t ret;
bool nonblock;
+ struct virtio_device *vdev;
+ dma_addr_t dma;
/* Userspace could be out to fool us */
if (!count)
@@ -694,9 +737,10 @@ static ssize_t port_fops_write(struct file *filp, const char __user *ubuf,
if (!...
2012 Sep 24
2
[PATCHv4] virtio_console: Add support for remoteproc serial
...Tsirkin <mst at redhat.com>
cc: Amit Shah <amit.shah at redhat.com>
cc: Ohad Ben-Cohen <ohad at wizery.com>
cc: Linus Walleij <linus.walleij at linaro.org>
cc: Arnd Bergmann <arnd at arndb.de>
---
Changes since v3 are mostly related to freeing of dma-buffers:
- Change port_fops_write() to use struct port_buffer when allocating
memory. This is done in order to store the dma-address of the
allocated buffers, so the correct dma-address can be passed to
dma_free_coherent().
- Added pending_free_list for port_buf. dma_free_coherent() requires
the irqs to be enabled, so if i...
2012 Sep 24
2
[PATCHv4] virtio_console: Add support for remoteproc serial
...Tsirkin <mst at redhat.com>
cc: Amit Shah <amit.shah at redhat.com>
cc: Ohad Ben-Cohen <ohad at wizery.com>
cc: Linus Walleij <linus.walleij at linaro.org>
cc: Arnd Bergmann <arnd at arndb.de>
---
Changes since v3 are mostly related to freeing of dma-buffers:
- Change port_fops_write() to use struct port_buffer when allocating
memory. This is done in order to store the dma-address of the
allocated buffers, so the correct dma-address can be passed to
dma_free_coherent().
- Added pending_free_list for port_buf. dma_free_coherent() requires
the irqs to be enabled, so if i...
2012 Sep 19
2
[PATCHv2] virtio_console: Add support for remoteproc serial
...Ben-Cohen <ohad at wizery.com>
cc: Linus Walleij <linus.walleij at linaro.org>
---
Hi Rusty,
Changes since v1:
o Use proper macros IS_ENABLED(CONFIG_REMOTEPROC)
o Fix bug at registration of rproc_serial driver
o Always allocate PAGE_SIZE buffers for rproc_serial,
and limit write to port_fops_write to use PAGE_SIZE.
Regards,
Sjur
drivers/char/virtio_console.c | 160 ++++++++++++++++++++++++++++++++++-------
include/linux/virtio_ids.h | 1 +
2 files changed, 134 insertions(+), 27 deletions(-)
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index cdf2f54.....
2012 Sep 19
2
[PATCHv2] virtio_console: Add support for remoteproc serial
...Ben-Cohen <ohad at wizery.com>
cc: Linus Walleij <linus.walleij at linaro.org>
---
Hi Rusty,
Changes since v1:
o Use proper macros IS_ENABLED(CONFIG_REMOTEPROC)
o Fix bug at registration of rproc_serial driver
o Always allocate PAGE_SIZE buffers for rproc_serial,
and limit write to port_fops_write to use PAGE_SIZE.
Regards,
Sjur
drivers/char/virtio_console.c | 160 ++++++++++++++++++++++++++++++++++-------
include/linux/virtio_ids.h | 1 +
2 files changed, 134 insertions(+), 27 deletions(-)
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index cdf2f54.....
2012 Sep 07
4
[RFCv2 1/2] virtio_console: Add support for DMA memory allocation
...@@ -485,7 +528,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, len, buf);
port->outvq_full = false;
}
}
@@ -672,6 +715,7 @@ static ssize_t port_fops_write(struct file *filp, const char __user *ubuf,
char *buf;
ssize_t ret;
bool nonblock;
+ struct virtio_device *vdev;
/* Userspace could be out to fool us */
if (!count)
@@ -694,9 +738,10 @@ static ssize_t port_fops_write(struct file *filp, const char __user *ubuf,
if (!port->guest_con...
2012 Sep 07
4
[RFCv2 1/2] virtio_console: Add support for DMA memory allocation
...@@ -485,7 +528,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, len, buf);
port->outvq_full = false;
}
}
@@ -672,6 +715,7 @@ static ssize_t port_fops_write(struct file *filp, const char __user *ubuf,
char *buf;
ssize_t ret;
bool nonblock;
+ struct virtio_device *vdev;
/* Userspace could be out to fool us */
if (!count)
@@ -694,9 +738,10 @@ static ssize_t port_fops_write(struct file *filp, const char __user *ubuf,
if (!port->guest_con...
2012 Sep 13
0
[PATCH] virtio_console: Add support for remoteproc serial
...@@ -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, len, buf);
port->outvq_full = false;
}
}
@@ -672,6 +722,7 @@ static ssize_t port_fops_write(struct file *filp, const char __user *ubuf,
char *buf;
ssize_t ret;
bool nonblock;
+ struct virtio_device *vdev;
/* Userspace could be out to fool us */
if (!count)
@@ -694,9 +745,10 @@ static ssize_t port_fops_write(struct file *filp, const char __user *ubuf,
if (!port->guest_con...
2012 Sep 13
0
[PATCH] virtio_console: Add support for remoteproc serial
...@@ -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, len, buf);
port->outvq_full = false;
}
}
@@ -672,6 +722,7 @@ static ssize_t port_fops_write(struct file *filp, const char __user *ubuf,
char *buf;
ssize_t ret;
bool nonblock;
+ struct virtio_device *vdev;
/* Userspace could be out to fool us */
if (!count)
@@ -694,9 +745,10 @@ static ssize_t port_fops_write(struct file *filp, const char __user *ubuf,
if (!port->guest_con...
2018 Apr 21
2
[PATCH 1/6] virtio_console: don't tie bufs to a vq
...;dev.parent->parent)
> goto free_buf;
> - buf->dev = vq->vdev->dev.parent->parent;
> + buf->dev = vdev->dev.parent->parent;
>
> /* Increase device refcnt to avoid freeing it */
> get_device(buf->dev);
> @@ -838,7 +838,7 @@ static ssize_t port_fops_write(struct file *filp, const char __user *ubuf,
>
> count = min((size_t)(32 * 1024), count);
>
> - buf = alloc_buf(port->out_vq, count, 0);
> + buf = alloc_buf(port->portdev->vdev, count, 0);
> if (!buf)
> return -ENOMEM;
>
> @@ -957,7 +957,7 @@ static...
2018 Apr 21
2
[PATCH 1/6] virtio_console: don't tie bufs to a vq
...;dev.parent->parent)
> goto free_buf;
> - buf->dev = vq->vdev->dev.parent->parent;
> + buf->dev = vdev->dev.parent->parent;
>
> /* Increase device refcnt to avoid freeing it */
> get_device(buf->dev);
> @@ -838,7 +838,7 @@ static ssize_t port_fops_write(struct file *filp, const char __user *ubuf,
>
> count = min((size_t)(32 * 1024), count);
>
> - buf = alloc_buf(port->out_vq, count, 0);
> + buf = alloc_buf(port->portdev->vdev, count, 0);
> if (!buf)
> return -ENOMEM;
>
> @@ -957,7 +957,7 @@ static...
2012 Sep 20
0
[PATCHv3] virtio_console: Add support for remoteproc serial
...85,7 +538,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 +725,8 @@ static ssize_t port_fops_write(struct file *filp, const char __user *ubuf,
char *buf;
ssize_t ret;
bool nonblock;
+ struct virtio_device *vdev;
+ size_t buf_size;
/* Userspace could be out to fool us */
if (!count)
@@ -694,9 +749,17 @@ static ssize_t port_fops_write(struct file *filp, const char __user *ubuf,
if (...
2012 Sep 20
0
[PATCHv3] virtio_console: Add support for remoteproc serial
...85,7 +538,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 +725,8 @@ static ssize_t port_fops_write(struct file *filp, const char __user *ubuf,
char *buf;
ssize_t ret;
bool nonblock;
+ struct virtio_device *vdev;
+ size_t buf_size;
/* Userspace could be out to fool us */
if (!count)
@@ -694,9 +749,17 @@ static ssize_t port_fops_write(struct file *filp, const char __user *ubuf,
if (...
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
2010 Oct 19
1
[PATCH] virtio: console: Don't block entire guest if host doesn't read data
...ould be to copy the data to a
+ * buffer and relax the spinning requirement. The downside is
+ * we need to kmalloc a GFP_ATOMIC buffer each time the
+ * console driver writes something out.
*/
while (!virtqueue_get_buf(out_vq, &len))
cpu_relax();
@@ -626,6 +629,14 @@ static ssize_t port_fops_write(struct file *filp, const char __user *ubuf,
goto free_buf;
}
+ /*
+ * We now ask send_buf() to not spin for generic ports -- we
+ * can re-use the same code path that non-blocking file
+ * descriptors take for blocking file descriptors since the
+ * wait is already done and we're ce...
2010 Oct 19
1
[PATCH] virtio: console: Don't block entire guest if host doesn't read data
...ould be to copy the data to a
+ * buffer and relax the spinning requirement. The downside is
+ * we need to kmalloc a GFP_ATOMIC buffer each time the
+ * console driver writes something out.
*/
while (!virtqueue_get_buf(out_vq, &len))
cpu_relax();
@@ -626,6 +629,14 @@ static ssize_t port_fops_write(struct file *filp, const char __user *ubuf,
goto free_buf;
}
+ /*
+ * We now ask send_buf() to not spin for generic ports -- we
+ * can re-use the same code path that non-blocking file
+ * descriptors take for blocking file descriptors since the
+ * wait is already done and we're ce...
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