]> git.baikalelectronics.ru Git - uboot.git/commit
riscv: Match memory barriers between send_ipi_many and handle_ipi
authorSean Anderson <seanga2@gmail.com>
Mon, 21 Sep 2020 11:51:36 +0000 (07:51 -0400)
committerAndes <uboot@andestech.com>
Wed, 30 Sep 2020 00:54:52 +0000 (08:54 +0800)
commita2008eae3c306b742c68fc1edce5f28eb592d925
treecd415656cc2c7d527feae832c5026e4a23052ac4
parent2ae1eb27eb01aea2370d7dd550f9c63d97d2172c
riscv: Match memory barriers between send_ipi_many and handle_ipi

Without a matching barrier on the write side, the barrier in handle_ipi
does nothing. It was entirely possible for the boot hart to write to addr,
arg0, and arg1 *after* sending the IPI, because there was no barrier on the
sending side.

Fixes: 4e12f61db8 ("riscv: add option to wait for ack from secondary harts in smp functions")
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>
Reviewed-by: Leo Liang <ycliang@andestech.com>
arch/riscv/lib/smp.c