diff options
author | Huacai Chen <chenhc@lemote.com> | 2018-11-15 15:53:53 +0800 |
---|---|---|
committer | Paul Burton <paul.burton@mips.com> | 2018-11-20 21:04:17 -0800 |
commit | bb53fdf395eed103f85061bfff3b116cee123895 (patch) | |
tree | 08a5de314f46e6d338833043af143bd391b58ee1 /arch/mips/include/asm/mmzone.h | |
parent | MIPS: Enable Undefined Behavior Sanitizer UBSAN (diff) | |
download | linux-dev-bb53fdf395eed103f85061bfff3b116cee123895.tar.xz linux-dev-bb53fdf395eed103f85061bfff3b116cee123895.zip |
MIPS: c-r4k: Add r4k_blast_scache_node for Loongson-3
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+
Diffstat (limited to 'arch/mips/include/asm/mmzone.h')
-rw-r--r-- | arch/mips/include/asm/mmzone.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/mips/include/asm/mmzone.h b/arch/mips/include/asm/mmzone.h index f085fba41da5..2a0fe1d0eac6 100644 --- a/arch/mips/include/asm/mmzone.h +++ b/arch/mips/include/asm/mmzone.h @@ -9,6 +9,14 @@ #include <asm/page.h> #include <mmzone.h> +#ifndef pa_to_nid +#define pa_to_nid(addr) 0 +#endif + +#ifndef nid_to_addrbase +#define nid_to_addrbase(nid) 0 +#endif + #ifdef CONFIG_DISCONTIGMEM #define pfn_to_nid(pfn) pa_to_nid((pfn) << PAGE_SHIFT) |