Page MenuHomeFreeBSD

D25531.diff
No OneTemporary

D25531.diff

Index: head/sys/riscv/riscv/plic.c
===================================================================
--- head/sys/riscv/riscv/plic.c
+++ head/sys/riscv/riscv/plic.c
@@ -169,11 +169,11 @@
sc = arg;
cpu = PCPU_GET(cpuid);
+ /* Claim any pending interrupt. */
pending = RD4(sc, PLIC_CLAIM(sc, cpu));
if (pending) {
tf = curthread->td_intr_frame;
plic_irq_dispatch(sc, pending, tf);
- WR4(sc, PLIC_CLAIM(sc, cpu), pending);
}
return (FILTER_HANDLED);
@@ -384,7 +384,17 @@
static void
plic_post_ithread(device_t dev, struct intr_irqsrc *isrc)
{
+ struct plic_softc *sc;
+ struct plic_irqsrc *src;
+ uint32_t cpu;
+ sc = device_get_softc(dev);
+ src = (struct plic_irqsrc *)isrc;
+
+ cpu = CPU_FFS(&isrc->isrc_cpu) - 1;
+
+ /* Complete the interrupt. */
+ WR4(sc, PLIC_CLAIM(sc, cpu), src->irq);
plic_enable_intr(dev, isrc);
}
@@ -451,6 +461,7 @@
DEVMETHOD(pic_map_intr, plic_map_intr),
DEVMETHOD(pic_pre_ithread, plic_pre_ithread),
DEVMETHOD(pic_post_ithread, plic_post_ithread),
+ DEVMETHOD(pic_post_filter, plic_post_ithread),
DEVMETHOD(pic_setup_intr, plic_setup_intr),
DEVMETHOD(pic_bind_intr, plic_bind_intr),

File Metadata

Mime Type
text/plain
Expires
Tue, Jan 28, 1:59 AM (10 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16237118
Default Alt Text
D25531.diff (1 KB)

Event Timeline