From d78940ec5d07d3b514f2fd8f941c58118fce2815 Mon Sep 17 00:00:00 2001 From: Michael Clark Date: Tue, 10 Apr 2018 20:02:46 +1200 Subject: 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 Cc: Bastian Koppelmann Cc: Palmer Dabbelt Cc: Alistair Francis Signed-off-by: Michael Clark Reviewed-by: Richard Henderson Signed-off-by: Alistair Francis --- include/hw/riscv/sifive_plic.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/hw/riscv') diff --git a/include/hw/riscv/sifive_plic.h b/include/hw/riscv/sifive_plic.h index 2f2af7e686..688cd97f82 100644 --- a/include/hw/riscv/sifive_plic.h +++ b/include/hw/riscv/sifive_plic.h @@ -55,7 +55,6 @@ typedef struct SiFivePLICState { uint32_t *pending; uint32_t *claimed; uint32_t *enable; - QemuMutex lock; /* config */ char *hart_config; -- cgit v1.2.3