freebsd-skq/sys/x86
royger 1184d559e6 msi: remove the check that interrupt sources have been added
When running as a specific type of Xen guest the hypervisor won't
provide any emulated IO-APICs or legacy PICs at all, thus hitting the
following assert in the MSI code:

panic: Assertion num_io_irqs > 0 failed at /usr/src/sys/x86/x86/msi.c:334
cpuid = 0
time = 1
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xffffffff826ffa70
vpanic() at vpanic+0x1a3/frame 0xffffffff826ffad0
panic() at panic+0x43/frame 0xffffffff826ffb30
msi_init() at msi_init+0xed/frame 0xffffffff826ffb40
apic_setup_io() at apic_setup_io+0x72/frame 0xffffffff826ffb50
mi_startup() at mi_startup+0x118/frame 0xffffffff826ffb70
start_kernel() at start_kernel+0x10

Fix this by removing the assert in the MSI code, since it's possible
to get to the MSI initialization without having registered any other
interrupt sources.

Reviewed by:		jhb
Approved by:		re (gjb)
Sponsored by:		Citrix Systems R&D
Differential revision:	https://reviews.freebsd.org/D17001
2018-09-13 07:05:51 +00:00
..
acpica Dynamically allocate IRQ ranges on x86. 2018-08-28 21:09:19 +00:00
bios sys/x86: further adoption of SPDX licensing ID tags. 2017-11-27 15:11:47 +00:00
cpufreq cpufreq: Remove error-prone table terminators in favor of automatic sizing 2018-04-14 03:15:05 +00:00
include Dynamically allocate IRQ ranges on x86. 2018-08-28 21:09:19 +00:00
iommu Dynamically allocate IRQ ranges on x86. 2018-08-28 21:09:19 +00:00
isa Dynamically allocate IRQ ranges on x86. 2018-08-28 21:09:19 +00:00
pci Add ISA PNP tables to ISA drivers. Fix a few incidental comments. 2018-01-29 00:22:30 +00:00
x86 msi: remove the check that interrupt sources have been added 2018-09-13 07:05:51 +00:00
xen Dynamically allocate IRQ ranges on x86. 2018-08-28 21:09:19 +00:00