Re: [PATCH v3 1/2] tty: hvc: pass DMA capable memory to put_chars()

2021-08-05 Thread Xianting Tian
在 2021/8/5 下午4:09, Jiri Slaby 写道: On 05. 08. 21, 9:58, Jiri Slaby wrote: Hi, On 04. 08. 21, 4:54, Xianting Tian wrote: @@ -933,6 +949,16 @@ struct hvc_struct *hvc_alloc(uint32_t vtermno, int data,   hp->outbuf_size = outbuf_size;   hp->outbuf = &((char *)hp)[ALIGN(sizeof(*hp), sizeo

Re: [PATCH v3 1/2] tty: hvc: pass DMA capable memory to put_chars()

2021-08-05 Thread Xianting Tian
在 2021/8/5 下午4:18, Greg KH 写道: On Thu, Aug 05, 2021 at 04:08:46PM +0800, Xianting Tian wrote: 在 2021/8/5 下午3:58, Jiri Slaby 写道: Hi, On 04. 08. 21, 4:54, Xianting Tian wrote: @@ -933,6 +949,16 @@ struct hvc_struct *hvc_alloc(uint32_t vtermno, int data,   hp->outbuf_size = outbuf_size;

Re: [PATCH v3 1/2] tty: hvc: pass DMA capable memory to put_chars()

2021-08-05 Thread Xianting Tian
在 2021/8/5 下午3:58, Jiri Slaby 写道: Hi, On 04. 08. 21, 4:54, Xianting Tian wrote: @@ -933,6 +949,16 @@ struct hvc_struct *hvc_alloc(uint32_t vtermno, int data,   hp->outbuf_size = outbuf_size;   hp->outbuf = &((char *)hp)[ALIGN(sizeof(*hp), sizeof(long))];   +    /* + * hvc_con_outb

Re: [PATCH v3 1/2] tty: hvc: pass DMA capable memory to put_chars()

2021-08-05 Thread Greg KH
On Thu, Aug 05, 2021 at 04:08:46PM +0800, Xianting Tian wrote: > > 在 2021/8/5 下午3:58, Jiri Slaby 写道: > > Hi, > > > > On 04. 08. 21, 4:54, Xianting Tian wrote: > > > @@ -933,6 +949,16 @@ struct hvc_struct *hvc_alloc(uint32_t vtermno, > > > int data, > > >   hp->outbuf_size = outbuf_size; > > >

Re: [PATCH v3 1/2] tty: hvc: pass DMA capable memory to put_chars()

2021-08-05 Thread Jiri Slaby
On 05. 08. 21, 9:58, Jiri Slaby wrote: Hi, On 04. 08. 21, 4:54, Xianting Tian wrote: @@ -933,6 +949,16 @@ struct hvc_struct *hvc_alloc(uint32_t vtermno, int data,   hp->outbuf_size = outbuf_size;   hp->outbuf = &((char *)hp)[ALIGN(sizeof(*hp), sizeof(long))]; This deserves cleanup to

Re: [PATCH v3 1/2] tty: hvc: pass DMA capable memory to put_chars()

2021-08-05 Thread Jiri Slaby
Hi, On 04. 08. 21, 4:54, Xianting Tian wrote: @@ -933,6 +949,16 @@ struct hvc_struct *hvc_alloc(uint32_t vtermno, int data, hp->outbuf_size = outbuf_size; hp->outbuf = &((char *)hp)[ALIGN(sizeof(*hp), sizeof(long))]; + /* +* hvc_con_outbuf is guaranteed to be aligned

[PATCH v3 1/2] tty: hvc: pass DMA capable memory to put_chars()

2021-08-03 Thread Xianting Tian
As well known, hvc backend can register its opertions to hvc backend. the opertions contain put_chars(), get_chars() and so on. Some hvc backend may do dma in its opertions. eg, put_chars() of virtio-console. But in the code of hvc framework, it may pass DMA incapable memory to put_chars() under a