summaryrefslogtreecommitdiff
path: root/arch/mips/loongson64
diff options
context:
space:
mode:
authorJiaxun Yang <jiaxun.yang@flygoat.com>2020-12-30 06:39:49 +0300
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>2021-01-04 13:24:17 +0300
commit68324a68fbbe4fd2f2a1dc0ac26059245d0700ab (patch)
treed0f0ecc028113d7fe39c99161ef5c034645e1c94 /arch/mips/loongson64
parente8bb8f28233d88f4ad89fdf83d54bbc4a8ee40f2 (diff)
downloadlinux-68324a68fbbe4fd2f2a1dc0ac26059245d0700ab.tar.xz
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>
Diffstat (limited to 'arch/mips/loongson64')
-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++;