summaryrefslogtreecommitdiffstats
path: root/include/asm-alpha/pgtable.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-alpha/pgtable.h')
-rw-r--r--include/asm-alpha/pgtable.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/asm-alpha/pgtable.h b/include/asm-alpha/pgtable.h
index a627d50ba..ff8c6e9d1 100644
--- a/include/asm-alpha/pgtable.h
+++ b/include/asm-alpha/pgtable.h
@@ -249,8 +249,9 @@ extern inline pte_t pte_mkyoung(pte_t pte) { pte_val(pte) |= __ACCESS_BITS; retu
#define pgd_offset_k(address) pgd_offset(&init_mm, address)
/* to find an entry in a page-table-directory. */
-#define __pgd_offset(address) ((address >> PGDIR_SHIFT) & (PTRS_PER_PGD-1))
-#define pgd_offset(mm, address) ((mm)->pgd+__pgd_offset(address))
+#define pgd_index(address) ((address >> PGDIR_SHIFT) & PTRS_PER_PGD)
+#define __pgd_offset(address) pgd_index(address)
+#define pgd_offset(mm, address) ((mm)->pgd+pgd_index(address))
/* Find an entry in the second-level page table.. */
extern inline pmd_t * pmd_offset(pgd_t * dir, unsigned long address)