aboutsummaryrefslogtreecommitdiff
path: root/sys/arm/arm/pmu_acpi.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arm/arm/pmu_acpi.c')
-rw-r--r--sys/arm/arm/pmu_acpi.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/sys/arm/arm/pmu_acpi.c b/sys/arm/arm/pmu_acpi.c
index b1378c24e833..db4790f2760a 100644
--- a/sys/arm/arm/pmu_acpi.c
+++ b/sys/arm/arm/pmu_acpi.c
@@ -1,7 +1,7 @@
/*-
- * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
+ * SPDX-License-Identifier: BSD-2-Clause
*
- * Copyright (c) 2020 Greg V <greg@unrelenting.technology>
+ * Copyright (c) 2020 Val Packett <val@packett.cool>
* Copyright (c) 2021 Ruslan Bukin <br@bsdpad.com>
*
* Redistribution and use in source and binary forms, with or without
@@ -26,7 +26,6 @@
* SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/bus.h>
#include <sys/kernel.h>
@@ -72,7 +71,7 @@ madt_handler(ACPI_SUBTABLE_HEADER *entry, void *arg)
for (i = 0; i < MAXCPU; i++) {
pcpu = pcpu_find(i);
- if (pcpu != NULL && pcpu->pc_mpidr == intr->ArmMpidr) {
+ if (pcpu != NULL && PCPU_GET_MPIDR(pcpu) == intr->ArmMpidr) {
cpuid = i;
break;
}
@@ -82,7 +81,6 @@ madt_handler(ACPI_SUBTABLE_HEADER *entry, void *arg)
/* pcpu not found. */
device_printf(sc->dev, "MADT: could not find pcpu, "
"ArmMpidr %lx\n", intr->ArmMpidr);
- ctx->error = ENODEV;
return;
}
@@ -190,6 +188,4 @@ static device_method_t pmu_acpi_methods[] = {
DEFINE_CLASS_0(pmu, pmu_acpi_driver, pmu_acpi_methods,
sizeof(struct pmu_softc));
-static devclass_t pmu_acpi_devclass;
-
-DRIVER_MODULE(pmu, acpi, pmu_acpi_driver, pmu_acpi_devclass, 0, 0);
+DRIVER_MODULE(pmu, acpi, pmu_acpi_driver, 0, 0);