[OpenWrt-Devel] [LEDE-DEV] MMAP memory out of sync on AR71xx Rambutan (8devices) board.

Daniel Danzberger daniel at dd-wrt.com
Tue May 29 04:27:45 EDT 2018


I posted the issue on the alsa-devel mailing list and they are pushing a patch
that allows the snd_usb_audio module to pass the parameter use_vmalloc=0.

That causes the snd_usb_audio driver to use DMA coherent memory for the pcm
buffer, which always mmaps() correctly to userspace in all my tests.

The patch is queued for 4.18.

Here is the patch + conversation from alsa-devel:
http://mailman.alsa-project.org/pipermail/alsa-devel/2018-May/136408.html

The problem seems to be memory coherence on MIPS.
I haven't figured out yet, how mmap() can work without issues when the ELF
loader mmaps() libraries for example, but mmap() fails in my mmaptest kernel
module when simply mapping a single page.

As far as I tested, mmap() always works when memory is mapped by the filesystem
code. However, I am going to expand my mmaptest utils to debug this.

There should be a better fix than using DMA coherent memory...


BTW: Is someone using X on the affected MIPS devices ? The problem should exist
there as well, because X heavily relies on mmap() for rendering.

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/listinfo/openwrt-devel



More information about the openwrt-devel mailing list