diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 2006-11-25 16:59:32 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 2006-11-25 16:59:32 +0000 |
commit | df051cfcc1226d26b85f9ac9aa7c874e9c88ae81 (patch) | |
tree | 00a0ded035702cdd4370ab83ee54f5b0baec8cad /sys/dev/acpi/acpiprt.c | |
parent | d845014b7d5a3b3cdb5441166055f3dea7ea5f56 (diff) |
sync amd64 to i386 w.r.t. acpi support. Also fix interrupt routing for multi-ioapic systems.
ok kettenis
Diffstat (limited to 'sys/dev/acpi/acpiprt.c')
-rw-r--r-- | sys/dev/acpi/acpiprt.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/acpi/acpiprt.c b/sys/dev/acpi/acpiprt.c index a2c6fdcf259..235cbda90cb 100644 --- a/sys/dev/acpi/acpiprt.c +++ b/sys/dev/acpi/acpiprt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpiprt.c,v 1.1 2006/11/15 21:39:06 kettenis Exp $ */ +/* $OpenBSD: acpiprt.c,v 1.2 2006/11/25 16:59:31 niklas Exp $ */ /* * Copyright (c) 2006 Mark Kettenis <kettenis@openbsd.org> * @@ -166,14 +166,17 @@ acpiprt_prt_add(struct acpiprt_softc *sc, struct aml_value *v) #endif memset(map, 0, sizeof *map); + map->ioapic = apic; + map->ioapic_pin = irq - apic->sc_apic_vecbase; map->bus_pin = ((addr >> 14) & 0x7c) | (pin & 0x3); map->redir = IOAPIC_REDLO_ACTLO | IOAPIC_REDLO_LEVEL; map->redir |= (IOAPIC_REDLO_DEL_LOPRI << IOAPIC_REDLO_DEL_SHIFT); map->ioapic_ih = APIC_INT_VIA_APIC | - ((apic->sc_apicid << APIC_INT_APIC_SHIFT) | (irq << APIC_INT_PIN_SHIFT)); + ((apic->sc_apicid << APIC_INT_APIC_SHIFT) | + (map->ioapic_pin << APIC_INT_PIN_SHIFT)); - apic->sc_pins[irq].ip_map = map; + apic->sc_pins[map->ioapic_pin].ip_map = map; map->next = mp_busses[sc->sc_bus].mb_intrs; mp_busses[sc->sc_bus].mb_intrs = map; |