summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiaxun Yang <jiaxun.yang@flygoat.com>2020-12-30 11:39:49 +0800
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>2021-01-04 11:24:17 +0100
commit68324a68fbbe4fd2f2a1dc0ac26059245d0700ab (patch)
treed0f0ecc028113d7fe39c99161ef5c034645e1c94
parente8bb8f28233d88f4ad89fdf83d54bbc4a8ee40f2 (diff)
downloadlwn-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.c2
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++;