diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2017-06-14 03:50:39 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2017-06-14 03:50:39 +0200 |
commit | de3112ba6a92fc56c8861f7deabb7db1c487e775 (patch) | |
tree | ef19dbc9a57cd1ce2ad82f13f77f8e2801b148fd | |
parent | a92e1d1a8d9a4dcaff3c6dc3d6b47d4b2e341155 (diff) | |
download | pcitool-de3112ba6a92fc56c8861f7deabb7db1c487e775.tar.gz pcitool-de3112ba6a92fc56c8861f7deabb7db1c487e775.tar.bz2 pcitool-de3112ba6a92fc56c8861f7deabb7db1c487e775.tar.xz pcitool-de3112ba6a92fc56c8861f7deabb7db1c487e775.zip |
Only set pgprot_noncached for consistent buffers
-rw-r--r-- | driver/kmem.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/driver/kmem.c b/driver/kmem.c index 522f3bc..c1282be 100644 --- a/driver/kmem.c +++ b/driver/kmem.c @@ -616,8 +616,10 @@ int pcidriver_mmap_kmem(pcidriver_privdata_t *privdata, struct vm_area_struct *v vma->vm_flags |= (VM_RESERVED); + if ((kmem_entry->type&&PCILIB_KMEM_TYPE_MASK) == PCILIB_KMEM_TYPE_CONSISTENT) { // This is coherent memory, so it must not be cached. - vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); + vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); + } mod_info_dbg("Mapping address %08lx / PFN %08lx\n", virt_to_phys((void*)kmem_entry->cpua), |