Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Kevin Cernekee and committed by
Ralf Baechle
565b60de d0023c4a

+56 -9
+1 -9
arch/mips/include/asm/fixmap.h
··· 14 14 #define _ASM_FIXMAP_H 15 15 16 16 #include <asm/page.h> 17 + #include <spaces.h> 17 18 #ifdef CONFIG_HIGHMEM 18 19 #include <linux/threads.h> 19 20 #include <asm/kmap_types.h> ··· 68 67 * the start of the fixmap, and leave one page empty 69 68 * at the top of mem.. 70 69 */ 71 - #ifdef CONFIG_BCM63XX 72 - #define FIXADDR_TOP ((unsigned long)(long)(int)0xff000000) 73 - #else 74 - #if defined(CONFIG_CPU_TX39XX) || defined(CONFIG_CPU_TX49XX) 75 - #define FIXADDR_TOP ((unsigned long)(long)(int)(0xff000000 - 0x20000)) 76 - #else 77 - #define FIXADDR_TOP ((unsigned long)(long)(int)0xfffe0000) 78 - #endif 79 - #endif 80 70 #define FIXADDR_SIZE (__end_of_fixed_addresses << PAGE_SHIFT) 81 71 #define FIXADDR_START (FIXADDR_TOP - FIXADDR_SIZE) 82 72
+17
arch/mips/include/asm/mach-bcm63xx/spaces.h
··· 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 */
+4
arch/mips/include/asm/mach-generic/spaces.h
··· 82 82 #define PAGE_OFFSET (CAC_BASE + PHYS_OFFSET) 83 83 #endif 84 84 85 + #ifndef FIXADDR_TOP 86 + #define FIXADDR_TOP ((unsigned long)(long)(int)0xfffe0000) 87 + #endif 88 + 85 89 #endif /* __ASM_MACH_GENERIC_SPACES_H */
+17
arch/mips/include/asm/mach-tx39xx/spaces.h
··· 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 */
+17
arch/mips/include/asm/mach-tx49xx/spaces.h
··· 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 */