Module Name: src
Committed By: jmcneill
Date: Mon Apr 13 12:08:06 UTC 2020
Modified Files:
src/sys/dev/acpi: acpi_mcfg.c
Log Message:
Work around a compiler issue when building on aarch64 with KUBSAN.
To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/acpi/acpi_mcfg.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/dev/acpi/acpi_mcfg.c
diff -u src/sys/dev/acpi/acpi_mcfg.c:1.18 src/sys/dev/acpi/acpi_mcfg.c:1.19
--- src/sys/dev/acpi/acpi_mcfg.c:1.18 Sun Feb 2 16:31:25 2020
+++ src/sys/dev/acpi/acpi_mcfg.c Mon Apr 13 12:08:05 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi_mcfg.c,v 1.18 2020/02/02 16:31:25 jmcneill Exp $ */
+/* $NetBSD: acpi_mcfg.c,v 1.19 2020/04/13 12:08:05 jmcneill Exp $ */
/*-
* Copyright (C) 2015 NONAKA Kimihiro <[email protected]>
@@ -28,7 +28,7 @@
#include "opt_pci.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_mcfg.c,v 1.18 2020/02/02 16:31:25 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_mcfg.c,v 1.19 2020/04/13 12:08:05 jmcneill Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -750,7 +750,8 @@ acpimcfg_configure_bus_cb(ACPI_RESOURCE
}
ex = pcires->memext;
s = "non-prefetchable";
- } else if (res->Data.Address.ResourceType == ACPI_IO_RANGE) {
+ } else {
+ KASSERT(res->Data.Address.ResourceType == ACPI_IO_RANGE);
if (pcires->ioext == NULL) {
pcires->ioext = extent_create("pciio", 0, ULONG_MAX,
NULL, 0, EX_WAITOK);
@@ -764,7 +765,6 @@ acpimcfg_configure_bus_cb(ACPI_RESOURCE
}
ex = pcires->ioext;
s = "i/o";
-
}
switch (res->Type) {