Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/sommerfeld_i386mp_1]: src/sys/arch/i386/pci Use pa_rawintrpin instead of...



details:   https://anonhg.NetBSD.org/src/rev/b6fe9c540181
branches:  sommerfeld_i386mp_1
changeset: 482532:b6fe9c540181
user:      sommerfeld <sommerfeld%NetBSD.org@localhost>
date:      Sat May 18 21:42:40 2002 +0000

description:
Use pa_rawintrpin instead of swizzled interrupt pin.

diffstat:

 sys/arch/i386/pci/pci_machdep.c |  21 ++++++++++-----------
 1 files changed, 10 insertions(+), 11 deletions(-)

diffs (76 lines):

diff -r 3debe6bfcc6a -r b6fe9c540181 sys/arch/i386/pci/pci_machdep.c
--- a/sys/arch/i386/pci/pci_machdep.c   Sat May 18 17:27:30 2002 +0000
+++ b/sys/arch/i386/pci/pci_machdep.c   Sat May 18 21:42:40 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pci_machdep.c,v 1.35.2.11 2002/04/27 20:24:49 sommerfeld Exp $ */
+/*     $NetBSD: pci_machdep.c,v 1.35.2.12 2002/05/18 21:42:40 sommerfeld Exp $ */
 
 /*-
  * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
@@ -80,7 +80,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.35.2.11 2002/04/27 20:24:49 sommerfeld Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.35.2.12 2002/05/18 21:42:40 sommerfeld Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -163,7 +163,7 @@
  */
 struct i386_bus_dma_tag pci_bus_dma_tag = {
        0,                      /* _bounce_thresh */
-       _bus_dmamap_create, 
+       _bus_dmamap_create,
        _bus_dmamap_destroy,
        _bus_dmamap_load,
        _bus_dmamap_load_mbuf,
@@ -481,6 +481,7 @@
        int pin = pa->pa_intrpin;
        int line = pa->pa_intrline;
 #if NIOAPIC > 0
+       int rawpin = pa->pa_rawintrpin;
        pci_chipset_tag_t pc = pa->pa_pc;
        struct mp_intr_map *mip;
        int bus, dev, func;
@@ -528,13 +529,11 @@
        pci_decompose_tag (pc, pa->pa_tag, &bus, &dev, &func);
        if (mp_busses != NULL) {
                /*
-                * Assumes 1:1 mapping between PCI bus numbers and
+                * Note: assumes 1:1 mapping between PCI bus numbers and
                 * the numbers given by the MP bios.
-                * XXX Is this a valid assumption?
                 */
-               int mpspec_pin = (dev<<2)|(pin-1);
-               
-               
+               int mpspec_pin = (dev<<2)|(rawpin-1);
+
                for (mip = mp_busses[bus].mb_intrs; mip != NULL; mip=mip->next) {
                        if (mip->bus_pin == mpspec_pin) {
                                *ihp = mip->ioapic_ih | line;
@@ -544,12 +543,12 @@
                if (mip == NULL) {
                        printf("pci_intr_map: bus %d dev %d func %d pin %d; line %d\n",
                            bus, dev, func, pin, line);
-                       
+
                        printf("pci_intr_map: no MP mapping found\n");
                }
        }
 #endif
-       
+
        *ihp = line;
        return 0;
 
@@ -582,7 +581,7 @@
        sprintf(irqstr, "irq %d", ih&0xff);
 #endif
        return (irqstr);
-       
+
 }
 
 const struct evcnt *



Home | Main Index | Thread Index | Old Index