diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index e65434cbbf2..2ff9f5b1f65 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include "opt_kstack_pages.h" #include "opt_maxmem.h" #include "opt_mp_watchdog.h" +#include "opt_pci.h" #include "opt_platform.h" #include "opt_sched.h" @@ -184,7 +185,9 @@ struct init_ops init_ops = { .mp_bootaddress = mp_bootaddress, .start_all_aps = native_start_all_aps, #endif +#ifdef DEV_PCI .msi_init = msi_init, +#endif }; /* diff --git a/sys/x86/x86/nexus.c b/sys/x86/x86/nexus.c index 6999e9658bb..9bceff20486 100644 --- a/sys/x86/x86/nexus.c +++ b/sys/x86/x86/nexus.c @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include "opt_apic.h" #endif #include "opt_isa.h" +#include "opt_pci.h" #include #include @@ -131,7 +132,7 @@ static int nexus_get_resource(device_t, device_t, int, int, static void nexus_delete_resource(device_t, device_t, int, int); static int nexus_get_cpus(device_t, device_t, enum cpu_sets, size_t, cpuset_t *); -#ifdef DEV_APIC +#if defined(DEV_APIC) && defined(DEV_PCI) static int nexus_alloc_msi(device_t pcib, device_t dev, int count, int maxcount, int *irqs); static int nexus_release_msi(device_t pcib, device_t dev, int count, int *irqs); static int nexus_alloc_msix(device_t pcib, device_t dev, int *irq); @@ -172,7 +173,7 @@ static device_method_t nexus_methods[] = { DEVMETHOD(bus_get_cpus, nexus_get_cpus), /* pcib interface */ -#ifdef DEV_APIC +#if defined(DEV_APIC) && defined(DEV_PCI) DEVMETHOD(pcib_alloc_msi, nexus_alloc_msi), DEVMETHOD(pcib_release_msi, nexus_release_msi), DEVMETHOD(pcib_alloc_msix, nexus_alloc_msix), @@ -701,7 +702,7 @@ nexus_add_irq(u_long irq) panic("%s: failed", __func__); } -#ifdef DEV_APIC +#if defined(DEV_APIC) && defined(DEV_PCI) static int nexus_alloc_msix(device_t pcib, device_t dev, int *irq) { @@ -736,7 +737,7 @@ nexus_map_msi(device_t pcib, device_t dev, int irq, uint64_t *addr, uint32_t *da return (msi_map(irq, addr, data)); } -#endif +#endif /* DEV_APIC && DEV_PCI */ /* Placeholder for system RAM. */ static void