Skip to contentSkip to conversation

dma_pool broken on MIPS generic?

DISCUSSION Alexandre Belloni 2 participants 3 messages Nov 9, 2018 MIPS

lore
Share & tools
lore
#0 lore raw

Hello,

I'm working on a (not yet upstreamed) dmaengine driver. While rebasing from v4.19 to v4.20-rc1, I saw that it is not working properly anymore because dma_pool is allocating descriptors in kseg0 which is cached while in v4.19, it was allocating them in kseg1.

Am I missing something to explicitely state that the cache is not dma coherent? How could I track this behaviour change?

Signature · 3 lines
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#1 lore raw
Quoted 9 lines · Alexandre Belloni

Hello,

I'm working on a (not yet upstreamed) dmaengine driver. While rebasing from v4.19 to v4.20-rc1, I saw that it is not working properly anymore because dma_pool is allocating descriptors in kseg0 which is cached while in v4.19, it was allocating them in kseg1.

Am I missing something to explicitely state that the cache is not dma coherent? How could I track this behaviour change?

You probably want this commit:

https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git/commit/?h=mips-fixes&id=d01501f85249848a2497968d46dd46d5c6fe32e6

#2 lore raw
Quoted 8 lines · Christoph Hellwig
Quoted 7 lines · Alexandre Belloni

Hello,

I'm working on a (not yet upstreamed) dmaengine driver. While rebasing from v4.19 to v4.20-rc1, I saw that it is not working properly anymore because dma_pool is allocating descriptors in kseg0 which is cached while in v4.19, it was allocating them in kseg1.

Quoted 6 lines
Quoted 2 lines

Am I missing something to explicitely state that the cache is not dma coherent? How could I track this behaviour change?

You probably want this commit:

https://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git/commit/?h=mips-fixes&id=d01501f85249848a2497968d46dd46d5c6fe32e6

Yep, this helped, thanks a lot!

Signature · 3 lines
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com