diff options
author | mdaenzer <mdaenzer> | 2000-09-04 07:21:28 +0000 |
---|---|---|
committer | mdaenzer <mdaenzer> | 2000-09-04 07:21:28 +0000 |
commit | bffb7818692592295d27010ae985ef373ec4e9fb (patch) | |
tree | 8d2078d24634c3cb936f4127a34035fdcc8eaf72 | |
parent | 649d99161257acf031d910a7bbcc469266a453fb (diff) |
merge powerpc and ia64
-rw-r--r-- | xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/vm.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/vm.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/vm.c index 907c44cf5..f3b0ae446 100644 --- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/vm.c +++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/vm.c @@ -250,7 +250,7 @@ int drm_mmap_dma(struct file *filp, struct vm_area_struct *vma) vma->vm_start, vma->vm_end, VM_OFFSET(vma)); /* Length must match exact page count */ - if ((length >> PAGE_SHIFT) != dma->page_count) { + if (!dma || (length >> PAGE_SHIFT) != dma->page_count) { unlock_kernel(); return -EINVAL; } @@ -325,6 +325,9 @@ int drm_mmap(struct file *filp, struct vm_area_struct *vma) } #elif defined(__powerpc__) pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE|_PAGE_GUARDED; +#elif defined(__ia64__) + if (map->type != _DRM_AGP) + vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); #endif vma->vm_flags |= VM_IO; /* not in core dump */ } |