mirror of
https://github.com/torvalds/linux.git
synced 2026-11-27 08:52:27 +00:00
Multiple Loongson-3A chips can be interconnected with HT0-bus. This is a CC-NUMA system that every chip (node) has its own local memory and cache coherency is maintained by hardware. The 64-bit physical memory address format is as follows: 0x-0000-YZZZ-ZZZZ-ZZZZ The high 16 bits should be 0, which means the real physical address supported by Loongson-3 is 48-bit. The "Y" bits is the base address of each node, which can be also considered as the node-id. The "Z" bits is the address offset within a node, which means every node has a 44 bits address space. Macros XPHYSADDR and MAX_PHYSMEM_BITS are modified unconditionally, because many other MIPS CPUs have also extended their address spaces. Signed-off-by: Huacai Chen <[email protected]> Cc: John Crispin <[email protected]> Cc: Steven J. Hill <[email protected]> Cc: Aurelien Jarno <[email protected]> Cc: [email protected] Cc: Fuxin Zhang <[email protected]> Cc: Zhangjin Wu <[email protected]> Patchwork: https://patchwork.linux-mips.org/patch/7187/ Signed-off-by: Ralf Baechle <[email protected]>
53 lines
1.2 KiB
C
53 lines
1.2 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 ([email protected])
|
|
* Copyright (C) 2009 Jiajie Chen ([email protected])
|
|
* Copyright (C) 2012 Huacai Chen ([email protected])
|
|
*/
|
|
#ifndef __ASM_MACH_LOONGSON_KERNEL_ENTRY_H
|
|
#define __ASM_MACH_LOONGSON_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 */
|
|
li t0, (0x1 << 29)
|
|
mtc0 t0, $5, 1
|
|
_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 */
|
|
li t0, (0x1 << 29)
|
|
mtc0 t0, $5, 1
|
|
_ehb
|
|
.set pop
|
|
#endif
|
|
.endm
|
|
|
|
#endif /* __ASM_MACH_LOONGSON_KERNEL_ENTRY_H */
|