summaryrefslogtreecommitdiff
path: root/linux/vm.c
diff options
context:
space:
mode:
authorRik Faith <faith@alephnull.com>2000-08-08 16:04:21 +0000
committerRik Faith <faith@alephnull.com>2000-08-08 16:04:21 +0000
commit8b9363d1b1f7bc40fb68261f7659dea5124f2821 (patch)
tree5292870b287ab2ad5ca0ea71487115b158c6d507 /linux/vm.c
parent9199075a6a975ebcc44aff53fe0f77080c01a30b (diff)
Sync with Linux 2.4.0-test6-pre8
Diffstat (limited to 'linux/vm.c')
-rw-r--r--linux/vm.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/linux/vm.c b/linux/vm.c
index b1f0d49a..d295529b 100644
--- a/linux/vm.c
+++ b/linux/vm.c
@@ -96,13 +96,13 @@ struct page *drm_vm_shm_nopage(struct vm_area_struct *vma,
offset = address - vma->vm_start;
physical = (unsigned long)map->handle + offset;
- atomic_inc(&mem_map[MAP_NR(physical)].count); /* Dec. by kernel */
+ atomic_inc(&virt_to_page(physical)->count); /* Dec. by kernel */
DRM_DEBUG("0x%08lx => 0x%08lx\n", address, physical);
#if LINUX_VERSION_CODE < 0x020317
return physical;
#else
- return mem_map + MAP_NR(physical);
+ return virt_to_page(physical);
#endif
}
@@ -129,13 +129,13 @@ struct page *drm_vm_shm_nopage_lock(struct vm_area_struct *vma,
offset = address - vma->vm_start;
page = offset >> PAGE_SHIFT;
physical = (unsigned long)dev->lock.hw_lock + offset;
- atomic_inc(&mem_map[MAP_NR(physical)].count); /* Dec. by kernel */
+ atomic_inc(&virt_to_page(physical)->count); /* Dec. by kernel */
DRM_DEBUG("0x%08lx (page %lu) => 0x%08lx\n", address, page, physical);
#if LINUX_VERSION_CODE < 0x020317
return physical;
#else
- return mem_map + MAP_NR(physical);
+ return virt_to_page(physical);
#endif
}
@@ -164,13 +164,13 @@ struct page *drm_vm_dma_nopage(struct vm_area_struct *vma,
offset = address - vma->vm_start; /* vm_[pg]off[set] should be 0 */
page = offset >> PAGE_SHIFT;
physical = dma->pagelist[page] + (offset & (~PAGE_MASK));
- atomic_inc(&mem_map[MAP_NR(physical)].count); /* Dec. by kernel */
+ atomic_inc(&virt_to_page(physical)->count); /* Dec. by kernel */
DRM_DEBUG("0x%08lx (page %lu) => 0x%08lx\n", address, page, physical);
#if LINUX_VERSION_CODE < 0x020317
return physical;
#else
- return mem_map + MAP_NR(physical);
+ return virt_to_page(physical);
#endif
}