summaryrefslogtreecommitdiffstats
path: root/include/asm-arm/pgtable.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-08-08 22:17:26 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-08-08 22:17:26 +0000
commit984760dbf5e48f6224dfe9e26e03536b3d38b6cd (patch)
treea99674322e524c4c90009b3bdae5fab0eebf2094 /include/asm-arm/pgtable.h
parenta7ce7d5e94c98ef5b867f61b2ebecd563f4b6ec9 (diff)
Merge with Linux 2.4.0-test6-pre8.
Diffstat (limited to 'include/asm-arm/pgtable.h')
-rw-r--r--include/asm-arm/pgtable.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/asm-arm/pgtable.h b/include/asm-arm/pgtable.h
index b18e572d0..850ea4139 100644
--- a/include/asm-arm/pgtable.h
+++ b/include/asm-arm/pgtable.h
@@ -80,7 +80,7 @@ extern void __handle_bad_pmd_kernel(pmd_t *pmd);
#define pte_clear(ptep) set_pte((ptep), __pte(0))
#ifndef CONFIG_DISCONTIGMEM
-#define pte_pagenr(pte) ((unsigned long)(((pte_val(pte) - PHYS_OFFSET) >> PAGE_SHIFT)))
+#define pte_page(x) (mem_map + (unsigned long)(((pte_val(pte) - PHYS_OFFSET) >> PAGE_SHIFT)))
#else
/*
* I'm not happy with this - we needlessly convert a physical address
@@ -88,7 +88,7 @@ extern void __handle_bad_pmd_kernel(pmd_t *pmd);
* which, if __va and __pa are expensive causes twice the expense for
* zero gain. --rmk
*/
-#define pte_pagenr(pte) MAP_NR(__va(pte_val(pte)))
+#define pte_page(x) (mem_map + MAP_NR(__va(pte_val(pte))))
#endif
#define pmd_none(pmd) (!pmd_val(pmd))
@@ -99,7 +99,6 @@ extern void __handle_bad_pmd_kernel(pmd_t *pmd);
*/
#define page_address(page) ((page)->virtual)
#define pages_to_mb(x) ((x) >> (20 - PAGE_SHIFT))
-#define pte_page(x) (mem_map + pte_pagenr(x))
/*
* Conversion functions: convert a page and protection to a page entry,