Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108648799
D25531.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D25531.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D25531: riscv plic: Do not complete interrupts until the interrupt handler has run
Attached
Detach File
Event Timeline
Log In to Comment