Page MenuHomeFreeBSD

Fix PIC IRR handling for level-triggered pins.
ClosedPublic

Authored by neel on Dec 14 2014, 1:18 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Dec 9, 9:11 PM
Unknown Object (File)
Mon, Nov 25, 7:47 PM
Unknown Object (File)
Oct 14 2024, 6:41 PM
Unknown Object (File)
Oct 14 2024, 6:41 PM
Unknown Object (File)
Oct 14 2024, 6:21 PM
Unknown Object (File)
Sep 21 2024, 6:03 AM
Unknown Object (File)
Sep 8 2024, 8:49 PM
Unknown Object (File)
Sep 7 2024, 5:48 PM
Subscribers
None

Details

Summary

For level triggered interrupts clear the PIC IRR bit when the interrupt pin
is deasserted. Prior to this change each assertion on a level triggered irq
pin resulted in two interrupts being delivered to the CPU.

Test Plan

Boot a FreeBSD/i386 guest with 'hint.apic.0.disabled=1' set in the loader.

root@b386:~ # uname -a
FreeBSD b386 10.0-RELEASE FreeBSD 10.0-RELEASE #5: Tue Aug 19 14:32:17 PDT 2014 root@b386:/usr/obj/usr/src/sys/GENERIC i386

Before this change:

vmstat -i

interrupt total rate
irq6: virtio_pci1 2226 222

root@b386:~ # find / > /dev/null # trigger virtio-blk interrupts

vmstat -i

interrupt total rate
irq6: virtio_pci1 24822 1460

Delta is 22596 interrupts

After the change:

vmstat -i

interrupt total rate
irq6: virtio_pci1 1108 123

root@b386:~ # find / > /dev/null # trigger virtio-blk interrupts

vmstat -i

interrupt total rate
irq6: virtio_pci1 12408 653

Delta is 11300 interrupts

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

neel retitled this revision from to Fix PIC IRR handling for level-triggered pins..
neel updated this object.
neel edited the test plan for this revision. (Show Details)
neel added reviewers: tychon, jhb, grehan.
tychon edited edge metadata.

Looks good to me.

This revision is now accepted and ready to land.Dec 14 2014, 7:15 PM