aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/mm/init.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2007-08-13 07:44:41 -0400
committerRalf Baechle <ralf@linux-mips.org>2007-08-26 21:16:56 -0400
commit9975e77df5428a1afff57fd8f76a1bc0bfc247fc (patch)
tree8ebe240bcbec6c17402ab2c69013fa2106157f48 /arch/mips/mm/init.c
parentbdd3ede0e11b5bc2d8424f73fb0219b8236d98bb (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/init.c')
-rw-r--r--arch/mips/mm/init.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index b8cb0dde3af..09d91505b90 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)))
501pgd_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 */
508pgd_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
504pgd_t module_pg_dir[PTRS_PER_PGD] __page_aligned(PGD_ORDER); 511pgd_t module_pg_dir[PTRS_PER_PGD] __page_aligned(PGD_ORDER);