diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/drm/drm_vm.c | 1 | ||||
-rw-r--r-- | drivers/sbus/char/flash.c | 3 | ||||
-rw-r--r-- | drivers/video/fbmem.c | 8 | ||||
-rw-r--r-- | drivers/video/sbuslib.c | 2 |
4 files changed, 5 insertions, 9 deletions
diff --git a/drivers/char/drm/drm_vm.c b/drivers/char/drm/drm_vm.c index 0291cd62c69..ffd0800ed60 100644 --- a/drivers/char/drm/drm_vm.c +++ b/drivers/char/drm/drm_vm.c @@ -619,6 +619,7 @@ int drm_mmap(struct file *filp, struct vm_area_struct *vma) #endif offset = dev->driver->get_reg_ofs(dev); #ifdef __sparc__ + vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); if (io_remap_pfn_range(DRM_RPR_ARG(vma) vma->vm_start, (map->offset + offset) >> PAGE_SHIFT, vma->vm_end - vma->vm_start, diff --git a/drivers/sbus/char/flash.c b/drivers/sbus/char/flash.c index 6bdd768b731..2beb3dded08 100644 --- a/drivers/sbus/char/flash.c +++ b/drivers/sbus/char/flash.c @@ -71,9 +71,8 @@ flash_mmap(struct file *file, struct vm_area_struct *vma) if (vma->vm_end - (vma->vm_start + (vma->vm_pgoff << PAGE_SHIFT)) > size) size = vma->vm_end - (vma->vm_start + (vma->vm_pgoff << PAGE_SHIFT)); - pgprot_val(vma->vm_page_prot) &= ~(_PAGE_CACHE); - pgprot_val(vma->vm_page_prot) |= _PAGE_E; vma->vm_flags |= (VM_SHM | VM_LOCKED); + vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); if (io_remap_pfn_range(vma, vma->vm_start, addr, size, vma->vm_page_prot)) return -EAGAIN; diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index 996c7b58564..07d882b1439 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c @@ -1169,11 +1169,6 @@ fb_mmap(struct file *file, struct vm_area_struct * vma) vma->vm_pgoff = off >> PAGE_SHIFT; /* This is an IO map - tell maydump to skip this VMA */ vma->vm_flags |= VM_IO | VM_RESERVED; -#if defined(__sparc_v9__) - if (io_remap_pfn_range(vma, vma->vm_start, off >> PAGE_SHIFT, - vma->vm_end - vma->vm_start, vma->vm_page_prot)) - return -EAGAIN; -#else #if defined(__mc68000__) #if defined(CONFIG_SUN3) pgprot_val(vma->vm_page_prot) |= SUN3_PAGE_NOCACHE; @@ -1195,7 +1190,7 @@ fb_mmap(struct file *file, struct vm_area_struct * vma) #elif defined(__i386__) || defined(__x86_64__) if (boot_cpu_data.x86 > 3) pgprot_val(vma->vm_page_prot) |= _PAGE_PCD; -#elif defined(__mips__) +#elif defined(__mips__) || defined(__sparc_v9__) vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); #elif defined(__hppa__) pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE; @@ -1212,7 +1207,6 @@ fb_mmap(struct file *file, struct vm_area_struct * vma) if (io_remap_pfn_range(vma, vma->vm_start, off >> PAGE_SHIFT, vma->vm_end - vma->vm_start, vma->vm_page_prot)) return -EAGAIN; -#endif /* !__sparc_v9__ */ return 0; #endif /* !sparc32 */ } diff --git a/drivers/video/sbuslib.c b/drivers/video/sbuslib.c index a4d7cc51ce0..34ef859ee41 100644 --- a/drivers/video/sbuslib.c +++ b/drivers/video/sbuslib.c @@ -58,6 +58,8 @@ int sbusfb_mmap_helper(struct sbus_mmap_map *map, /* To stop the swapper from even considering these pages */ vma->vm_flags |= (VM_IO | VM_RESERVED); + vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); + /* Each page, see which map applies */ for (page = 0; page < size; ){ map_size = 0; |