diff options
Diffstat (limited to 'drivers/char/drm/drm_vm.c')
-rw-r--r-- | drivers/char/drm/drm_vm.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/char/drm/drm_vm.c b/drivers/char/drm/drm_vm.c index ffd0800ed601..afb4f0a44b81 100644 --- a/drivers/char/drm/drm_vm.c +++ b/drivers/char/drm/drm_vm.c | |||
@@ -75,7 +75,7 @@ static __inline__ struct page *drm_do_vm_nopage(struct vm_area_struct *vma, | |||
75 | map = r_list->map; | 75 | map = r_list->map; |
76 | if (!map) | 76 | if (!map) |
77 | continue; | 77 | continue; |
78 | if (r_list->user_token == VM_OFFSET(vma)) | 78 | if (r_list->user_token == (vma->vm_pgoff << PAGE_SHIFT)) |
79 | break; | 79 | break; |
80 | } | 80 | } |
81 | 81 | ||
@@ -467,7 +467,7 @@ static int drm_mmap_dma(struct file *filp, struct vm_area_struct *vma) | |||
467 | dev = priv->head->dev; | 467 | dev = priv->head->dev; |
468 | dma = dev->dma; | 468 | dma = dev->dma; |
469 | DRM_DEBUG("start = 0x%lx, end = 0x%lx, offset = 0x%lx\n", | 469 | DRM_DEBUG("start = 0x%lx, end = 0x%lx, offset = 0x%lx\n", |
470 | vma->vm_start, vma->vm_end, VM_OFFSET(vma)); | 470 | vma->vm_start, vma->vm_end, vma->vm_pgoff << PAGE_SHIFT); |
471 | 471 | ||
472 | /* Length must match exact page count */ | 472 | /* Length must match exact page count */ |
473 | if (!dma || (length >> PAGE_SHIFT) != dma->page_count) { | 473 | if (!dma || (length >> PAGE_SHIFT) != dma->page_count) { |
@@ -526,7 +526,7 @@ int drm_mmap(struct file *filp, struct vm_area_struct *vma) | |||
526 | struct list_head *list; | 526 | struct list_head *list; |
527 | 527 | ||
528 | DRM_DEBUG("start = 0x%lx, end = 0x%lx, offset = 0x%lx\n", | 528 | DRM_DEBUG("start = 0x%lx, end = 0x%lx, offset = 0x%lx\n", |
529 | vma->vm_start, vma->vm_end, VM_OFFSET(vma)); | 529 | vma->vm_start, vma->vm_end, vma->vm_pgoff << PAGE_SHIFT); |
530 | 530 | ||
531 | if (!priv->authenticated) | 531 | if (!priv->authenticated) |
532 | return -EACCES; | 532 | return -EACCES; |
@@ -535,7 +535,7 @@ int drm_mmap(struct file *filp, struct vm_area_struct *vma) | |||
535 | * the AGP mapped at physical address 0 | 535 | * the AGP mapped at physical address 0 |
536 | * --BenH. | 536 | * --BenH. |
537 | */ | 537 | */ |
538 | if (!VM_OFFSET(vma) | 538 | if (!(vma->vm_pgoff << PAGE_SHIFT) |
539 | #if __OS_HAS_AGP | 539 | #if __OS_HAS_AGP |
540 | && (!dev->agp | 540 | && (!dev->agp |
541 | || dev->agp->agp_info.device->vendor != PCI_VENDOR_ID_APPLE) | 541 | || dev->agp->agp_info.device->vendor != PCI_VENDOR_ID_APPLE) |
@@ -556,7 +556,7 @@ int drm_mmap(struct file *filp, struct vm_area_struct *vma) | |||
556 | map = r_list->map; | 556 | map = r_list->map; |
557 | if (!map) | 557 | if (!map) |
558 | continue; | 558 | continue; |
559 | if (r_list->user_token == VM_OFFSET(vma)) | 559 | if (r_list->user_token == vma->vm_pgoff << PAGE_SHIFT) |
560 | break; | 560 | break; |
561 | } | 561 | } |
562 | 562 | ||
@@ -620,7 +620,7 @@ int drm_mmap(struct file *filp, struct vm_area_struct *vma) | |||
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 | vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); |
623 | if (io_remap_pfn_range(DRM_RPR_ARG(vma) vma->vm_start, | 623 | if (io_remap_pfn_range(vma, vma->vm_start, |
624 | (map->offset + offset) >> PAGE_SHIFT, | 624 | (map->offset + offset) >> PAGE_SHIFT, |
625 | vma->vm_end - vma->vm_start, | 625 | vma->vm_end - vma->vm_start, |
626 | vma->vm_page_prot)) | 626 | vma->vm_page_prot)) |