Squashed backup commit (no shallow-clone history issues) of xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2 branch, upstream commit 9eece662e) plus all fixes applied to get everpal_defconfig building clean against a modern (GCC 15.2.0) toolchain -- see the previous commit message on the lineage-23.2 branch (also in this repo history is not available here since this is a squashed snapshot; full incremental history lives in the local DL380 checkout and the upstream GitHub remote). Upstream: https://github.com/xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2)
67 lines
1.4 KiB
C
67 lines
1.4 KiB
C
/*
|
|
* This file is subject to the terms and conditions of the GNU General Public
|
|
* License. See the file "COPYING" in the main directory of this archive
|
|
* for more details.
|
|
*
|
|
* Copyright (C) 2005 Embedded Alley Solutions, Inc
|
|
* Copyright (C) 2005 Ralf Baechle (ralf@linux-mips.org)
|
|
* Copyright (C) 2009 Jiajie Chen (chenjiajie@cse.buaa.edu.cn)
|
|
* Copyright (C) 2012 Huacai Chen (chenhc@lemote.com)
|
|
*/
|
|
#ifndef __ASM_MACH_LOONGSON64_KERNEL_ENTRY_H
|
|
#define __ASM_MACH_LOONGSON64_KERNEL_ENTRY_H
|
|
|
|
/*
|
|
* Override macros used in arch/mips/kernel/head.S.
|
|
*/
|
|
.macro kernel_entry_setup
|
|
#ifdef CONFIG_CPU_LOONGSON3
|
|
.set push
|
|
.set mips64
|
|
/* Set LPA on LOONGSON3 config3 */
|
|
mfc0 t0, $16, 3
|
|
or t0, (0x1 << 7)
|
|
mtc0 t0, $16, 3
|
|
/* Set ELPA on LOONGSON3 pagegrain */
|
|
mfc0 t0, $5, 1
|
|
or t0, (0x1 << 29)
|
|
mtc0 t0, $5, 1
|
|
#ifdef CONFIG_LOONGSON3_ENHANCEMENT
|
|
/* Enable STFill Buffer */
|
|
mfc0 t0, $16, 6
|
|
or t0, 0x100
|
|
mtc0 t0, $16, 6
|
|
#endif
|
|
_ehb
|
|
.set pop
|
|
#endif
|
|
.endm
|
|
|
|
/*
|
|
* Do SMP slave processor setup.
|
|
*/
|
|
.macro smp_slave_setup
|
|
#ifdef CONFIG_CPU_LOONGSON3
|
|
.set push
|
|
.set mips64
|
|
/* Set LPA on LOONGSON3 config3 */
|
|
mfc0 t0, $16, 3
|
|
or t0, (0x1 << 7)
|
|
mtc0 t0, $16, 3
|
|
/* Set ELPA on LOONGSON3 pagegrain */
|
|
mfc0 t0, $5, 1
|
|
or t0, (0x1 << 29)
|
|
mtc0 t0, $5, 1
|
|
#ifdef CONFIG_LOONGSON3_ENHANCEMENT
|
|
/* Enable STFill Buffer */
|
|
mfc0 t0, $16, 6
|
|
or t0, 0x100
|
|
mtc0 t0, $16, 6
|
|
#endif
|
|
_ehb
|
|
.set pop
|
|
#endif
|
|
.endm
|
|
|
|
#endif /* __ASM_MACH_LOONGSON64_KERNEL_ENTRY_H */
|