diff options
| -rw-r--r-- | arch/mips/mm/init.c | 9 | ||||
| -rw-r--r-- | include/asm-mips/pgtable.h | 6 |
2 files changed, 13 insertions, 2 deletions
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c index b8cb0dde3af0..09d91505b90c 100644 --- a/arch/mips/mm/init.c +++ b/arch/mips/mm/init.c | |||
| @@ -26,6 +26,7 @@ | |||
| 26 | #include <linux/proc_fs.h> | 26 | #include <linux/proc_fs.h> |
| 27 | #include <linux/pfn.h> | 27 | #include <linux/pfn.h> |
| 28 | 28 | ||
| 29 | #include <asm/asm-offsets.h> | ||
| 29 | #include <asm/bootinfo.h> | 30 | #include <asm/bootinfo.h> |
| 30 | #include <asm/cachectl.h> | 31 | #include <asm/cachectl.h> |
| 31 | #include <asm/cpu.h> | 32 | #include <asm/cpu.h> |
| @@ -498,7 +499,13 @@ unsigned long pgd_current[NR_CPUS]; | |||
| 498 | * different layout ... | 499 | * different layout ... |
| 499 | */ | 500 | */ |
| 500 | #define __page_aligned(order) __attribute__((__aligned__(PAGE_SIZE<<order))) | 501 | #define __page_aligned(order) __attribute__((__aligned__(PAGE_SIZE<<order))) |
| 501 | pgd_t swapper_pg_dir[PTRS_PER_PGD] __page_aligned(PGD_ORDER); | 502 | |
| 503 | /* | ||
| 504 | * gcc 3.3 and older have trouble determining that PTRS_PER_PGD and PGD_ORDER | ||
| 505 | * are constants. So we use the variants from asm-offset.h until that gcc | ||
| 506 | * will officially be retired. | ||
| 507 | */ | ||
| 508 | pgd_t swapper_pg_dir[_PTRS_PER_PGD] __page_aligned(_PGD_ORDER); | ||
| 502 | #ifdef CONFIG_64BIT | 509 | #ifdef CONFIG_64BIT |
| 503 | #ifdef MODULE_START | 510 | #ifdef MODULE_START |
| 504 | pgd_t module_pg_dir[PTRS_PER_PGD] __page_aligned(PGD_ORDER); | 511 | pgd_t module_pg_dir[PTRS_PER_PGD] __page_aligned(PGD_ORDER); |
diff --git a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h index e2fb9dbac3fc..d2ee28156743 100644 --- a/include/asm-mips/pgtable.h +++ b/include/asm-mips/pgtable.h | |||
| @@ -172,7 +172,11 @@ static inline void pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *pt | |||
| 172 | #define PMD_T_LOG2 (__builtin_ffs(sizeof(pmd_t)) - 1) | 172 | #define PMD_T_LOG2 (__builtin_ffs(sizeof(pmd_t)) - 1) |
| 173 | #define PTE_T_LOG2 (__builtin_ffs(sizeof(pte_t)) - 1) | 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. |
