summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorfsmp <fsmp@FreeBSD.org>1997-05-05 22:56:13 +0000
committerfsmp <fsmp@FreeBSD.org>1997-05-05 22:56:13 +0000
commit3f8c900a277d80f1c710d3b60ddbb381a3bb771b (patch)
tree60691caa93cc38771d249df8af811fc27c754746 /sys
parent4fd522bb448f9c7b19079fde76648b1034d96ff4 (diff)
downloadFreeBSD-src-3f8c900a277d80f1c710d3b60ddbb381a3bb771b.zip
FreeBSD-src-3f8c900a277d80f1c710d3b60ddbb381a3bb771b.tar.gz
Code to handle SMP/APIC_IO mapping of ISA INTs to APIC pins above IRQ15.
- doesn't break my system. - NOT yet verified on the affected motherboard. Stifle an annoying dma_start busy message for the sound cards. Submitted by: "John S. Dyson" <toor@dyson.iquest.net>
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/isa/isa.c26
-rw-r--r--sys/i386/isa/isa.c26
2 files changed, 50 insertions, 2 deletions
diff --git a/sys/amd64/isa/isa.c b/sys/amd64/isa/isa.c
index e18d73d..def0ae4 100644
--- a/sys/amd64/isa/isa.c
+++ b/sys/amd64/isa/isa.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)isa.c 7.2 (Berkeley) 5/13/91
- * $Id: isa.c,v 1.82 1997/04/27 21:18:58 fsmp Exp $
+ * $Id: isa.c,v 1.1 1997/05/05 21:54:26 smp Exp smp $
*/
/*
@@ -462,6 +462,23 @@ config_isadev_c(isdp, mp, reconfig)
}
(*dp->attach)(isdp);
if (isdp->id_irq) {
+#if defined(APIC_IO)
+ /*
+ * Some motherboards use upper IRQs for traditional
+ * ISA INTerrupt sources. In particular we have
+ * seen the secondary IDE connected to IRQ20.
+ * This code detects and fixes this situation.
+ */
+ u_int apic_mask;
+ int rirq;
+
+ apic_mask = get_isa_apic_mask( isdp->id_irq );
+ if ( apic_mask != isdp->id_irq ) {
+ rirq = ffs( isdp->id_irq ) - 1;
+ isdp->id_irq = apic_mask;
+ undirect_isa_irq( rirq ); /* free for ISA */
+ }
+#endif /* APIC_IO */
if (mp)
INTRMASK(*mp, isdp->id_irq);
register_intr(ffs(isdp->id_irq) - 1, isdp->id_id,
@@ -676,8 +693,15 @@ void isa_dmastart(int flags, caddr_t addr, u_int nbytes, int chan)
printf("isa_dmastart: channel %d not acquired\n", chan);
#endif
+#if 0
+ /*
+ * XXX This should be checked, but drivers like ad1848 only call
+ * isa_dmastart() once because they use Auto DMA mode. If we
+ * leave this in, drivers that do this will print this continuously.
+ */
if (dma_busy & (1 << chan))
printf("isa_dmastart: channel %d busy\n", chan);
+#endif
dma_busy |= (1 << chan);
diff --git a/sys/i386/isa/isa.c b/sys/i386/isa/isa.c
index e18d73d..def0ae4 100644
--- a/sys/i386/isa/isa.c
+++ b/sys/i386/isa/isa.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)isa.c 7.2 (Berkeley) 5/13/91
- * $Id: isa.c,v 1.82 1997/04/27 21:18:58 fsmp Exp $
+ * $Id: isa.c,v 1.1 1997/05/05 21:54:26 smp Exp smp $
*/
/*
@@ -462,6 +462,23 @@ config_isadev_c(isdp, mp, reconfig)
}
(*dp->attach)(isdp);
if (isdp->id_irq) {
+#if defined(APIC_IO)
+ /*
+ * Some motherboards use upper IRQs for traditional
+ * ISA INTerrupt sources. In particular we have
+ * seen the secondary IDE connected to IRQ20.
+ * This code detects and fixes this situation.
+ */
+ u_int apic_mask;
+ int rirq;
+
+ apic_mask = get_isa_apic_mask( isdp->id_irq );
+ if ( apic_mask != isdp->id_irq ) {
+ rirq = ffs( isdp->id_irq ) - 1;
+ isdp->id_irq = apic_mask;
+ undirect_isa_irq( rirq ); /* free for ISA */
+ }
+#endif /* APIC_IO */
if (mp)
INTRMASK(*mp, isdp->id_irq);
register_intr(ffs(isdp->id_irq) - 1, isdp->id_id,
@@ -676,8 +693,15 @@ void isa_dmastart(int flags, caddr_t addr, u_int nbytes, int chan)
printf("isa_dmastart: channel %d not acquired\n", chan);
#endif
+#if 0
+ /*
+ * XXX This should be checked, but drivers like ad1848 only call
+ * isa_dmastart() once because they use Auto DMA mode. If we
+ * leave this in, drivers that do this will print this continuously.
+ */
if (dma_busy & (1 << chan))
printf("isa_dmastart: channel %d busy\n", chan);
+#endif
dma_busy |= (1 << chan);
OpenPOWER on IntegriCloud