aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/drm/drm_vm.c1
-rw-r--r--drivers/sbus/char/flash.c3
-rw-r--r--drivers/video/fbmem.c8
-rw-r--r--drivers/video/sbuslib.c2
4 files changed, 5 insertions, 9 deletions
diff --git a/drivers/char/drm/drm_vm.c b/drivers/char/drm/drm_vm.c
index 0291cd62c69f..ffd0800ed601 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)
619#endif 619#endif
620 offset = dev->driver->get_reg_ofs(dev); 620 offset = dev->driver->get_reg_ofs(dev);
621#ifdef __sparc__ 621#ifdef __sparc__
622 vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
622 if (io_remap_pfn_range(DRM_RPR_ARG(vma) vma->vm_start, 623 if (io_remap_pfn_range(DRM_RPR_ARG(vma) vma->vm_start,
623 (map->offset + offset) >> PAGE_SHIFT, 624 (map->offset + offset) >> PAGE_SHIFT,
624 vma->vm_end - vma->vm_start, 625 vma->vm_end - vma->vm_start,
diff --git a/drivers/sbus/char/flash.c b/drivers/sbus/char/flash.c
index 6bdd768b731d..2beb3dded087 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)
71 if (vma->vm_end - (vma->vm_start + (vma->vm_pgoff << PAGE_SHIFT)) > size) 71 if (vma->vm_end - (vma->vm_start + (vma->vm_pgoff << PAGE_SHIFT)) > size)
72 size = vma->vm_end - (vma->vm_start + (vma->vm_pgoff << PAGE_SHIFT)); 72 size = vma->vm_end - (vma->vm_start + (vma->vm_pgoff << PAGE_SHIFT));
73 73
74 pgprot_val(vma->vm_page_prot) &= ~(_PAGE_CACHE);
75 pgprot_val(vma->vm_page_prot) |= _PAGE_E;
76 vma->vm_flags |= (VM_SHM | VM_LOCKED); 74 vma->vm_flags |= (VM_SHM | VM_LOCKED);
75 vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
77 76
78 if (io_remap_pfn_range(vma, vma->vm_start, addr, size, vma->vm_page_prot)) 77 if (io_remap_pfn_range(vma, vma->vm_start, addr, size, vma->vm_page_prot))
79 return -EAGAIN; 78 return -EAGAIN;
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 996c7b58564e..07d882b14396 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)
1169 vma->vm_pgoff = off >> PAGE_SHIFT; 1169 vma->vm_pgoff = off >> PAGE_SHIFT;
1170 /* This is an IO map - tell maydump to skip this VMA */ 1170 /* This is an IO map - tell maydump to skip this VMA */
1171 vma->vm_flags |= VM_IO | VM_RESERVED; 1171 vma->vm_flags |= VM_IO | VM_RESERVED;
1172#if defined(__sparc_v9__)
1173 if (io_remap_pfn_range(vma, vma->vm_start, off >> PAGE_SHIFT,
1174 vma->vm_end - vma->vm_start, vma->vm_page_prot))
1175 return -EAGAIN;
1176#else
1177#if defined(__mc68000__) 1172#if defined(__mc68000__)
1178#if defined(CONFIG_SUN3) 1173#if defined(CONFIG_SUN3)
1179 pgprot_val(vma->vm_page_prot) |= SUN3_PAGE_NOCACHE; 1174 pgprot_val(vma->vm_page_prot) |= SUN3_PAGE_NOCACHE;
@@ -1195,7 +1190,7 @@ fb_mmap(struct file *file, struct vm_area_struct * vma)
1195#elif defined(__i386__) || defined(__x86_64__) 1190#elif defined(__i386__) || defined(__x86_64__)
1196 if (boot_cpu_data.x86 > 3) 1191 if (boot_cpu_data.x86 > 3)
1197 pgprot_val(vma->vm_page_prot) |= _PAGE_PCD; 1192 pgprot_val(vma->vm_page_prot) |= _PAGE_PCD;
1198#elif defined(__mips__) 1193#elif defined(__mips__) || defined(__sparc_v9__)
1199 vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); 1194 vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
1200#elif defined(__hppa__) 1195#elif defined(__hppa__)
1201 pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE; 1196 pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE;
@@ -1212,7 +1207,6 @@ fb_mmap(struct file *file, struct vm_area_struct * vma)
1212 if (io_remap_pfn_range(vma, vma->vm_start, off >> PAGE_SHIFT, 1207 if (io_remap_pfn_range(vma, vma->vm_start, off >> PAGE_SHIFT,
1213 vma->vm_end - vma->vm_start, vma->vm_page_prot)) 1208 vma->vm_end - vma->vm_start, vma->vm_page_prot))
1214 return -EAGAIN; 1209 return -EAGAIN;
1215#endif /* !__sparc_v9__ */
1216 return 0; 1210 return 0;
1217#endif /* !sparc32 */ 1211#endif /* !sparc32 */
1218} 1212}
diff --git a/drivers/video/sbuslib.c b/drivers/video/sbuslib.c
index a4d7cc51ce0b..34ef859ee414 100644
--- a/drivers/video/sbuslib.c
+++ b/drivers/video/sbuslib.c
@@ -58,6 +58,8 @@ int sbusfb_mmap_helper(struct sbus_mmap_map *map,
58 /* To stop the swapper from even considering these pages */ 58 /* To stop the swapper from even considering these pages */
59 vma->vm_flags |= (VM_IO | VM_RESERVED); 59 vma->vm_flags |= (VM_IO | VM_RESERVED);
60 60
61 vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
62
61 /* Each page, see which map applies */ 63 /* Each page, see which map applies */
62 for (page = 0; page < size; ){ 64 for (page = 0; page < size; ){
63 map_size = 0; 65 map_size = 0;