diff options
author | Kevin Cernekee <cernekee@gmail.com> | 2010-09-07 15:59:15 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2011-07-25 12:26:53 -0400 |
commit | 565b60de325070ccc54b18346a1238d4fae17954 (patch) | |
tree | 700ad5b99985013e2cee8e0b98912ed1de9b92b7 | |
parent | d0023c4a0af1ff16fe183257682025bfcc068e85 (diff) |
MIPS: Move FIXADDR_TOP into spaces.h
Memory maps and addressing quirks are normally defined in <spaces.h>.
There are already three targets that need to override FIXADDR_TOP, and
others exist. This will be a cleaner approach than adding lots of
ifdefs in fixmap.h .
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Cc: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/1573/
Acked-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | arch/mips/include/asm/fixmap.h | 10 | ||||
-rw-r--r-- | arch/mips/include/asm/mach-bcm63xx/spaces.h | 17 | ||||
-rw-r--r-- | arch/mips/include/asm/mach-generic/spaces.h | 4 | ||||
-rw-r--r-- | arch/mips/include/asm/mach-tx39xx/spaces.h | 17 | ||||
-rw-r--r-- | arch/mips/include/asm/mach-tx49xx/spaces.h | 17 |
5 files changed, 56 insertions, 9 deletions
diff --git a/arch/mips/include/asm/fixmap.h b/arch/mips/include/asm/fixmap.h index 0b89b83e2055..98bcc98cf29b 100644 --- a/arch/mips/include/asm/fixmap.h +++ b/arch/mips/include/asm/fixmap.h | |||
@@ -14,6 +14,7 @@ | |||
14 | #define _ASM_FIXMAP_H | 14 | #define _ASM_FIXMAP_H |
15 | 15 | ||
16 | #include <asm/page.h> | 16 | #include <asm/page.h> |
17 | #include <spaces.h> | ||
17 | #ifdef CONFIG_HIGHMEM | 18 | #ifdef CONFIG_HIGHMEM |
18 | #include <linux/threads.h> | 19 | #include <linux/threads.h> |
19 | #include <asm/kmap_types.h> | 20 | #include <asm/kmap_types.h> |
@@ -67,15 +68,6 @@ enum fixed_addresses { | |||
67 | * the start of the fixmap, and leave one page empty | 68 | * the start of the fixmap, and leave one page empty |
68 | * at the top of mem.. | 69 | * at the top of mem.. |
69 | */ | 70 | */ |
70 | #ifdef CONFIG_BCM63XX | ||
71 | #define FIXADDR_TOP ((unsigned long)(long)(int)0xff000000) | ||
72 | #else | ||
73 | #if defined(CONFIG_CPU_TX39XX) || defined(CONFIG_CPU_TX49XX) | ||
74 | #define FIXADDR_TOP ((unsigned long)(long)(int)(0xff000000 - 0x20000)) | ||
75 | #else | ||
76 | #define FIXADDR_TOP ((unsigned long)(long)(int)0xfffe0000) | ||
77 | #endif | ||
78 | #endif | ||
79 | #define FIXADDR_SIZE (__end_of_fixed_addresses << PAGE_SHIFT) | 71 | #define FIXADDR_SIZE (__end_of_fixed_addresses << PAGE_SHIFT) |
80 | #define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE) | 72 | #define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE) |
81 | 73 | ||
diff --git a/arch/mips/include/asm/mach-bcm63xx/spaces.h b/arch/mips/include/asm/mach-bcm63xx/spaces.h new file mode 100644 index 000000000000..61e750fb4653 --- /dev/null +++ b/arch/mips/include/asm/mach-bcm63xx/spaces.h | |||
@@ -0,0 +1,17 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 1994 - 1999, 2000, 03, 04 Ralf Baechle | ||
7 | * Copyright (C) 2000, 2002 Maciej W. Rozycki | ||
8 | * Copyright (C) 1990, 1999, 2000 Silicon Graphics, Inc. | ||
9 | */ | ||
10 | #ifndef _ASM_BCM63XX_SPACES_H | ||
11 | #define _ASM_BCM63XX_SPACES_H | ||
12 | |||
13 | #define FIXADDR_TOP ((unsigned long)(long)(int)0xff000000) | ||
14 | |||
15 | #include <asm/mach-generic/spaces.h> | ||
16 | |||
17 | #endif /* __ASM_BCM63XX_SPACES_H */ | ||
diff --git a/arch/mips/include/asm/mach-generic/spaces.h b/arch/mips/include/asm/mach-generic/spaces.h index c9fa4b14968d..d7a9efd3a5ce 100644 --- a/arch/mips/include/asm/mach-generic/spaces.h +++ b/arch/mips/include/asm/mach-generic/spaces.h | |||
@@ -82,4 +82,8 @@ | |||
82 | #define PAGE_OFFSET (CAC_BASE + PHYS_OFFSET) | 82 | #define PAGE_OFFSET (CAC_BASE + PHYS_OFFSET) |
83 | #endif | 83 | #endif |
84 | 84 | ||
85 | #ifndef FIXADDR_TOP | ||
86 | #define FIXADDR_TOP ((unsigned long)(long)(int)0xfffe0000) | ||
87 | #endif | ||
88 | |||
85 | #endif /* __ASM_MACH_GENERIC_SPACES_H */ | 89 | #endif /* __ASM_MACH_GENERIC_SPACES_H */ |
diff --git a/arch/mips/include/asm/mach-tx39xx/spaces.h b/arch/mips/include/asm/mach-tx39xx/spaces.h new file mode 100644 index 000000000000..151fe7a1cf1d --- /dev/null +++ b/arch/mips/include/asm/mach-tx39xx/spaces.h | |||
@@ -0,0 +1,17 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 1994 - 1999, 2000, 03, 04 Ralf Baechle | ||
7 | * Copyright (C) 2000, 2002 Maciej W. Rozycki | ||
8 | * Copyright (C) 1990, 1999, 2000 Silicon Graphics, Inc. | ||
9 | */ | ||
10 | #ifndef _ASM_TX39XX_SPACES_H | ||
11 | #define _ASM_TX39XX_SPACES_H | ||
12 | |||
13 | #define FIXADDR_TOP ((unsigned long)(long)(int)0xfefe0000) | ||
14 | |||
15 | #include <asm/mach-generic/spaces.h> | ||
16 | |||
17 | #endif /* __ASM_TX39XX_SPACES_H */ | ||
diff --git a/arch/mips/include/asm/mach-tx49xx/spaces.h b/arch/mips/include/asm/mach-tx49xx/spaces.h new file mode 100644 index 000000000000..0cb10a6f489e --- /dev/null +++ b/arch/mips/include/asm/mach-tx49xx/spaces.h | |||
@@ -0,0 +1,17 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 1994 - 1999, 2000, 03, 04 Ralf Baechle | ||
7 | * Copyright (C) 2000, 2002 Maciej W. Rozycki | ||
8 | * Copyright (C) 1990, 1999, 2000 Silicon Graphics, Inc. | ||
9 | */ | ||
10 | #ifndef _ASM_TX49XX_SPACES_H | ||
11 | #define _ASM_TX49XX_SPACES_H | ||
12 | |||
13 | #define FIXADDR_TOP ((unsigned long)(long)(int)0xfefe0000) | ||
14 | |||
15 | #include <asm/mach-generic/spaces.h> | ||
16 | |||
17 | #endif /* __ASM_TX49XX_SPACES_H */ | ||