mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
RISC-V: Use atomic_cmpxchg to update PLIC bitmaps
The PLIC previously used a mutex to protect against concurrent access to the claimed and pending bitfields. Instead of using a mutex, we update the bitfields using atomic_cmpxchg. Rename sifive_plic_num_irqs_pending to sifive_plic_irqs_pending and add an early out if any interrupts are pending as the count of pending interrupts is not used. Cc: Sagar Karandikar <sagark@eecs.berkeley.edu> Cc: Bastian Koppelmann <kbastian@mail.uni-paderborn.de> Cc: Palmer Dabbelt <palmer@sifive.com> Cc: Alistair Francis <Alistair.Francis@wdc.com> Signed-off-by: Michael Clark <mjc@sifive.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
c3b03e5800
commit
d78940ec5d
2 changed files with 22 additions and 28 deletions
|
@ -55,7 +55,6 @@ typedef struct SiFivePLICState {
|
|||
uint32_t *pending;
|
||||
uint32_t *claimed;
|
||||
uint32_t *enable;
|
||||
QemuMutex lock;
|
||||
|
||||
/* config */
|
||||
char *hart_config;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue