Tool/software: Linux
I am using Linux and mapping memory for uio. I want to map memory so that write through cache is used. I think the processor would support it. I use now:
vma->vm_page_prot=__pgprot_modify(vma->vm_page_prot, L_PTE_MT_MASK, L_PTE_MT_DEV_SHARED|L_PTE_SHARED);
result= remap_pfn_range(vma,
vma->vm_start,
idev->info->mem[mi].addr >> PAGE_SHIFT,
vma->vm_end - vma->vm_start,
vma->vm_page_prot);
which results in no cache used. if I use " L_PTE_MT_DEV_SHARED|L_PTE_SHARED|L_PTE_MT_WRITETHROUGH", I have slower memory access, for read and write. I would expect write-access being the same, but read being much faster if I read the same memory several times.