mmap cached memory mapped io in user space

ali soleimanidehdivan ali.soleimani.dehdivan at gmail.com
Sat Feb 14 09:10:30 PST 2015


i need to cache data for sending to memory mapped io device because
device is using axi full protocol. i write data to cache and then
flush it so data is written using burst mode

i did some research and finnally i add this lines

#define pgprot_devcached(prot) \
    __pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_DEV_CACHED)

to arch/arm/include/asm/pgtable.h.

but this doesn't work good actually it works for just first burst. if
your data is bigger than a burst it doesn't work and just send first
burst. how can i use cache for data bigger than a burst. i done it in
standalone os from xilinx but i stuck on it in linux. my platform is
zynq.

p.s: i know i can use ioremap_cache but i want to full buffer from
user space and performance is critical in this situation.



More information about the linux-arm-kernel mailing list