summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux-core/ati_pcigart.c4
-rw-r--r--linux-core/drm_vm.c2
-rw-r--r--linux/ati_pcigart.h4
-rw-r--r--linux/drm_vm.h2
4 files changed, 6 insertions, 6 deletions
diff --git a/linux-core/ati_pcigart.c b/linux-core/ati_pcigart.c
index 221ceb6d..9ad49c06 100644
--- a/linux-core/ati_pcigart.c
+++ b/linux-core/ati_pcigart.c
@@ -68,7 +68,7 @@ static unsigned long DRM(ati_alloc_pcigart_table)( void )
page = virt_to_page( address );
for ( i = 0 ; i < ATI_PCIGART_TABLE_PAGES ; i++, page++ ) {
- atomic_inc( &page->count );
+ get_page(page);
SetPageReserved( page );
}
@@ -85,7 +85,7 @@ static void DRM(ati_free_pcigart_table)( unsigned long address )
page = virt_to_page( address );
for ( i = 0 ; i < ATI_PCIGART_TABLE_PAGES ; i++, page++ ) {
- atomic_dec( &page->count );
+ __put_page(page);
ClearPageReserved( page );
}
diff --git a/linux-core/drm_vm.c b/linux-core/drm_vm.c
index 5b975986..a495884d 100644
--- a/linux-core/drm_vm.c
+++ b/linux-core/drm_vm.c
@@ -103,7 +103,7 @@ static __inline__ struct page *DRM(do_vm_nopage)(struct vm_area_struct *vma,
DRM_DEBUG("baddr = 0x%lx page = 0x%p, offset = 0x%lx, count=%d\n",
baddr, __va(agpmem->memory->memory[offset]), offset,
- atomic_read(&page->count));
+ page_count(page));
return page;
}
diff --git a/linux/ati_pcigart.h b/linux/ati_pcigart.h
index 221ceb6d..9ad49c06 100644
--- a/linux/ati_pcigart.h
+++ b/linux/ati_pcigart.h
@@ -68,7 +68,7 @@ static unsigned long DRM(ati_alloc_pcigart_table)( void )
page = virt_to_page( address );
for ( i = 0 ; i < ATI_PCIGART_TABLE_PAGES ; i++, page++ ) {
- atomic_inc( &page->count );
+ get_page(page);
SetPageReserved( page );
}
@@ -85,7 +85,7 @@ static void DRM(ati_free_pcigart_table)( unsigned long address )
page = virt_to_page( address );
for ( i = 0 ; i < ATI_PCIGART_TABLE_PAGES ; i++, page++ ) {
- atomic_dec( &page->count );
+ __put_page(page);
ClearPageReserved( page );
}
diff --git a/linux/drm_vm.h b/linux/drm_vm.h
index 5b975986..a495884d 100644
--- a/linux/drm_vm.h
+++ b/linux/drm_vm.h
@@ -103,7 +103,7 @@ static __inline__ struct page *DRM(do_vm_nopage)(struct vm_area_struct *vma,
DRM_DEBUG("baddr = 0x%lx page = 0x%p, offset = 0x%lx, count=%d\n",
baddr, __va(agpmem->memory->memory[offset]), offset,
- atomic_read(&page->count));
+ page_count(page));
return page;
}