From 572d053e1742f6434187ae06fa4b4336fe4439c6 Mon Sep 17 00:00:00 2001 From: Tor Egge Date: Sun, 6 Sep 1998 22:41:42 +0000 Subject: 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. --- sys/dev/pci/pci.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index 2dac6de361777..fceb2205e5d1f 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: pci.c,v 1.84 1998/07/22 08:40:46 dfr Exp $ + * $Id: pci.c,v 1.85 1998/08/13 19:12:20 gibbs Exp $ * */ @@ -343,7 +343,7 @@ pci_readcfg(pcicfgregs *probe) if (cfg->intpin != 0) { int airq; - airq = pci_apic_pin(cfg->bus, cfg->slot, cfg->intpin); + airq = pci_apic_irq(cfg->bus, cfg->slot, cfg->intpin); if (airq >= 0) { /* PCI specific entry found in MP table */ if (airq != cfg->intline) { @@ -357,7 +357,7 @@ pci_readcfg(pcicfgregs *probe) * same methods as used by the ISA devices * devices to find the proper IOAPIC int pin. */ - airq = isa_apic_pin(cfg->intline); + airq = isa_apic_irq(cfg->intline); if ((airq >= 0) && (airq != cfg->intline)) { /* XXX: undirect_pci_irq() ? */ undirect_isa_irq(cfg->intline); -- cgit v1.3