summaryrefslogtreecommitdiff
path: root/linux/vm.c
diff options
context:
space:
mode:
authorRik Faith <faith@alephnull.com>2000-08-18 13:55:23 +0000
committerRik Faith <faith@alephnull.com>2000-08-18 13:55:23 +0000
commitf0f6509a72abf3a3a0a8f26a35b7a8f3d96cbb9b (patch)
tree2c39842303facee602aba15caba506aaf1383985 /linux/vm.c
parentf75ec3010ad8d15d316f6e6d580c85f9e6b8466e (diff)
Sync with Linux 2.4.0-test7/pre4
Diffstat (limited to 'linux/vm.c')
-rw-r--r--linux/vm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/linux/vm.c b/linux/vm.c
index d295529b..7c5a24bc 100644
--- a/linux/vm.c
+++ b/linux/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;
}
@@ -323,6 +323,9 @@ int drm_mmap(struct file *filp, struct vm_area_struct *vma)
pgprot_val(vma->vm_page_prot) |= _PAGE_PCD;
pgprot_val(vma->vm_page_prot) &= ~_PAGE_PWT;
}
+#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 */
}