提交 db918321 编写于 作者: C Christoph Hellwig

ALSA: memalloc: don't use GFP_COMP for non-coherent dma allocations

While not quite as bogus as for the dma-coherent allocations that were
fixed earlier, GFP_COMP for these allocations has no benefits for
the dma-direct case, and can't be supported at all by dma dma-iommu
backend which splits up allocations into smaller orders.  Due to an
oversight in ffcb7545 that flag stopped being cleared for all
dma allocations, but only got rejected for coherent ones.

Start fixing this by not requesting __GFP_COMP in the sound code, which
is the only place that did this.

Fixes: ffcb7545 ("dma-mapping: reject __GFP_COMP in dma_alloc_attrs")
Reported-by: NMikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Reported-by: NKai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Acked-by: NTakashi Iwai <tiwai@suse.de>
Tested-by: NMikhail Gavrilov <mikhail.v.gavrilov@gmail.com>
Tested-by: NKai Vehmanen <kai.vehmanen@linux.intel.com>
上级 6feb57c2
...@@ -542,7 +542,7 @@ static void *snd_dma_noncontig_alloc(struct snd_dma_buffer *dmab, size_t size) ...@@ -542,7 +542,7 @@ static void *snd_dma_noncontig_alloc(struct snd_dma_buffer *dmab, size_t size)
void *p; void *p;
sgt = dma_alloc_noncontiguous(dmab->dev.dev, size, dmab->dev.dir, sgt = dma_alloc_noncontiguous(dmab->dev.dev, size, dmab->dev.dir,
DEFAULT_GFP | __GFP_COMP, 0); DEFAULT_GFP, 0);
#ifdef CONFIG_SND_DMA_SGBUF #ifdef CONFIG_SND_DMA_SGBUF
if (!sgt && !get_dma_ops(dmab->dev.dev)) { if (!sgt && !get_dma_ops(dmab->dev.dev)) {
if (dmab->dev.type == SNDRV_DMA_TYPE_DEV_WC_SG) if (dmab->dev.type == SNDRV_DMA_TYPE_DEV_WC_SG)
...@@ -820,7 +820,7 @@ static void *snd_dma_noncoherent_alloc(struct snd_dma_buffer *dmab, size_t size) ...@@ -820,7 +820,7 @@ static void *snd_dma_noncoherent_alloc(struct snd_dma_buffer *dmab, size_t size)
void *p; void *p;
p = dma_alloc_noncoherent(dmab->dev.dev, size, &dmab->addr, p = dma_alloc_noncoherent(dmab->dev.dev, size, &dmab->addr,
dmab->dev.dir, DEFAULT_GFP | __GFP_COMP); dmab->dev.dir, DEFAULT_GFP);
if (p) if (p)
dmab->dev.need_sync = dma_need_sync(dmab->dev.dev, dmab->addr); dmab->dev.need_sync = dma_need_sync(dmab->dev.dev, dmab->addr);
return p; return p;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册