Skip to contentSkip to conversation

linux-next: manual merge of the dma-mapping tree with Linus' tree

DISCUSSION Stephen Rothwell 2 participants 2 messages Nov 21, 2022 – Nov 22, 2022 Linux-next tree

lore
Share & tools
lore
#0 lore raw

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.

Signature · 19 lines
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
#1 lore raw
Quoted 6 lines · Stephen Rothwell

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:

Quoted 5 lines

#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.