On 2010-05-31 14:52, Nori, Sekhar wrote:
On Wed, May 26, 2010 at 19:04:40, Thomas Lange wrote:
Short version:
mmap does not work for me. I don't think data cache is flushed
before and after user space process runs which makes kernel and
user space see different data due to dirty cache lines.
Long version:
I could not get mmap to work properly on my davinci board.
I have narrowed the problem down to a simple test case that
fails every time on my EVM6446 board.
Test code attached along with console test logs.
I would be happy to get confirmation that I have implemented
the mmap driver correctly and that the problem really is with
the kernel itself.
Test description
----------------
1) Kernel module sets a variable in mmap:ed structure.
2) Module awakens user space process.
3) User space sees the _old_ data in mmap:ed structure.
4) User space calls a system function (syslog).
5) Now user space see the updated data.
What is the reason for exposing the kernel data
structure to userspace though mmap? Typically it
is only used for IO data.
My original code handles transfer of large amounts of data from DSP to
ethernet. Timing critical stuff is handled in kernel. User space handles
socket setup, supervision, write etc. They need to exchange state information
and other data.
But the relevant question here is why mmap does not work as advertised. It seems
that there are dirty dcache issues with dm644x and mmap.
Perhaps more ARM:s are affected?
/T
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source