linux-cvs-patches
[Top] [All Lists]

CVS Update@linux-mips.org: linux

To: linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
From: ralf@linux-mips.org
Date: Fri, 11 Feb 2005 22:34:31 +0000
Reply-to: linux-mips@linux-mips.org
Sender: linux-cvs-patches-bounce@linux-mips.org
CVSROOT:        /home/cvs
Module name:    linux
Changes by:     ralf@ftp.linux-mips.org 05/02/11 22:34:24

Modified files:
        include/asm-mips: pgtable-64.h 

Log message:
        Mask out the high address bits which we don't use to index the pgdir
        in pgd_index.  In the past we happened to just get away with because
        all uses where implicitly or explicitly casted to integer thereby
        truncating the unwanted address bits, no longer.

diff -urN linux/include/asm-mips/pgtable-64.h 
linux/include/asm-mips/pgtable-64.h
--- linux/include/asm-mips/pgtable-64.h 2005/02/10 23:49:42     1.19
+++ linux/include/asm-mips/pgtable-64.h 2005/02/11 22:34:24     1.20
@@ -171,7 +171,7 @@
 /* to find an entry in a kernel page-table-directory */
 #define pgd_offset_k(address) pgd_offset(&init_mm, 0)
 
-#define pgd_index(address)             ((address) >> PGDIR_SHIFT)
+#define pgd_index(address)             (((address) >> PGDIR_SHIFT) & 
(PTRS_PER_PGD-1))
 
 /* to find an entry in a page-table-directory */
 #define pgd_offset(mm,addr)    ((mm)->pgd + pgd_index(addr))

<Prev in Thread] Current Thread [Next in Thread>