I implemented a driver that interface an owner hardware.
This hardware activates an I/O interrupt to the iMX6 CPU and, through the interrupt handler, the driver read the data from the hardware and save them into a FIFO.
In the same drive a IOCTL function is used by the application program to require the data inserted in the FIFO.
It seems that still active a caching on the FIFO memory buffer because sometimes the data written by the interrupt handler into the FIFO, are not yet available when read by the application program even if the interrupt has already been processed.
If I use iowrite16() end ioread16() functions, to write/read data into/from the FIFO Buffer, instead a memory pointer, the issue is soved. But this is not a performance solution.
How I can sure that in a specific area of allocated memory the caching is not active?