Fix for ioapic irq routing.
Fix for ioapic irq routing.

From NetBSD, NetBSD PR 22728 for details

ok beck@ krw@
tested by beck@ krw@ marc@ and a few others on a number of amd64 systems.

orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars,orumin/openbsd-efivars