Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/acpi Store the ACPI Processor UID in struct cpu...
details: https://anonhg.NetBSD.org/src/rev/3ecb97c918a8
branches: trunk
changeset: 994095:3ecb97c918a8
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Fri Oct 19 11:11:03 2018 +0000
description:
Store the ACPI Processor UID in struct cpu_info
diffstat:
sys/arch/arm/acpi/cpu_acpi.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diffs (46 lines):
diff -r 65624e4fbb24 -r 3ecb97c918a8 sys/arch/arm/acpi/cpu_acpi.c
--- a/sys/arch/arm/acpi/cpu_acpi.c Fri Oct 19 08:30:57 2018 +0000
+++ b/sys/arch/arm/acpi/cpu_acpi.c Fri Oct 19 11:11:03 2018 +0000
@@ -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 @@
#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 @@
{
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 @@
}
}
+ /* Store the ACPI Processor UID in cpu_info */
+ ci->ci_acpiid = gicc->Uid;
+
/* Attach the CPU */
cpu_attach(self, mpidr);
}
Home |
Main Index |
Thread Index |
Old Index