From c792a8a7608c1dea75d0ac88bd542811fefcf5db Mon Sep 17 00:00:00 2001 From: Michael Neumann Date: Mon, 8 Nov 2010 23:41:36 +0100 Subject: [PATCH] Remove remaining APIC_IO usages in bus/pci --- sys/bus/pci/pci_compat.c | 6 ++++-- sys/bus/pci/pci_pci.c | 9 +++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/sys/bus/pci/pci_compat.c b/sys/bus/pci/pci_compat.c index adba37727c..de38417c67 100644 --- a/sys/bus/pci/pci_compat.c +++ b/sys/bus/pci/pci_compat.c @@ -118,7 +118,7 @@ int pci_map_int_right(pcici_t cfg, pci_inthand_t *handler, void *arg, u_int intflags) { int error; -#ifdef APIC_IO +#ifdef SMP /* APIC-IO */ int nextpin, muxcnt; #endif if (cfg->intpin != 0) { @@ -158,7 +158,8 @@ pci_map_int_right(pcici_t cfg, pci_inthand_t *handler, void *arg, u_int intflags */ #endif -#ifdef APIC_IO +#ifdef SMP /* APIC-IO */ +if (apic_io_enable) { nextpin = next_apic_irq(irq); if (nextpin < 0) @@ -205,6 +206,7 @@ pci_map_int_right(pcici_t cfg, pci_inthand_t *handler, void *arg, u_int intflags kprintf("Registered extra interrupt handler for int %d (in addition to int %d)\n", nextpin, irq); nextpin = next_apic_irq(nextpin); } +} #endif } return (1); diff --git a/sys/bus/pci/pci_pci.c b/sys/bus/pci/pci_pci.c index 9c915ddc25..0cc07b9098 100644 --- a/sys/bus/pci/pci_pci.c +++ b/sys/bus/pci/pci_pci.c @@ -41,6 +41,7 @@ #include #include #include +#include #include #include @@ -125,12 +126,12 @@ pcib_probe(device_t dev) if ((pci_get_class(dev) == PCIC_BRIDGE) && (pci_get_subclass(dev) == PCIS_BRIDGE_PCI)) { device_set_desc(dev, "PCI-PCI bridge"); -#ifndef APIC_IO - return (-10000); -#else +#ifdef SMP /* APIC-IO */ /* PCIBIOS PCI-PCI bridge is -2000 */ - return (-1000); + if (apic_io_enable) + return (-1000); #endif + return (-10000); } return(ENXIO); } -- 2.41.0