[email protected] writes:
> From: Sjur Brændeland <[email protected]>
>
> Add a simple serial connection driver called
> VIRTIO_ID_RPROC_SERIAL (11) for communicating with a
> remote processor in an asymmetric multi-processing
> configuration.
>
...
>  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().

> @@ -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
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Reply via email to