patch-2.3.45 linux/include/asm-sparc64/pgtable.h

Next file: linux/include/linux/adfs_fs_i.h
Previous file: linux/include/asm-sparc64/floppy.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.44/linux/include/asm-sparc64/pgtable.h linux/include/asm-sparc64/pgtable.h
@@ -235,7 +235,8 @@
 }
 
 /* to find an entry in a page-table-directory. */
-#define pgd_offset(mm, address) ((mm)->pgd + ((address >> PGDIR_SHIFT) & (PTRS_PER_PGD)))
+#define pgd_index(address)	(((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD))
+#define pgd_offset(mm, address)	((mm)->pgd + pgd_index(address))
 
 /* to find an entry in a kernel page-table-directory */
 #define pgd_offset_k(address) pgd_offset(&init_mm, address)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)