diff options
author | Steve Passe <fsmp@FreeBSD.org> | 1997-05-27 04:09:01 +0000 |
---|---|---|
committer | Steve Passe <fsmp@FreeBSD.org> | 1997-05-27 04:09:01 +0000 |
commit | ce595b36d537d32d8c4e52384479c3c9f999f9c6 (patch) | |
tree | f82f32626c0eee1f124b35625f34541764717c3d /sys | |
parent | b866529aa912157a69f4664484c53f66ff7ea1ca (diff) | |
download | src-ce595b36d537d32d8c4e52384479c3c9f999f9c6.tar.gz src-ce595b36d537d32d8c4e52384479c3c9f999f9c6.zip |
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.
Notes
Notes:
svn path=/head/; revision=26186
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/pci.c | 20 | ||||
-rw-r--r-- | sys/pci/pci.c | 20 |
2 files changed, 38 insertions, 2 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index b6f056ec8fa0..038243510845 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); diff --git a/sys/pci/pci.c b/sys/pci/pci.c index b6f056ec8fa0..038243510845 100644 --- a/sys/pci/pci.c +++ b/sys/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); |