diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2007-08-13 12:44:41 +0100 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-08-27 02:16:56 +0100 |
commit | 9975e77df5428a1afff57fd8f76a1bc0bfc247fc (patch) | |
tree | 8ebe240bcbec6c17402ab2c69013fa2106157f48 /arch/mips/mm | |
parent | bdd3ede0e11b5bc2d8424f73fb0219b8236d98bb (diff) | |
download | op-kernel-dev-9975e77df5428a1afff57fd8f76a1bc0bfc247fc.zip op-kernel-dev-9975e77df5428a1afff57fd8f76a1bc0bfc247fc.tar.gz |
[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 b8cb0dd..09d9150 100644 --- a/arch/mips/mm/init.c +++ b/arch/mips/mm/init.c @@ -26,6 +26,7 @@ #include <linux/proc_fs.h> #include <linux/pfn.h> +#include <asm/asm-offsets.h> #include <asm/bootinfo.h> #include <asm/cachectl.h> #include <asm/cpu.h> @@ -498,7 +499,13 @@ unsigned long pgd_current[NR_CPUS]; * different layout ... */ #define __page_aligned(order) __attribute__((__aligned__(PAGE_SIZE<<order))) -pgd_t swapper_pg_dir[PTRS_PER_PGD] __page_aligned(PGD_ORDER); + +/* + * gcc 3.3 and older have trouble determining that PTRS_PER_PGD and PGD_ORDER + * are constants. So we use the variants from asm-offset.h until that gcc + * will officially be retired. + */ +pgd_t swapper_pg_dir[_PTRS_PER_PGD] __page_aligned(_PGD_ORDER); #ifdef CONFIG_64BIT #ifdef MODULE_START pgd_t module_pg_dir[PTRS_PER_PGD] __page_aligned(PGD_ORDER); |