Re: [PATCH v2 2/3] i2c: Add helper to ease DMA handling

2018-08-09 Thread Wolfram Sang
Hi, > I believe the reason for these api is because some arch changed to can > not do DMA on stack recently. Maybe we should have dma_mapping to bounce It is not only arch dependent. You can enable virtual stacks in Kconfig, too. > buffer like it bounce un-dma-able address for those arch? or we

Re: [PATCH v2 2/3] i2c: Add helper to ease DMA handling

2018-08-09 Thread Wolfram Sang
Hi, > I believe the reason for these api is because some arch changed to can > not do DMA on stack recently. Maybe we should have dma_mapping to bounce It is not only arch dependent. You can enable virtual stacks in Kconfig, too. > buffer like it bounce un-dma-able address for those arch? or we

Re: [PATCH v2 2/3] i2c: Add helper to ease DMA handling

2018-08-09 Thread Yingjoe Chen
On Wed, 2018-08-08 at 22:57 +0200, Wolfram Sang wrote: > On Sat, Jul 07, 2018 at 05:29:54PM +0800, Jun Gao wrote: > > From: Jun Gao > > > > This function is needed by i2c_get_dma_safe_msg_buf() potentially. > > It is used to free DMA safe buffer when DMA operation fails. > > > > Signed-off-by:

Re: [PATCH v2 2/3] i2c: Add helper to ease DMA handling

2018-08-09 Thread Yingjoe Chen
On Wed, 2018-08-08 at 22:57 +0200, Wolfram Sang wrote: > On Sat, Jul 07, 2018 at 05:29:54PM +0800, Jun Gao wrote: > > From: Jun Gao > > > > This function is needed by i2c_get_dma_safe_msg_buf() potentially. > > It is used to free DMA safe buffer when DMA operation fails. > > > > Signed-off-by:

Re: [PATCH v2 2/3] i2c: Add helper to ease DMA handling

2018-08-08 Thread Wolfram Sang
On Sat, Jul 07, 2018 at 05:29:54PM +0800, Jun Gao wrote: > From: Jun Gao > > This function is needed by i2c_get_dma_safe_msg_buf() potentially. > It is used to free DMA safe buffer when DMA operation fails. > > Signed-off-by: Jun Gao Right, we need something like this. This leaks in the

Re: [PATCH v2 2/3] i2c: Add helper to ease DMA handling

2018-08-08 Thread Wolfram Sang
On Sat, Jul 07, 2018 at 05:29:54PM +0800, Jun Gao wrote: > From: Jun Gao > > This function is needed by i2c_get_dma_safe_msg_buf() potentially. > It is used to free DMA safe buffer when DMA operation fails. > > Signed-off-by: Jun Gao Right, we need something like this. This leaks in the

Re: [PATCH v2 2/3] i2c: Add helper to ease DMA handling

2018-07-08 Thread Peter Rosin
On 2018-07-08 13:58, Peter Rosin wrote: > On 2018-07-07 11:29, Jun Gao wrote: >> From: Jun Gao >> >> This function is needed by i2c_get_dma_safe_msg_buf() potentially. >> It is used to free DMA safe buffer when DMA operation fails. >> >> Signed-off-by: Jun Gao >> --- >>

Re: [PATCH v2 2/3] i2c: Add helper to ease DMA handling

2018-07-08 Thread Peter Rosin
On 2018-07-08 13:58, Peter Rosin wrote: > On 2018-07-07 11:29, Jun Gao wrote: >> From: Jun Gao >> >> This function is needed by i2c_get_dma_safe_msg_buf() potentially. >> It is used to free DMA safe buffer when DMA operation fails. >> >> Signed-off-by: Jun Gao >> --- >>

Re: [PATCH v2 2/3] i2c: Add helper to ease DMA handling

2018-07-08 Thread Peter Rosin
On 2018-07-07 11:29, Jun Gao wrote: > From: Jun Gao > > This function is needed by i2c_get_dma_safe_msg_buf() potentially. > It is used to free DMA safe buffer when DMA operation fails. > > Signed-off-by: Jun Gao > --- > drivers/i2c/i2c-core-base.c | 14 ++ > include/linux/i2c.h

Re: [PATCH v2 2/3] i2c: Add helper to ease DMA handling

2018-07-08 Thread Peter Rosin
On 2018-07-07 11:29, Jun Gao wrote: > From: Jun Gao > > This function is needed by i2c_get_dma_safe_msg_buf() potentially. > It is used to free DMA safe buffer when DMA operation fails. > > Signed-off-by: Jun Gao > --- > drivers/i2c/i2c-core-base.c | 14 ++ > include/linux/i2c.h

[PATCH v2 2/3] i2c: Add helper to ease DMA handling

2018-07-07 Thread Jun Gao
From: Jun Gao This function is needed by i2c_get_dma_safe_msg_buf() potentially. It is used to free DMA safe buffer when DMA operation fails. Signed-off-by: Jun Gao --- drivers/i2c/i2c-core-base.c | 14 ++ include/linux/i2c.h | 1 + 2 files changed, 15 insertions(+) diff

[PATCH v2 2/3] i2c: Add helper to ease DMA handling

2018-07-07 Thread Jun Gao
From: Jun Gao This function is needed by i2c_get_dma_safe_msg_buf() potentially. It is used to free DMA safe buffer when DMA operation fails. Signed-off-by: Jun Gao --- drivers/i2c/i2c-core-base.c | 14 ++ include/linux/i2c.h | 1 + 2 files changed, 15 insertions(+) diff