MIPS: c-r4k: Add r4k_blast_scache_node for Loongson-3
authorHuacai Chen <chenhc@lemote.com>
Thu, 15 Nov 2018 07:53:53 +0000 (15:53 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Jan 2019 16:14:52 +0000 (17:14 +0100)
commit95168354276caa4f254a5d6829b5d2c10edbe677
tree04674a96eac3295726402a643f2b2e03ab07d20b
parent2713b8fd7ef6e8fc5048eee0837b837c7bd1adbc
MIPS: c-r4k: Add r4k_blast_scache_node for Loongson-3

commit bb53fdf395eed103f85061bfff3b116cee123895 upstream.

For multi-node Loongson-3 (NUMA configuration), r4k_blast_scache() can
only flush Node-0's scache. So we add r4k_blast_scache_node() by using
(CAC_BASE | (node_id << NODE_ADDRSPACE_SHIFT)) instead of CKSEG0 as the
start address.

Signed-off-by: Huacai Chen <chenhc@lemote.com>
[paul.burton@mips.com: Include asm/mmzone.h from asm/r4kcache.h for
       nid_to_addrbase(). Add asm/mach-generic/mmzone.h
       to allow inclusion for all platforms.]
Signed-off-by: Paul Burton <paul.burton@mips.com>
Patchwork: https://patchwork.linux-mips.org/patch/21129/
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: James Hogan <james.hogan@mips.com>
Cc: Steven J . Hill <Steven.Hill@cavium.com>
Cc: linux-mips@linux-mips.org
Cc: Fuxin Zhang <zhangfx@lemote.com>
Cc: Zhangjin Wu <wuzhangjin@gmail.com>
Cc: <stable@vger.kernel.org> # 3.15+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/mips/include/asm/mach-generic/mmzone.h [new file with mode: 0644]
arch/mips/include/asm/mach-loongson64/mmzone.h
arch/mips/include/asm/mmzone.h
arch/mips/include/asm/r4kcache.h
arch/mips/mm/c-r4k.c