Disable caching on a allocated memory

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Disable caching on a allocated memory

852 次查看
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?

标签 (1)
0 项奖励
回复
1 回复

797 次查看
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 项奖励
回复