diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2007-08-13 07:44:41 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-08-26 21:16:56 -0400 |
commit | 9975e77df5428a1afff57fd8f76a1bc0bfc247fc (patch) | |
tree | 8ebe240bcbec6c17402ab2c69013fa2106157f48 /arch/mips/mm | |
parent | bdd3ede0e11b5bc2d8424f73fb0219b8236d98bb (diff) |
[MIPS] Gcc 3.3 build fixes.
Work around gcc 3.3's unability to evaluate that certain expressions indeed
are constant.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/mm')
-rw-r--r-- | arch/mips/mm/init.c | 9 |
1 files changed, 8 insertions, 1 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); |