Module Name: src
Committed By: kre
Date: Sat Mar 9 10:04:42 UTC 2019
Modified Files:
src/sys/arch/x86/acpi: acpi_machdep.c
Log Message:
In acpi_md_OsRemoveInterruptHandler() redir and mpflags are only
relevant to the NIOAPIC > 0 case (not used without that). Rearrange
#if's slightly to make that happen (avoid "set but not used" warnings
(aka errors) when NIOAPIC == 0 (or undefined)).
To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 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.24 src/sys/arch/x86/acpi/acpi_machdep.c:1.25
--- src/sys/arch/x86/acpi/acpi_machdep.c:1.24 Sat Mar 9 08:42:25 2019
+++ src/sys/arch/x86/acpi/acpi_machdep.c Sat Mar 9 10:04:41 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_machdep.c,v 1.24 2019/03/09 08:42:25 maxv Exp $ */
+/* $NetBSD: acpi_machdep.c,v 1.25 2019/03/09 10:04:41 kre Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_machdep.c,v 1.24 2019/03/09 08:42:25 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_machdep.c,v 1.25 2019/03/09 10:04:41 kre Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -174,12 +174,12 @@ acpi_md_intr_establish(uint32_t Interrup
{
void *ih;
struct pic *pic;
+ int irq, pin;
#if NIOAPIC > 0
struct ioapic_softc *sc;
struct acpi_md_override ovr;
struct mp_intr_map tmpmap, *mip, **mipp = NULL;
-#endif
- int irq, pin, redir, mpflags;
+ int redir, mpflags;
/*
* ACPI interrupts default to level-triggered active-low.
@@ -188,7 +188,6 @@ acpi_md_intr_establish(uint32_t Interrup
mpflags = (MPS_INTTR_LEVEL << 2) | MPS_INTPO_ACTLO;
redir = IOAPIC_REDLO_LEVEL | IOAPIC_REDLO_ACTLO;
-#if NIOAPIC > 0
/*
* Apply any MADT override setting.