Re: 4.2+ stable inclusion request: ARCv2: save r30 on kernel entry as gcc uses it for code-gen

2017-04-30 Thread Greg KH
On Fri, Apr 28, 2017 at 11:57:36AM -0700, Vineet Gupta wrote:
> Hi,
> 
> Can we please backport upstream ecd43afdbe72017aefe48080631eb625e177ef4d 
> ("ARCv2:
> save r30 on kernel entry as gcc uses it for code-gen") to 4.2 to 4.9 kernels.
> 
> While the issue cites gcc, it is general deficiency of kernel as userspace
> programs can modify r30 register in hand/inline assembly and those will not be
> preserved without this change.

Queued up for 4.9 and 4.4 stable trees, thanks.

greg k-h

___
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc


Re: [PATCH] Allow to use DMA_CTRL_REUSE flag for all channel types

2017-04-30 Thread Vinod Koul
On Fri, Apr 28, 2017 at 04:37:46PM +0300, Eugeniy Paltsev wrote:
> In the current implementation dma_get_slave_caps is used to check
> state of descriptor_reuse option. But dma_get_slave_caps includes
> check if the channel supports slave transactions.
> So DMA_CTRL_REUSE flag can be set (even for MEM-TO-MEM tranfers)
> only if channel supports slave transactions.
> 
> Now we can use DMA_CTRL_REUSE flag for all channel types.
> Also it allows to test reusing mechanism with simply mem-to-mem dma
> test.

We do not want to allow that actually. Slave is always treated as a special
case, so resue was allowed.

With memcpy the assumptions are different and clients can do reuse.

> 
> Signed-off-by: Eugeniy Paltsev 
> ---
>  include/linux/dmaengine.h | 6 +-
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
> index 5336808..92cf8b0 100644
> --- a/include/linux/dmaengine.h
> +++ b/include/linux/dmaengine.h
> @@ -1376,11 +1376,7 @@ static inline int dma_get_slave_caps(struct dma_chan 
> *chan,
>  
>  static inline int dmaengine_desc_set_reuse(struct dma_async_tx_descriptor 
> *tx)
>  {
> - struct dma_slave_caps caps;
> -
> - dma_get_slave_caps(tx->chan, &caps);
> -
> - if (caps.descriptor_reuse) {
> + if (tx->chan->device->descriptor_reuse) {
>   tx->flags |= DMA_CTRL_REUSE;
>   return 0;
>   } else {
> -- 
> 2.9.3
> 
> --
> To unsubscribe from this list: send the line "unsubscribe dmaengine" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
~Vinod

___
linux-snps-arc mailing list
linux-snps-arc@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc