lib: Fix ipi type update
authorAtish Patra <atish.patra@wdc.com>
Mon, 21 Jan 2019 07:24:26 +0000 (23:24 -0800)
committerAnup Patel <anup@brainfault.org>
Tue, 22 Jan 2019 04:33:49 +0000 (10:03 +0530)
commitb9c517f5593716d11013bef5fa25f037734327b7
tree73113d448ccb1503ad3d4e0ed366be216988a589
parent312b6bf32f51e530dd22746fe2a36d6459e29588
lib: Fix ipi type update

IPIs are updated in scratch space by source hart.
However, different harts or same hart may want to
send different IPIs before previous IPI was read
by the target hart. Currently, previous IPI type
is overwritten in that case.

Use atomic bit set/clear operations to update IPIs.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
lib/sbi_ipi.c