Patchwork MARS: fix dma list element initialization

login
register
mail settings
Submitter Yuji Mano
Date Sept. 9, 2008, 8:58 p.m.
Message ID <48C6E366.4030304@am.sony.com>
Download mbox | patch
Permalink /patch/225/
State New
Delegated to: Yuji Mano
Headers show

Comments

Yuji Mano - Sept. 9, 2008, 8:58 p.m.
This fixes a critical bug where the notify and reserved structure members of
the dma list element are not properly initialized, causing random stalls after
the dma completion.

Signed-off-by: Yuji Mano <yuji.mano@am.sony.com>
Kazunori Asayama - Sept. 10, 2008, 1:55 a.m.
Yuji Mano wrote:
> This fixes a critical bug where the notify and reserved structure members of
> the dma list element are not properly initialized, causing random stalls after
> the dma completion.
> 
> Signed-off-by: Yuji Mano <yuji.mano@am.sony.com>

Acked-by: Kazunori Asayama <asayama@sm.sony.co.jp>

> 
> ---
>  include/mpu/mars/mars_dma.h |    2 ++
>  1 file changed, 2 insertions(+)
> 
> --- a/include/mpu/mars/mars_dma.h
> +++ b/include/mpu/mars/mars_dma.h
> @@ -67,6 +67,8 @@ static inline unsigned int _list_init(mf
>  		unsigned int block_size;
>  		block_size = (size < MARS_DMA_SIZE_MAX) ?
>  				size : MARS_DMA_SIZE_MAX;
> +		list[count].notify = 0;
> +		list[count].reserved = 0;
>  		list[count].size = block_size;
>  		list[count].eal = eal;
>  		size -= block_size;
> 
> 
>

Patch

--- a/include/mpu/mars/mars_dma.h
+++ b/include/mpu/mars/mars_dma.h
@@ -67,6 +67,8 @@  static inline unsigned int _list_init(mf
 		unsigned int block_size;
 		block_size = (size < MARS_DMA_SIZE_MAX) ?
 				size : MARS_DMA_SIZE_MAX;
+		list[count].notify = 0;
+		list[count].reserved = 0;
 		list[count].size = block_size;
 		list[count].eal = eal;
 		size -= block_size;