Page MenuHomeFreeBSD

Minor cleanups in pci_irq.c
ClosedPublic

Authored by neel on Aug 12 2014, 5:28 AM.
Tags
None
Referenced Files
Unknown Object (File)
Nov 27 2024, 3:11 AM
Unknown Object (File)
Oct 6 2024, 9:46 PM
Unknown Object (File)
Oct 6 2024, 9:35 AM
Unknown Object (File)
Oct 5 2024, 8:26 PM
Unknown Object (File)
Oct 5 2024, 6:44 PM
Unknown Object (File)
Oct 4 2024, 11:00 AM
Unknown Object (File)
Oct 4 2024, 12:51 AM
Unknown Object (File)
Oct 1 2024, 10:58 AM
Subscribers
None

Details

Reviewers
jhb
Summary
  • Set 'pirq_cold' to '0' when the first PIRQ allocation happens.
  • Make assertions stronger.
Test Plan

Booted an i386 guest with hint.apic.0.disabled=1 and verified legacy interrupts
with attimer, uart, virtio-block and virtio-net.

Diff Detail

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

Event Timeline

neel retitled this revision from to Minor cleanups in pci_irq.c.
neel updated this object.
neel edited the test plan for this revision. (Show Details)
neel added a reviewer: jhb.
jhb edited edge metadata.

I think this is fine. In theory pirq_alloc_pin() should fail and return a pin of -1 if it fails to route an IRQ (if the loop around irq_counts failed to find a non-disabled IRQ). In that case you would want pirq_pin() to return 255 as that is how BIOS's mark unrouted interrupts. (It would also DTRT if the caller hadn't yet routed the interrupt.) In practice there should always be at least one free IRQ (esp if ACPI is enabled as then the SCI IRQ is available).

usr.sbin/bhyve/pci_irq.c
200

Doh!

This revision is now accepted and ready to land.Aug 12 2014, 5:27 PM