diff options
Diffstat (limited to 'include/asm-mips/pgtable.h')
-rw-r--r-- | include/asm-mips/pgtable.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h index 2e2d70d13ff6..d2ee28156743 100644 --- a/include/asm-mips/pgtable.h +++ b/include/asm-mips/pgtable.h | |||
@@ -168,11 +168,15 @@ 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 | ||
175 | extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; | 175 | /* |
176 | * We used to declare this array with size but gcc 3.3 and older are not able | ||
177 | * to find that this expression is a constant, so the size is dropped. | ||
178 | */ | ||
179 | extern pgd_t swapper_pg_dir[]; | ||
176 | 180 | ||
177 | /* | 181 | /* |
178 | * The following only work if pte_present() is true. | 182 | * The following only work if pte_present() is true. |