mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-05 23:57:10 +00:00
hv: fix incorrect use of atomic_set_xxx
1. vpic_wire_mode no need to atomically set its value. 2. uart open conut want to atomically set its value not atomically set its bits. Signed-off-by: Li, Fei1 <fei1.li@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -161,10 +161,10 @@ static int uart16550_init(struct tgt_uart *tgt_uart)
|
||||
status = -ENODEV;
|
||||
} else {
|
||||
if (strcmp(tgt_uart->uart_id, "STDIO") == 0) {
|
||||
atomic_set_int(&tgt_uart->open_count, 0);
|
||||
atomic_store_rel_int(&tgt_uart->open_count, 0);
|
||||
} else {
|
||||
/* set open count to 1 to prevent open */
|
||||
atomic_set_int(&tgt_uart->open_count, 1);
|
||||
atomic_store_rel_int(&tgt_uart->open_count, 1);
|
||||
status = -EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user