Module Name: src Committed By: chs Date: Sun Mar 31 19:34:25 UTC 2013
Modified Files: src/sys/arch/x86/acpi: acpi_machdep.c Log Message: yet more fixes for PR 47648 / PR 47016: when using a temporary mp_intr_map, initialize the "flags" field as well as "redir" since apic_set_redir() uses both. fix how the flags field is change when applying an override, the trigger and polarity sub-fields aren't just one bit like they are in redir. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x86/acpi/acpi_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/x86/acpi/acpi_machdep.c diff -u src/sys/arch/x86/acpi/acpi_machdep.c:1.5 src/sys/arch/x86/acpi/acpi_machdep.c:1.6 --- src/sys/arch/x86/acpi/acpi_machdep.c:1.5 Mon Mar 25 01:30:37 2013 +++ src/sys/arch/x86/acpi/acpi_machdep.c Sun Mar 31 19:34:24 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: acpi_machdep.c,v 1.5 2013/03/25 01:30:37 chs Exp $ */ +/* $NetBSD: acpi_machdep.c,v 1.6 2013/03/31 19:34:24 chs Exp $ */ /* * Copyright 2001 Wasabi Systems, Inc. @@ -40,7 +40,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: acpi_machdep.c,v 1.5 2013/03/25 01:30:37 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: acpi_machdep.c,v 1.6 2013/03/31 19:34:24 chs Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -163,12 +163,14 @@ acpi_md_OsInstallInterruptHandler(uint32 if (polarity == ACPI_MADT_POLARITY_ACTIVE_HIGH || (!sci && polarity == ACPI_MADT_POLARITY_CONFORMS)) { mpflags &= ~MPS_INTPO_ACTLO; + mpflags |= MPS_INTPO_ACTHI; redir &= ~IOAPIC_REDLO_ACTLO; } if (trigger == ACPI_MADT_TRIGGER_EDGE || (!sci && trigger == ACPI_MADT_TRIGGER_CONFORMS)) { type = IST_EDGE; mpflags &= ~(MPS_INTTR_LEVEL << 2); + mpflags |= (MPS_INTTR_EDGE << 2); redir &= ~IOAPIC_REDLO_LEVEL; } } @@ -200,6 +202,7 @@ acpi_md_OsInstallInterruptHandler(uint32 mipp = &sc->sc_pins[pin].ip_map; *mipp = &tmpmap; tmpmap.redir = redir; + tmpmap.flags = mpflags; } } else #endif