Skip to contentSkip to conversation

m68k: don't select ARCH_HAS_DMA_PREP_COHERENT for nommu or coldfire

PATCH In review Christoph Hellwig 2 participants 5 messages Jul 8, 2019 – Jul 9, 2019 m68k architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 m68k: don't select ARCH_HAS_DMA_PREP_COHERENT for nommu or coldfire

m68k only provides the dma_prep_coherent symbol when an mmu is enabled and not on the coldfire platform. Fix the Kconfig symbol selection up to match this.

Fixes 69878ef47562 ("m68k: Implement arch_dma_prep_coherent()")
---
 arch/m68k/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/m68k/Kconfig +1 -1
index 8f765cfefca6..c518d695c376 100644
@@ -5,7 +5,7 @@ config M68K
 	select ARCH_32BIT_OFF_T
 	select ARCH_HAS_BINFMT_FLAT
 	select ARCH_HAS_DMA_MMAP_PGPROT if MMU && !COLDFIRE
-	select ARCH_HAS_DMA_PREP_COHERENT
+	select ARCH_HAS_DMA_PREP_COHERENT if HAS_DMA && MMU && !COLDFIRE
 	select ARCH_HAS_SYNC_DMA_FOR_DEVICE if HAS_DMA
 	select ARCH_MIGHT_HAVE_PC_PARPORT if ISA
 	select ARCH_NO_COHERENT_DMA_MMAP if !MMU
Signature · 1 line
2.20.1
maintainer Acked-by on v1 1/1
#1 lore raw

Hi Christoph,

Quoted 2 lines · Christoph Hellwig

m68k only provides the dma_prep_coherent symbol when an mmu is enabled

arch_dma_prep_coherent

Quoted 4 lines

and not on the coldfire platform. Fix the Kconfig symbol selection up to match this.

Fixes 69878ef47562 ("m68k: Implement arch_dma_prep_coherent()")

Do you know the SHA1 for the other commit, that causes the issue when combined with the above?

Quoted 1 line

arch/m68k/Kconfig config M68K · line 11

Quoted 11 lines
arch/m68k/Kconfig +1 -1
@@ -5,7 +5,7 @@ config M68K
        select ARCH_32BIT_OFF_T
        select ARCH_HAS_BINFMT_FLAT
        select ARCH_HAS_DMA_MMAP_PGPROT if MMU && !COLDFIRE
-       select ARCH_HAS_DMA_PREP_COHERENT
+       select ARCH_HAS_DMA_PREP_COHERENT if HAS_DMA && MMU && !COLDFIRE
        select ARCH_HAS_SYNC_DMA_FOR_DEVICE if HAS_DMA
        select ARCH_MIGHT_HAVE_PC_PARPORT if ISA
        select ARCH_NO_COHERENT_DMA_MMAP if !MMU

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
#2 lore raw
Quoted 8 lines · Geert Uytterhoeven

Hi Christoph,

Quoted 2 lines · Christoph Hellwig

m68k only provides the dma_prep_coherent symbol when an mmu is enabled

arch_dma_prep_coherent

Quoted 7 lines
Quoted 4 lines

and not on the coldfire platform. Fix the Kconfig symbol selection up to match this.

Fixes 69878ef47562 ("m68k: Implement arch_dma_prep_coherent()")

Do you know the SHA1 for the other commit, that causes the issue when combined with the above?

I think the culprit is:

commit c30700db9eaabb35e0b123301df35a6846e6b6b4

Author: Christoph Hellwig <[email protected]>
Date:   Mon Jun 3 08:43:51 2019 +0200

dma-direct: provide generic support for uncached kernel segments

Ad it turns out I can't just apply this fix to the dma-mapping tree because it doesn't have the m68k changes. So either you'll have to queue it up, or I'll have to do secondary pull request to fix up the first one. Maybe it is eiter if you just send it to Linus before I send the dma-mapping PR?

#3 lore raw

Hi Christoph,

Quoted 21 lines · Christoph Hellwig
Quoted 6 lines · Geert Uytterhoeven
Quoted 2 lines · Christoph Hellwig

m68k only provides the dma_prep_coherent symbol when an mmu is enabled

arch_dma_prep_coherent

Quoted 7 lines
Quoted 4 lines

and not on the coldfire platform. Fix the Kconfig symbol selection up to match this.

Fixes 69878ef47562 ("m68k: Implement arch_dma_prep_coherent()")

Do you know the SHA1 for the other commit, that causes the issue when combined with the above?

I think the culprit is:

commit c30700db9eaabb35e0b123301df35a6846e6b6b4

Author: Christoph Hellwig <[email protected]>
Date:   Mon Jun 3 08:43:51 2019 +0200
Quoted 8 lines

dma-direct: provide generic support for uncached kernel segments

Ad it turns out I can't just apply this fix to the dma-mapping tree because it doesn't have the m68k changes. So either you'll have to queue it up, or I'll have to do secondary pull request to fix up the first one. Maybe it is eiter if you just send it to Linus before I send the dma-mapping PR?

OK, will do, after a cycle in next.

I assume you just forgot to add your SoB, and I can add it?

Thanks!

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
#4 lore raw
Quoted 1 line · Geert Uytterhoeven

OK, will do, after a cycle in next.

Thanks. I'll watch your PRs so that I can send the dma-mapping one right after this.

Quoted 1 line

I assume you just forgot to add your SoB, and I can add it?

Yes. And just for the record: