Disable caching on a allocated memory

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Disable caching on a allocated memory

404 Views
doriano
Contributor I

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?

Labels (1)
0 Kudos
1 Reply

349 Views
Yuri
NXP Employee
NXP Employee

Hello,

Please refer to the following general information about

Linux memory allocation function.

http://events.linuxfoundation.org/sites/events/files/slides/20140429-dma.pdf

kmalloc()

  Also, You may refer to the following :

imx53 video DMA memory fragmentation


Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos