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
6 * Copyright (C) 2005 Embedded Alley Solutions, Inc
7 * Copyright (C) 2005 Ralf Baechle (ralf@linux-mips.org)
8 * Copyright (C) 2009 Jiajie Chen (chenjiajie@cse.buaa.edu.cn)
9 * Copyright (C) 2012 Huacai Chen (chenhc@lemote.com)
11 #ifndef __ASM_MACH_LOONGSON64_KERNEL_ENTRY_H
12 #define __ASM_MACH_LOONGSON64_KERNEL_ENTRY_H
17 * Override macros used in arch/mips/kernel/head.S.
19 .macro kernel_entry_setup
20 #ifdef CONFIG_CPU_LOONGSON3
23 /* Set LPA on LOONGSON3 config3 */
27 /* Set ELPA on LOONGSON3 pagegrain */
28 mfc0 t0, CP0_PAGEGRAIN
30 mtc0 t0, CP0_PAGEGRAIN
31 /* Enable STFill Buffer */
33 andi t0, (PRID_IMP_MASK | PRID_REV_MASK)
34 slti t0, (PRID_IMP_LOONGSON_64 | PRID_REV_LOONGSON3A_R2_0)
46 * Do SMP slave processor setup.
48 .macro smp_slave_setup
49 #ifdef CONFIG_CPU_LOONGSON3
52 /* Set LPA on LOONGSON3 config3 */
56 /* Set ELPA on LOONGSON3 pagegrain */
57 mfc0 t0, CP0_PAGEGRAIN
59 mtc0 t0, CP0_PAGEGRAIN
60 /* Enable STFill Buffer */
62 andi t0, (PRID_IMP_MASK | PRID_REV_MASK)
63 slti t0, (PRID_IMP_LOONGSON_64 | PRID_REV_LOONGSON3A_R2_0)
74 #endif /* __ASM_MACH_LOONGSON64_KERNEL_ENTRY_H */