Thread (8 messages) 8 messages, 3 authors, 2012-10-01

Re: [PATCHv5 2/3] virtio_console: Add support for remoteproc serial

flat view

From: Rusty Russell <hidden>
Date: 2012-09-27 02:05:41
Also in: lkml

sjur.brandeland@stericsson.com writes:
From: Sjur Brændeland <redacted>

Add a simple serial connection driver called
VIRTIO_ID_RPROC_SERIAL (11) for communicating with a
remote processor in an asymmetric multi-processing
configuration.
...
quoted hunk ↗ jump to hunk
 static struct port_buffer *alloc_buf(struct virtqueue *vq, size_t buf_size,
 				     int nrbufs)
 {
 	struct port_buffer *buf;
 	size_t alloc_size;
 
+	if (is_rproc_serial(vq->vdev) && !irqs_disabled())
+		reclaim_dma_bufs();
Hmm, you need a gfp_t arg into alloc_buf; your last patch simply changed
them all to GFP_ATOMIC, which makes the console far less memory
friendly.

You check !irqs_disabled() in a couple of places; I think the caller
needs to indicate (possibly by checking for gfp == GFP_KERNEL) whether
it's safe to call reclaim_dma_bufs().
quoted hunk ↗ jump to hunk
@@ -838,6 +927,10 @@ static ssize_t port_fops_splice_write(struct pipe_inode_info *pipe,
 		.u.data = &sgl,
 	};
 
+	/* rproc_serial does not support splice */
+	if (is_rproc_serial(port->out_vq->vdev))
+		return -EINVAL;
Why not? ;)

Thanks,
Rusty.
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help