aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-mips/pgtable.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2007-08-01 10:25:28 -0400
committerRalf Baechle <ralf@linux-mips.org>2007-08-26 21:16:48 -0400
commit5ff974720abec255c17af6f3732dd410d364e367 (patch)
tree8656406ff66bd84058eddb8bbd1d7e5473985a43 /include/asm-mips/pgtable.h
parent4c8081e4696c7afc61930e4a49a6fa55c545b7e0 (diff)
[MIPS] Fix computation of {PGD,PMD,PTE}_T_LOG2.
For the generation of asm-offset.h to work these need to be evaulatable by gcc as a constant expression. This issue did exist for a while but didn't bite because they're only in asm-offset.h for debugging purposes. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'include/asm-mips/pgtable.h')
-rw-r--r--include/asm-mips/pgtable.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h
index 2e2d70d13ff6..e2fb9dbac3fc 100644
--- a/include/asm-mips/pgtable.h
+++ b/include/asm-mips/pgtable.h
@@ -168,9 +168,9 @@ static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *pt
168#define set_pud(pudptr, pudval) do { *(pudptr) = (pudval); } while(0) 168#define set_pud(pudptr, pudval) do { *(pudptr) = (pudval); } while(0)
169#endif 169#endif
170 170
171#define PGD_T_LOG2 ffz(~sizeof(pgd_t)) 171#define PGD_T_LOG2 (__builtin_ffs(sizeof(pgd_t)) - 1)
172#define PMD_T_LOG2 ffz(~sizeof(pmd_t)) 172#define PMD_T_LOG2 (__builtin_ffs(sizeof(pmd_t)) - 1)
173#define PTE_T_LOG2 ffz(~sizeof(pte_t)) 173#define PTE_T_LOG2 (__builtin_ffs(sizeof(pte_t)) - 1)
174 174
175extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; 175extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
176 176