MIPS: Loongson-3: Fix SMP_ASK_C0COUNT IPI handler
authorHuacai Chen <[email protected]>
Thu, 21 Jan 2016 13:09:49 +0000 (21:09 +0800)
committerRalf Baechle <[email protected]>
Fri, 22 Jan 2016 00:59:57 +0000 (01:59 +0100)
commit5754843225f78ac7cbe142a6899890a9733a5a5d
tree032eeea9de09cab6232b0034381378d144127084
parent5188129b8c9f58ba089bfd3809a163a8c087c797
MIPS: Loongson-3: Fix SMP_ASK_C0COUNT IPI handler

When Core-0 handle SMP_ASK_C0COUNT IPI, we should make other cores to
see the result as soon as possible (especially when Store-Fill-Buffer
is enabled). Otherwise, C0_Count syncronization makes no sense.

BTW, array is more suitable than per-cpu variable for syncronization,
and there is a corner case should be avoid: C0_Count of Core-0 can be
really 0.

Signed-off-by: Huacai Chen <[email protected]>
Cc: Aurelien Jarno <[email protected]>
Cc: Steven J. Hill <[email protected]>
Cc: Fuxin Zhang <[email protected]>
Cc: Zhangjin Wu <[email protected]>
Cc: Huacai Chen <[email protected]>
Cc: [email protected]
Cc: <[email protected]>
Patchwork: https://patchwork.linux-mips.org/patch/12160/
Signed-off-by: Ralf Baechle <[email protected]>
arch/mips/loongson64/loongson-3/smp.c