patch-2.2.0-pre9 linux/arch/sparc/mm/srmmu.c

Next file: linux/arch/sparc64/kernel/time.c
Previous file: linux/arch/sparc/kernel/time.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.0-pre8/linux/arch/sparc/mm/srmmu.c linux/arch/sparc/mm/srmmu.c
@@ -470,7 +470,7 @@
 		(unsigned int)ret->pprev_hash = mask & ~tmp;
 		if (!(mask & ~tmp))
 			pte_quicklist = (unsigned long *)ret->next_hash;
-		ret = (struct page *)(PAGE_OFFSET + (ret->map_nr << PAGE_SHIFT) + off);
+		ret = (struct page *)(page_address(ret) + off);
 		pgtable_cache_size--;
 	}
 	spin_unlock(&pte_spinlock);
@@ -508,7 +508,7 @@
 		(unsigned int)ret->pprev_hash = mask & ~tmp;
 		if (!(mask & ~tmp))
 			pgd_quicklist = (unsigned long *)ret->next_hash;
-		ret = (struct page *)(PAGE_OFFSET + (ret->map_nr << PAGE_SHIFT) + off);
+		ret = (struct page *)(page_address(ret) + off);
 		pgd_cache_size--;
 	}
 	spin_unlock(&pgd_spinlock);
@@ -682,7 +682,7 @@
 	spin_lock(&pgd_spinlock);
 	address >>= SRMMU_PGDIR_SHIFT;
 	for (page = (struct page *)pgd_quicklist; page; page = page->next_hash) {
-		pgd_t *pgd = (pgd_t *)(PAGE_OFFSET + (page->map_nr << PAGE_SHIFT));
+		pgd_t *pgd = (pgd_t *)page_address(page);
 		unsigned int mask = (unsigned int)page->pprev_hash;
 		
 		if (mask & 1)
@@ -2817,7 +2817,7 @@
 				page->next_hash = NULL;
 				page->pprev_hash = NULL;
 				pgtable_cache_size -= 16;
-				free_page(PAGE_OFFSET + (page->map_nr << PAGE_SHIFT));
+				__free_page(page);
 				freed++;
 				if (page2)
 					page = page2->next_hash;
@@ -2843,7 +2843,7 @@
 				page->next_hash = NULL;
 				page->pprev_hash = NULL;
 				pgd_cache_size -= 4;
-				free_page(PAGE_OFFSET + (page->map_nr << PAGE_SHIFT));
+				__free_page(page);
 				freed++;
 				if (page2)
 					page = page2->next_hash;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov