[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v3 18/20] hw/intc: ibex_plic: Update the pending irqs
From: |
Alistair Francis |
Subject: |
[PULL v3 18/20] hw/intc: ibex_plic: Update the pending irqs |
Date: |
Fri, 21 Aug 2020 22:40:59 -0700 |
After a claim or a priority change we need to update the pending
interrupts. This is based on the same patch for the SiFive PLIC:
55765822804f5a58594e "riscv: plic: Add a couple of mising
sifive_plic_update calls"
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Cc: Jessica Clarke <jrtc27@jrtc27.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id:
<0693aa700a4c67c49b3f1c973a82b257fdb7198d.1595655188.git.alistair.francis@wdc.com>
---
hw/intc/ibex_plic.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/hw/intc/ibex_plic.c b/hw/intc/ibex_plic.c
index 41079518c6..578edd2ce0 100644
--- a/hw/intc/ibex_plic.c
+++ b/hw/intc/ibex_plic.c
@@ -121,6 +121,9 @@ static uint64_t ibex_plic_read(void *opaque, hwaddr addr,
s->pending[pending_num] &= ~(1 << (s->claim % 32));
ret = s->claim;
+
+ /* Update the interrupt status after the claim */
+ ibex_plic_update(s);
}
return ret;
@@ -140,6 +143,7 @@ static void ibex_plic_write(void *opaque, hwaddr addr,
} else if (addr_between(addr, s->priority_base, s->priority_num)) {
uint32_t irq = ((addr - s->priority_base) >> 2) + 1;
s->priority[irq] = value & 7;
+ ibex_plic_update(s);
} else if (addr_between(addr, s->enable_base, s->enable_num)) {
uint32_t enable_reg = (addr - s->enable_base) / 4;
--
2.28.0
- [PULL v3 10/20] configure: Create symbolic links for pc-bios/*.elf files, (continued)
- [PULL v3 10/20] configure: Create symbolic links for pc-bios/*.elf files, Alistair Francis, 2020/08/22
- [PULL v3 09/20] riscv: Fix bug in setting pmpcfg CSR for RISCV64, Alistair Francis, 2020/08/22
- [PULL v3 12/20] roms/Makefile: Build the generic platform for RISC-V OpenSBI firmware, Alistair Francis, 2020/08/22
- [PULL v3 11/20] roms/opensbi: Upgrade from v0.7 to v0.8, Alistair Francis, 2020/08/22
- [PULL v3 04/20] target/riscv: Check nanboxed inputs to fp helpers, Alistair Francis, 2020/08/22
- [PULL v3 15/20] gitlab-ci/opensbi: Update GitLab CI to build generic platform, Alistair Francis, 2020/08/22
- [PULL v3 13/20] hw/riscv: Use pre-built bios image of generic platform for virt & sifive_u, Alistair Francis, 2020/08/22
- [PULL v3 16/20] target/riscv: Fix the translation of physical address, Alistair Francis, 2020/08/22
- [PULL v3 17/20] target/riscv: Change the TLB page size depends on PMP entries., Alistair Francis, 2020/08/22
- [PULL v3 14/20] hw/riscv: spike: Change the default bios to use generic platform image, Alistair Francis, 2020/08/22
- [PULL v3 18/20] hw/intc: ibex_plic: Update the pending irqs,
Alistair Francis <=
- [PULL v3 19/20] hw/intc: ibex_plic: Don't allow repeat interrupts on claimed lines, Alistair Francis, 2020/08/22
- [PULL v3 20/20] hw/intc: ibex_plic: Honour source priorities, Alistair Francis, 2020/08/22
- Re: [PULL v3 00/20] riscv-to-apply queue, Peter Maydell, 2020/08/23