lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200817053813.GA551027@pcleri>
Date:   Mon, 17 Aug 2020 07:38:13 +0200
From:   Richard Leitner <richard.leitner@...data.com>
To:     Robin Gong <yibin.gong@....com>
CC:     <mark.rutland@....com>, <broonie@...nel.org>, <robh+dt@...nel.org>,
        <catalin.marinas@....com>, <vkoul@...nel.org>,
        <will.deacon@....com>, <shawnguo@...nel.org>, <festevam@...il.com>,
        <s.hauer@...gutronix.de>, <martin.fuzzey@...wbird.group>,
        <u.kleine-koenig@...gutronix.de>, <dan.j.williams@...el.com>,
        <matthias.schiffer@...tq-group.com>, <frieder.schrempf@...tron.de>,
        <r.schwebel@...gutronix.de>, <linux-spi@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <devicetree@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>, <kernel@...gutronix.de>,
        <dmaengine@...r.kernel.org>, <linux-imx@....com>
Subject: Re: [PATCH v12 03/12] Revert "dmaengine: imx-sdma: refine to load
 context only once"

On Tue, Aug 11, 2020 at 11:53:42PM +0800, Robin Gong wrote:
> This reverts commit ad0d92d7ba6aecbe2705907c38ff8d8be4da1e9c, because
> in spi-imx case, burst length may be changed dynamically.
> 
> Signed-off-by: Robin Gong <yibin.gong@....com>
> Acked-by: Sascha Hauer <s.hauer@...gutronix.de>

Hi Robin,
thanks for the pointer to this patch.

As you suggested I've tested the two patches on my custom i.MX6DL
board. Therefore please feel free to add:

Tested-by: Richard Leitner <richard.leitner@...data.com>

regards;rl

> ---
>  drivers/dma/imx-sdma.c | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
> index 270992c..d305b80 100644
> --- a/drivers/dma/imx-sdma.c
> +++ b/drivers/dma/imx-sdma.c
> @@ -377,7 +377,6 @@ struct sdma_channel {
>  	unsigned long			watermark_level;
>  	u32				shp_addr, per_addr;
>  	enum dma_status			status;
> -	bool				context_loaded;
>  	struct imx_dma_data		data;
>  	struct work_struct		terminate_worker;
>  };
> @@ -984,9 +983,6 @@ static int sdma_load_context(struct sdma_channel *sdmac)
>  	int ret;
>  	unsigned long flags;
>  
> -	if (sdmac->context_loaded)
> -		return 0;
> -
>  	if (sdmac->direction == DMA_DEV_TO_MEM)
>  		load_address = sdmac->pc_from_device;
>  	else if (sdmac->direction == DMA_DEV_TO_DEV)
> @@ -1029,8 +1025,6 @@ static int sdma_load_context(struct sdma_channel *sdmac)
>  
>  	spin_unlock_irqrestore(&sdma->channel_0_lock, flags);
>  
> -	sdmac->context_loaded = true;
> -
>  	return ret;
>  }
>  
> @@ -1069,7 +1063,6 @@ static void sdma_channel_terminate_work(struct work_struct *work)
>  	vchan_get_all_descriptors(&sdmac->vc, &head);
>  	spin_unlock_irqrestore(&sdmac->vc.lock, flags);
>  	vchan_dma_desc_free_list(&sdmac->vc, &head);
> -	sdmac->context_loaded = false;
>  }
>  
>  static int sdma_terminate_all(struct dma_chan *chan)
> @@ -1337,7 +1330,6 @@ static void sdma_free_chan_resources(struct dma_chan *chan)
>  
>  	sdmac->event_id0 = 0;
>  	sdmac->event_id1 = 0;
> -	sdmac->context_loaded = false;
>  
>  	sdma_set_channel_priority(sdmac, 0);
>  
> -- 
> 2.7.4
> 
> 

-- 
Richard Leitner
Hardware R&D / Senior Embedded Linux Engineer

SKIDATA | Driving Your Digital Future

SKIDATA GmbH
Untersbergstraße 40 | 5083 Grödig/Salzburg | Austria
[t] +43-6246-888-4245 | [m] +43-664-88616370
[w] www.skidata.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ