MIPS: Loongson64: smp: Correct nudge_writes usage
authorJiaxun Yang <jiaxun.yang@flygoat.com>
Tue, 21 Feb 2023 13:16:56 +0000 (13:16 +0000)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Tue, 14 Mar 2023 16:06:16 +0000 (17:06 +0100)
commit227003cb5325298a26276f49bebbfaf39d903be4
treea314c224f0dd599505eda955465710e207d1af7c
parentac24cc1835c8e6400230f0bf50e6ba0ab75cb09f
MIPS: Loongson64: smp: Correct nudge_writes usage

Previously every write to SMP regisers are followed by nudge_writes,
this incures a huge performance penalty because nudge_writes involves
SYNC, which will be globalized on chip.

Only set off nudge_writes when we really want other cores to see the
result ASAP. Also replace read/write functions to relaxed version because
we don't need extra barriers to protect against DMA.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/loongson64/smp.c