Problems with dma_alloc_writecombine

Dave Hylands dhylands at gmail.com
Thu Aug 26 13:05:25 EDT 2010


Hi Russell,

...snip...
> Partly that's because it's overhead which we don't need there.  Probably
> a better solution is to add the dsb() to __dma_alloc_remap() like this:
>
>  arch/arm/mm/dma-mapping.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
> index c704eed..4bc43e5 100644
> --- a/arch/arm/mm/dma-mapping.c
> +++ b/arch/arm/mm/dma-mapping.c
> @@ -229,6 +229,8 @@ __dma_alloc_remap(struct page *page, size_t size, gfp_t gfp, pgprot_t prot)
>                        }
>                } while (size -= PAGE_SIZE);
>
> +               dsb();
> +
>                return (void *)c->vm_start;
>        }
>        return NULL;

I can confirm that your patch also addresses our issue.

-- 
Dave Hylands
Shuswap, BC, Canada
http://www.DaveHylands.com/



More information about the linux-arm-kernel mailing list