I am running into a strange problem with the SHMIQ driver. I am
allocating a set of pages in the kernel space with vmalloc and then
mapping those pages into the user address space by loading the page
tables for the process with pointers to this region.
This is needed, since the kernel should be able to put new values
into the shmiq and the userland process can just be busy-waiting for
changes to the head/tail pointers in the SHMIQ.
Now, I marked the pages as being non-cachable for both the kernel
and the userland, but still, some changes made by the kernel to the
shared region are not picked up by the userland program.
Note that the userland program always detects when the kernel has
moved the tail of the shmiq, but when actually accessing the event,
sometimes I get zeros on an event that should have other values).
According to a book I got here, the r4000 uses a direct mapped
virtual cache and I was concerned that the aliasing problems may come
up in this case, so the question is: do I have to flush the caches
even if my pages have the non-cacheable bits turned on for both sides?