Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107490841
D47134.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
D47134.diff
View Options
diff --git a/sys/riscv/riscv/aplic.c b/sys/riscv/riscv/aplic.c
--- a/sys/riscv/riscv/aplic.c
+++ b/sys/riscv/riscv/aplic.c
@@ -224,21 +224,23 @@
{
struct aplic_softc *sc;
struct trapframe *tf;
- u_int claimi, prio, irq;
+ uint32_t claimi;
+ u_int prio, irq;
int cpu;
sc = arg;
cpu = PCPU_GET(cpuid);
- /* Claim any pending interrupt. */
- claimi = aplic_read(sc, APLIC_IDC_CLAIMI(sc, cpu));
- prio = APLIC_IDC_CLAIMI_PRIO(claimi);
- irq = APLIC_IDC_CLAIMI_IRQ(claimi);
+ /* Claim all pending interrupts. */
+ while ((claimi = aplic_read(sc, APLIC_IDC_CLAIMI(sc, cpu))) != 0) {
+ prio = APLIC_IDC_CLAIMI_PRIO(claimi);
+ irq = APLIC_IDC_CLAIMI_IRQ(claimi);
- KASSERT((irq != 0), ("Invalid IRQ 0"));
+ KASSERT((irq != 0), ("Invalid IRQ 0"));
- tf = curthread->td_intr_frame;
- aplic_irq_dispatch(sc, irq, prio, tf);
+ tf = curthread->td_intr_frame;
+ aplic_irq_dispatch(sc, irq, prio, tf);
+ }
return (FILTER_HANDLED);
}
diff --git a/sys/riscv/riscv/plic.c b/sys/riscv/riscv/plic.c
--- a/sys/riscv/riscv/plic.c
+++ b/sys/riscv/riscv/plic.c
@@ -175,9 +175,8 @@
sc = arg;
cpu = PCPU_GET(cpuid);
- /* Claim any pending interrupt. */
- pending = RD4(sc, PLIC_CLAIM(sc, cpu));
- if (pending) {
+ /* Claim all pending interrupts. */
+ while ((pending = RD4(sc, PLIC_CLAIM(sc, cpu))) != 0) {
tf = curthread->td_intr_frame;
plic_irq_dispatch(sc, pending, tf);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Jan 15, 11:06 PM (17 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15817121
Default Alt Text
D47134.diff (1 KB)
Attached To
Mode
D47134: plic, aplic: handle all pending interrupts for hart
Attached
Detach File
Event Timeline
Log In to Comment