aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/drm')
-rw-r--r--drivers/char/drm/drm_bufs.c4
-rw-r--r--drivers/char/drm/drm_vm.c16
2 files changed, 10 insertions, 10 deletions
diff --git a/drivers/char/drm/drm_bufs.c b/drivers/char/drm/drm_bufs.c
index b70802035d9e..e0743ebbe4bd 100644
--- a/drivers/char/drm/drm_bufs.c
+++ b/drivers/char/drm/drm_bufs.c
@@ -152,7 +152,7 @@ int drm_addmap(drm_device_t * dev, unsigned int offset,
152 switch ( map->type ) { 152 switch ( map->type ) {
153 case _DRM_REGISTERS: 153 case _DRM_REGISTERS:
154 case _DRM_FRAME_BUFFER: 154 case _DRM_FRAME_BUFFER:
155#if !defined(__sparc__) && !defined(__alpha__) && !defined(__ia64__) 155#if !defined(__sparc__) && !defined(__alpha__) && !defined(__ia64__) && !defined(__powerpc64__) && !defined(__x86_64__)
156 if ( map->offset + map->size < map->offset || 156 if ( map->offset + map->size < map->offset ||
157 map->offset < virt_to_phys(high_memory) ) { 157 map->offset < virt_to_phys(high_memory) ) {
158 drm_free( map, sizeof(*map), DRM_MEM_MAPS ); 158 drm_free( map, sizeof(*map), DRM_MEM_MAPS );
@@ -309,7 +309,7 @@ int drm_addmap_ioctl(struct inode *inode, struct file *filp,
309 if (put_user(handle, &argp->handle)) 309 if (put_user(handle, &argp->handle))
310 return -EFAULT; 310 return -EFAULT;
311 return 0; 311 return 0;
312 } 312}
313 313
314 314
315/** 315/**
diff --git a/drivers/char/drm/drm_vm.c b/drivers/char/drm/drm_vm.c
index 292fa7167b26..ced4215e2275 100644
--- a/drivers/char/drm/drm_vm.c
+++ b/drivers/char/drm/drm_vm.c
@@ -578,17 +578,17 @@ int drm_mmap(struct file *filp, struct vm_area_struct *vma)
578 /* fall through to _DRM_FRAME_BUFFER... */ 578 /* fall through to _DRM_FRAME_BUFFER... */
579 case _DRM_FRAME_BUFFER: 579 case _DRM_FRAME_BUFFER:
580 case _DRM_REGISTERS: 580 case _DRM_REGISTERS:
581 if (map->offset >= __pa(high_memory)) {
582#if defined(__i386__) || defined(__x86_64__) 581#if defined(__i386__) || defined(__x86_64__)
583 if (boot_cpu_data.x86 > 3 && map->type != _DRM_AGP) { 582 if (boot_cpu_data.x86 > 3 && map->type != _DRM_AGP) {
584 pgprot_val(vma->vm_page_prot) |= _PAGE_PCD; 583 pgprot_val(vma->vm_page_prot) |= _PAGE_PCD;
585 pgprot_val(vma->vm_page_prot) &= ~_PAGE_PWT; 584 pgprot_val(vma->vm_page_prot) &= ~_PAGE_PWT;
586 } 585 }
587#elif defined(__powerpc__) 586#elif defined(__powerpc__)
588 pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE | _PAGE_GUARDED; 587 pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE;
588 if (map->type == _DRM_REGISTERS)
589 pgprot_val(vma->vm_page_prot) |= _PAGE_GUARDED;
589#endif 590#endif
590 vma->vm_flags |= VM_IO; /* not in core dump */ 591 vma->vm_flags |= VM_IO; /* not in core dump */
591 }
592#if defined(__ia64__) 592#if defined(__ia64__)
593 if (efi_range_is_wc(vma->vm_start, vma->vm_end - 593 if (efi_range_is_wc(vma->vm_start, vma->vm_end -
594 vma->vm_start)) 594 vma->vm_start))