diff options
author | Jiaxun Yang <jiaxun.yang@flygoat.com> | 2020-12-30 11:39:49 +0800 |
---|---|---|
committer | Thomas Bogendoerfer <tsbogend@alpha.franken.de> | 2021-01-04 11:24:17 +0100 |
commit | 68324a68fbbe4fd2f2a1dc0ac26059245d0700ab (patch) | |
tree | d0f0ecc028113d7fe39c99161ef5c034645e1c94 | |
parent | e8bb8f28233d88f4ad89fdf83d54bbc4a8ee40f2 (diff) | |
download | lwn-68324a68fbbe4fd2f2a1dc0ac26059245d0700ab.tar.gz lwn-68324a68fbbe4fd2f2a1dc0ac26059245d0700ab.zip |
MIPS: Loongson64: Set cluster for cores
cluster is required for cacheinfo to set shared_cpu_map correctly.
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Reviewed-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Tested-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Reviewed-by: Huacai Chen <chenhuacai@kernel.org>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
-rw-r--r-- | arch/mips/loongson64/smp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/mips/loongson64/smp.c b/arch/mips/loongson64/smp.c index b8c1fc3158fd..aa6613be270f 100644 --- a/arch/mips/loongson64/smp.c +++ b/arch/mips/loongson64/smp.c @@ -492,6 +492,8 @@ static void __init loongson3_smp_setup(void) __cpu_number_map[i] = num; __cpu_logical_map[num] = i; set_cpu_possible(num, true); + /* Loongson processors are always grouped by 4 */ + cpu_set_cluster(&cpu_data[num], i / 4); num++; } i++; |