2022-11-22 00:32:50

by Stephen Rothwell

[permalink] [raw]
Subject: linux-next: manual merge of the dma-mapping tree with Linus' tree

Hi all,

Today's linux-next merge of the dma-mapping tree got a conflict in:

sound/core/memalloc.c

between commits:

9736a325137b ("ALSA: memalloc: Don't fall back for SG-buffer with IOMMU")
9d8e536d36e7 ("ALSA: memalloc: Try dma_alloc_noncontiguous() at first")

from Linus' tree and commit:

3306877aff07 ("ALSA: memalloc: don't pass bogus GFP_ flags to dma_alloc_*")

from the dma-mapping tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

--
Cheers,
Stephen Rothwell

diff --cc sound/core/memalloc.c
index ba095558b6d1,fe03cf796e8b..000000000000
--- a/sound/core/memalloc.c
+++ b/sound/core/memalloc.c
@@@ -543,9 -541,9 +542,9 @@@ static void *snd_dma_noncontig_alloc(st
void *p;

sgt = dma_alloc_noncontiguous(dmab->dev.dev, size, dmab->dev.dir,
- DEFAULT_GFP, 0);
+ DEFAULT_GFP | __GFP_COMP, 0);
- if (!sgt) {
#ifdef CONFIG_SND_DMA_SGBUF
+ if (!sgt && !get_dma_ops(dmab->dev.dev)) {
if (dmab->dev.type == SNDRV_DMA_TYPE_DEV_WC_SG)
dmab->dev.type = SNDRV_DMA_TYPE_DEV_WC_SG_FALLBACK;
else


Attachments:
(No filename) (499.00 B)
OpenPGP digital signature

2022-11-22 06:37:02

by Christoph Hellwig

[permalink] [raw]
Subject: Re: linux-next: manual merge of the dma-mapping tree with Linus' tree

On Tue, Nov 22, 2022 at 10:06:11AM +1100, Stephen Rothwell wrote:
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging. You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.

Thanks Stephen,

the fix look good. The being said the code in the sound tree here
is questionable to start with:

> #ifdef CONFIG_SND_DMA_SGBUF
> + if (!sgt && !get_dma_ops(dmab->dev.dev)) {
> if (dmab->dev.type == SNDRV_DMA_TYPE_DEV_WC_SG)
> dmab->dev.type = SNDRV_DMA_TYPE_DEV_WC_SG_FALLBACK;
> else

driver have no busuness calling get_dma_ops and poking into the
dma-mapping internals.