lib: sbi: protect dprintf output with spinlock
authorDong Du <Dd_nirvana@sjtu.edu.cn>
Sat, 28 Aug 2021 06:45:02 +0000 (14:45 +0800)
committerAnup Patel <anup@brainfault.org>
Mon, 30 Aug 2021 03:42:37 +0000 (09:12 +0530)
commitc2623065331a9ae93f7dbd9d1bc7b4d46d0415a6
tree92b999cbb1209ea4e2ed863630db7bb839d38914
parentbd316e2c9bf855b7b7918e71622a9cded6a176ad
lib: sbi: protect dprintf output with spinlock

Avoid getting messages from multiple harts (using dprintf and printf)
concurrently with a spinlock serializaing calls to sbi_dprintf(),
sbi_printf() and sbi_puts()

Signed-off-by: Dong Du <Dd_nirvana@sjtu.edu.cn>
Reviewed-by: Xiang W <wxjstz@126.com>
Reviewed-by: Anup Patel <anup.patel@wdc.com>
lib/sbi/sbi_console.c