patch-2.4.0-test6 linux/include/asm-sparc/pgtable.h
Next file: linux/include/asm-sparc/softirq.h
Previous file: linux/include/asm-sparc/pgalloc.h
Back to the patch index
Back to the overall index
- Lines: 41
- Date:
Wed Aug 9 13:49:56 2000
- Orig file:
v2.4.0-test5/linux/include/asm-sparc/pgtable.h
- Orig date:
Fri Jul 14 12:12:15 2000
diff -u --recursive --new-file v2.4.0-test5/linux/include/asm-sparc/pgtable.h linux/include/asm-sparc/pgtable.h
@@ -1,4 +1,4 @@
-/* $Id: pgtable.h,v 1.97 2000/07/07 07:33:11 anton Exp $ */
+/* $Id: pgtable.h,v 1.101 2000/08/09 00:00:17 davem Exp $ */
#ifndef _SPARC_PGTABLE_H
#define _SPARC_PGTABLE_H
@@ -147,9 +147,6 @@
extern unsigned long ptr_in_current_pgd;
-/* the no. of pointers that fit on a page: this will go away */
-#define PTRS_PER_PAGE (PAGE_SIZE/sizeof(void*))
-
/* Here is a trick, since mmap.c need the initializer elements for
* protection_map[] to be constant at compile time, I set the following
* to all zeros. I set it to the real values after I link in the
@@ -204,11 +201,11 @@
#define SIZEOF_PTR_LOG2 2
-BTFIXUPDEF_CALL_CONST(unsigned long, pte_pagenr, pte_t)
+BTFIXUPDEF_CALL_CONST(unsigned long, sparc_pte_pagenr, pte_t)
BTFIXUPDEF_CALL_CONST(unsigned long, pmd_page, pmd_t)
BTFIXUPDEF_CALL_CONST(unsigned long, pgd_page, pgd_t)
-#define pte_pagenr(pte) BTFIXUP_CALL(pte_pagenr)(pte)
+#define sparc_pte_pagenr(pte) BTFIXUP_CALL(sparc_pte_pagenr)(pte)
#define pmd_page(pmd) BTFIXUP_CALL(pmd_page)(pmd)
#define pgd_page(pgd) BTFIXUP_CALL(pgd_page)(pgd)
@@ -307,8 +304,8 @@
#define page_pte(page) page_pte_prot(page, __pgprot(0))
/* Permanent address of a page. */
-#define page_address(page) ({ if (!(page)->virtual) BUG(); (page)->virtual; })
-#define pte_page(x) (mem_map+pte_pagenr(x))
+#define page_address(page) ((page)->virtual)
+#define pte_page(x) (mem_map+sparc_pte_pagenr(x))
/*
* Conversion functions: convert a page and protection to a page entry,
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)