diff options
author | fsmp <fsmp@FreeBSD.org> | 1997-05-27 04:09:01 +0000 |
---|---|---|
committer | fsmp <fsmp@FreeBSD.org> | 1997-05-27 04:09:01 +0000 |
commit | b5037ea036e3a267e690f5d672bcecc2fd5b100e (patch) | |
tree | 0f90897b4b3fbf588718a1349032a90a83a4e1b8 /sys/dev | |
parent | 8eb270bac5868af0b6653ed6edb380e22f04675a (diff) | |
download | FreeBSD-src-b5037ea036e3a267e690f5d672bcecc2fd5b100e.zip FreeBSD-src-b5037ea036e3a267e690f5d672bcecc2fd5b100e.tar.gz |
Add support for APIC_IO to pci IRQ configuration.
The support for APIC_IO was lost in the new set of pci modules. This patch
restores the ability to build SMP/APIC_IO kernels.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/pci.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index b6f056e..0382435 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id$ + * $Id: pci.c,v 1.72 1997/05/26 15:08:34 se Exp $ * */ @@ -330,6 +330,24 @@ pci_readcfg(pcicfgregs *probe) cfg->lattimer = pci_cfgread(cfg, PCIR_LATTIMER, 1); cfg->intpin = pci_cfgread(cfg, PCIR_INTPIN, 1); cfg->intline = pci_cfgread(cfg, PCIR_INTLINE, 1); + +#ifdef APIC_IO + if (cfg->intline && (cfg->intline != 0xff)) { + u_char airq = 0xff; + u_char rirq = 0xff; + + airq = get_pci_apic_irq(cfg->bus, + cfg->slot, cfg->intpin); + + if (airq != 0xff) { /* APIC IRQ exists */ + rirq = cfg->intline; /* 're-directed' IRQ */ + cfg->intline = airq; /* use APIC IRQ */ + pci_cfgwrite(cfg, PCIR_INTLINE, airq, 1); + undirect_pci_irq(rirq); + } + } +#endif /* APIC_IO */ + cfg->mingnt = pci_cfgread(cfg, PCIR_MINGNT, 1); cfg->maxlat = pci_cfgread(cfg, PCIR_MAXLAT, 1); |