summaryrefslogtreecommitdiffstats
path: root/arch/mips/include/asm/hardirq.h
diff options
context:
space:
mode:
authorHuacai Chen <chenhc@lemote.com>2016-01-21 21:09:51 +0800
committerRalf Baechle <ralf@linux-mips.org>2016-01-24 01:31:51 +0100
commitdb0dbd57d59ad02c8343c69e8c73e749c0515ec3 (patch)
treec030dcb8fc5808e1fdd077e6da7fb8947b096fca /arch/mips/include/asm/hardirq.h
parent5610b1254e3689b6ef8ebe2db260709a74da06c8 (diff)
downloadlinux-db0dbd57d59ad02c8343c69e8c73e749c0515ec3.tar.bz2
MIPS: sync-r4k: reduce skew while synchronization
While synchronization, count register will go backwards for the master. If synchronise_count_master() runs before synchronise_count_slave(), skew becomes even more. The skew is very harmful for CPU hotplug (CPU0 do synchronization with CPU1, then CPU0 do synchronization with CPU2 and CPU0's count goes backwards, so it will be out of sync with CPU1). After the commit cf9bfe55f24973a8f40e2 (MIPS: Synchronize MIPS count one CPU at a time), we needn't evaluate count_reference at the beginning of synchronise_count_master() any more. Thus, we evaluate the initcount (It seems like count_reference is redundant) in the 2nd loop. Since we write the count register in the last loop, we don't need additional barriers (the existing memory barriers are enough). Moreover, I think we loop 3 times is enough to get a primed instruction cache, this can also get less skew than looping 5 times. Comments are also updated in this patch. Signed-off-by: Huacai Chen <chenhc@lemote.com> Cc: Aurelien Jarno <aurelien@aurel32.net> Cc: Steven J. Hill <Steven.Hill@imgtec.com> Cc: linux-mips@linux-mips.org Cc: Fuxin Zhang <zhangfx@lemote.com> Cc: Zhangjin Wu <wuzhangjin@gmail.com> Patchwork: https://patchwork.linux-mips.org/patch/12163/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include/asm/hardirq.h')
0 files changed, 0 insertions, 0 deletions