Hello, I am trying to use dma_mmap_attrs . However I keep getting the following error: mmap:6420 map pfn RAM range req uncached-minus for [mem 0xfd0000000-0xfd0000fff], got write-back Assuming that dma_common_map is used (http://lxr.free-electrons.com/source/drivers/base/dma-mapping.c#L246) I tracked the error source to be comming from: remap_pfn_range After struding the codeflow I think that this macro is the culprit: 12 #define pgprot_noncached(prot) \ 13 ((boot_cpu_data.x86 > 3) \ 14 ? (__pgprot(pgprot_val(prot) | \ 15 cachemode2protval(_PAGE_CACHE_MODE_UC_MINUS))) \ 16 : (prot)) since the "got write-back" is calculated from the memory address I assume I can not change that bit. Could anyone explain to me, why the page protection depends on boot_cpu_data? Googling turned up further hints http://comments.gmane.org/gmane.linux.kernel.mm/125059. Is this a Bug or am I missing something? How do I correctly use dma_mmap_attrs? Currently I try: mmap function: return dma_mmap_attrs(&pcidev->dev, vma, buffer->memoryAddress, buffer->dmaAddress, BUF_SIZE, 0); testfile: char* fpath = "/proc/myDevice";Thanks for any help, Malte |
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies