Module Name: src
Committed By: jmcneill
Date: Fri Oct 19 11:11:03 UTC 2018
Modified Files:
src/sys/arch/arm/acpi: cpu_acpi.c
Log Message:
Store the ACPI Processor UID in struct cpu_info
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/acpi/cpu_acpi.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/arm/acpi/cpu_acpi.c
diff -u src/sys/arch/arm/acpi/cpu_acpi.c:1.3 src/sys/arch/arm/acpi/cpu_acpi.c:1.4
--- src/sys/arch/arm/acpi/cpu_acpi.c:1.3 Thu Oct 18 09:01:52 2018
+++ src/sys/arch/arm/acpi/cpu_acpi.c Fri Oct 19 11:11:03 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_acpi.c,v 1.3 2018/10/18 09:01:52 skrll Exp $ */
+/* $NetBSD: cpu_acpi.c,v 1.4 2018/10/19 11:11:03 jmcneill Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu_acpi.c,v 1.3 2018/10/18 09:01:52 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_acpi.c,v 1.4 2018/10/19 11:11:03 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -47,6 +47,8 @@ __KERNEL_RCSID(0, "$NetBSD: cpu_acpi.c,v
#include <arm/arm/psci.h>
+extern struct cpu_info cpu_info_store[];
+
static int cpu_acpi_match(device_t, cfdata_t, void *);
static void cpu_acpi_attach(device_t, device_t, void *);
@@ -78,6 +80,8 @@ cpu_acpi_attach(device_t parent, device_
{
ACPI_MADT_GENERIC_INTERRUPT *gicc = aux;
const uint64_t mpidr = gicc->ArmMpidr;
+ const int unit = device_unit(self);
+ struct cpu_info *ci = &cpu_info_store[unit];
int error;
if (cpu_mpidr_aff_read() != mpidr) {
@@ -102,6 +106,9 @@ cpu_acpi_attach(device_t parent, device_
}
}
+ /* Store the ACPI Processor UID in cpu_info */
+ ci->ci_acpiid = gicc->Uid;
+
/* Attach the CPU */
cpu_attach(self, mpidr);
}