[alsa-devel] [PATCH] ASoC: omap-pcm: Lower the dma coherent mask to 32bits
Russell King - ARM Linux
linux at arm.linux.org.uk
Fri Dec 6 13:25:43 CET 2013
On Fri, Dec 06, 2013 at 09:12:22AM +0100, Takashi Iwai wrote:
> But, it's still unclear why only get_coherent_dma_mask() takes max_pfn
> into account for the check of dma_to_pfn(dev, mask).
>
> In dma_supported(),
>
> unsigned long limit;
> limit = dma_to_pfn(dev, mask);
> if (limit < arm_dma_pfn_limit)
> return 0;
>
> while in get_coherent_dma_mask(),
>
> unsigned long max_dma_pfn;
> max_dma_pfn = min(max_pfn, arm_dma_pfn_limit);
> if (dma_to_pfn(dev, mask) < max_dma_pfn)
> return 0;
>
> So, the current code looks to me that the results from
> dma_set_coherent_mask() and the actual allocation may conflict.
I did ask Peter to replace *both* with the same thing.
More information about the Alsa-devel
mailing list