diff options
author | tegge <tegge@FreeBSD.org> | 1998-09-06 22:41:42 +0000 |
---|---|---|
committer | tegge <tegge@FreeBSD.org> | 1998-09-06 22:41:42 +0000 |
commit | 857a03a573e70a598db37cc5e2751f5a6b09c020 (patch) | |
tree | abbb6f5a4e56e7d82120efc18e2c6de6ec06843b /sys/pci/pci_compat.c | |
parent | ac59a0c5cd4a2de80842186c8dd22ff48fe29da8 (diff) | |
download | FreeBSD-src-857a03a573e70a598db37cc5e2751f5a6b09c020.zip FreeBSD-src-857a03a573e70a598db37cc5e2751f5a6b09c020.tar.gz |
Maintain a mapping from irq number to (ioapic number, int pin) tuple,
and use this when masking/unmasking interrupts.
Maintain a mapping from (iopaic number, int pin) tuple to irq number,
and use this when configuring devices and programming the ioapics.
Previous code assumed that irq number was equal to int pin number, and
that the ioapic number was 0.
Don't let an AP enter _cpu_switch before all local apics are initialized.
Diffstat (limited to 'sys/pci/pci_compat.c')
-rw-r--r-- | sys/pci/pci_compat.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/pci/pci_compat.c b/sys/pci/pci_compat.c index 51e450e..4dfe6fd 100644 --- a/sys/pci/pci_compat.c +++ b/sys/pci/pci_compat.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: pci_compat.c,v 1.8 1998/07/22 08:39:08 dfr Exp $ + * $Id: pci_compat.c,v 1.9 1998/08/07 08:20:36 dfr Exp $ * */ @@ -182,7 +182,7 @@ pci_map_int(pcici_t cfg, pci_inthand_t *func, void *arg, unsigned *maskptr) if (error != 0) return 0; #ifdef APIC_IO - nextpin = next_apic_pin(irq); + nextpin = next_apic_irq(irq); if (nextpin < 0) return 1; @@ -196,10 +196,10 @@ pci_map_int(pcici_t cfg, pci_inthand_t *func, void *arg, unsigned *maskptr) */ muxcnt = 2; - nextpin = next_apic_pin(nextpin); + nextpin = next_apic_irq(nextpin); while (muxcnt < 5 && nextpin >= 0) { muxcnt++; - nextpin = next_apic_pin(nextpin); + nextpin = next_apic_irq(nextpin); } if (muxcnt >= 5) { printf("bogus MP table, more than 4 IO APIC pins connected to the same PCI device or ISA/EISA interrupt\n"); @@ -208,7 +208,7 @@ pci_map_int(pcici_t cfg, pci_inthand_t *func, void *arg, unsigned *maskptr) printf("bogus MP table, %d IO APIC pins connected to the same PCI device or ISA/EISA interrupt\n", muxcnt); - nextpin = next_apic_pin(irq); + nextpin = next_apic_irq(irq); while (nextpin >= 0) { idesc = intr_create(dev_instance, nextpin, func, arg, maskptr, 0); @@ -216,7 +216,7 @@ pci_map_int(pcici_t cfg, pci_inthand_t *func, void *arg, unsigned *maskptr) if (error != 0) return 0; printf("Registered extra interrupt handler for int %d (in addition to int %d)\n", nextpin, irq); - nextpin = next_apic_pin(nextpin); + nextpin = next_apic_irq(nextpin); } #endif } |