[x86] add rootwait option to the kernel command line (#6209)
[openwrt.git] / target / linux / generic-2.6 / patches-2.6.21 / 31-use_kbuild.h.patch
1 [MIPS] Fix computation of {PGD,PMD,PTE}_T_LOG2.
2
3 For the generation of asm-offset.h to work these need to be evaulatable
4 by gcc as a constant expression. This issue did exist for a while but
5 didn't bite because they're only in asm-offset.h for debugging purposes.
6
7 --- a/include/asm-mips/pgtable.h
8 +++ b/include/asm-mips/pgtable.h
9 @@ -168,9 +168,9 @@ static inline void pte_clear(struct mm_s
10 #define set_pud(pudptr, pudval) do { *(pudptr) = (pudval); } while(0)
11 #endif
12
13 -#define PGD_T_LOG2 ffz(~sizeof(pgd_t))
14 -#define PMD_T_LOG2 ffz(~sizeof(pmd_t))
15 -#define PTE_T_LOG2 ffz(~sizeof(pte_t))
16 +#define PGD_T_LOG2 (__builtin_ffs(sizeof(pgd_t)) - 1)
17 +#define PMD_T_LOG2 (__builtin_ffs(sizeof(pmd_t)) - 1)
18 +#define PTE_T_LOG2 (__builtin_ffs(sizeof(pte_t)) - 1)
19
20 extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
21
This page took 0.04211 seconds and 5 git commands to generate.