summaryrefslogtreecommitdiffstats
path: root/sys/pci/pci.c
diff options
context:
space:
mode:
authorfsmp <fsmp@FreeBSD.org>1997-05-27 04:09:01 +0000
committerfsmp <fsmp@FreeBSD.org>1997-05-27 04:09:01 +0000
commitb5037ea036e3a267e690f5d672bcecc2fd5b100e (patch)
tree0f90897b4b3fbf588718a1349032a90a83a4e1b8 /sys/pci/pci.c
parent8eb270bac5868af0b6653ed6edb380e22f04675a (diff)
downloadFreeBSD-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/pci/pci.c')
-rw-r--r--sys/pci/pci.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/sys/pci/pci.c b/sys/pci/pci.c
index b6f056e..0382435 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);
OpenPOWER on IntegriCloud