Module: xenomai-forge Branch: next Commit: 225f242a81d811398dad83b79ecb4c3193335e44 URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=225f242a81d811398dad83b79ecb4c3193335e44
Author: Philippe Gerum <r...@xenomai.org> Date: Thu Aug 7 14:50:48 2014 +0200 cobalt/kernel/heap: drop superfluous argument from xnheap_remap_io_page_range() --- include/cobalt/kernel/heap.h | 3 +-- kernel/cobalt/heap.c | 8 ++++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/include/cobalt/kernel/heap.h b/include/cobalt/kernel/heap.h index 14221e6..25b8213 100644 --- a/include/cobalt/kernel/heap.h +++ b/include/cobalt/kernel/heap.h @@ -248,8 +248,7 @@ int xnheap_remap_vm_page(struct vm_area_struct *vma, struct file; struct vm_area_struct; -int xnheap_remap_io_page_range(struct file *filp, - struct vm_area_struct *vma, +int xnheap_remap_io_page_range(struct vm_area_struct *vma, unsigned long from, phys_addr_t to, unsigned long size, pgprot_t prot); diff --git a/kernel/cobalt/heap.c b/kernel/cobalt/heap.c index 1ea12af..db22517 100644 --- a/kernel/cobalt/heap.c +++ b/kernel/cobalt/heap.c @@ -1154,7 +1154,7 @@ static int xnheap_mmap(struct file *file, struct vm_area_struct *vma) vaddr += PAGE_SIZE; size -= PAGE_SIZE; } - } else if (xnheap_remap_io_page_range(file,vma, + } else if (xnheap_remap_io_page_range(vma, vma->vm_start, __pa(vaddr), size, vma->vm_page_prot)) @@ -1334,13 +1334,13 @@ int xnheap_remap_vm_page(struct vm_area_struct *vma, #endif } -int xnheap_remap_io_page_range(struct file *filp, - struct vm_area_struct *vma, +int xnheap_remap_io_page_range(struct vm_area_struct *vma, unsigned long from, phys_addr_t to, unsigned long size, pgprot_t prot) { #ifdef __HAVE_PHYS_MEM_ACCESS_PROT - prot = phys_mem_access_prot(filp, to >> PAGE_SHIFT, size, prot); + if (vma->vm_file) + prot = phys_mem_access_prot(vma->vm_file, to >> PAGE_SHIFT, size, prot); #endif vma->vm_page_prot = pgprot_noncached(prot); /* Sets VM_RESERVED | VM_IO | VM_PFNMAP on the vma. */ _______________________________________________ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git