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 arm64: acpi: Set capacity_dmips_mhz for CPUs
details: https://anonhg.NetBSD.org/src/rev/c84a3e929e30
branches: trunk
changeset: 1026421:c84a3e929e30
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Wed Nov 24 10:01:24 2021 +0000
description:
arm64: acpi: Set capacity_dmips_mhz for CPUs
The GICC structure describes a relative power efficiency for each
processor. Use this value as-is for the capacity_dmips_mhz value of a
cpu. This makes the assumption that "more efficient" means "slower".
diffstat:
sys/arch/arm/acpi/cpu_acpi.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (37 lines):
diff -r 74363530bd4b -r c84a3e929e30 sys/arch/arm/acpi/cpu_acpi.c
--- a/sys/arch/arm/acpi/cpu_acpi.c Wed Nov 24 02:01:15 2021 +0000
+++ b/sys/arch/arm/acpi/cpu_acpi.c Wed Nov 24 10:01:24 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_acpi.c,v 1.11 2021/10/17 12:41:05 jmcneill Exp $ */
+/* $NetBSD: cpu_acpi.c,v 1.12 2021/11/24 10:01:24 jmcneill Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
#include "opt_multiprocessor.h"
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu_acpi.c,v 1.11 2021/10/17 12:41:05 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_acpi.c,v 1.12 2021/11/24 10:01:24 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -93,6 +93,7 @@
static void
cpu_acpi_attach(device_t parent, device_t self, void *aux)
{
+ prop_dictionary_t dict = device_properties(self);
ACPI_MADT_GENERIC_INTERRUPT *gicc = aux;
const uint64_t mpidr = gicc->ArmMpidr;
const int unit = device_unit(self);
@@ -123,6 +124,10 @@
}
#endif /* MULTIPROCESSOR */
+ /* Assume that less efficient processors are faster. */
+ prop_dictionary_set_uint32(dict, "capacity_dmips_mhz",
+ gicc->EfficiencyClass);
+
/* Store the ACPI Processor UID in cpu_info */
ci->ci_acpiid = gicc->Uid;
Home |
Main Index |
Thread Index |
Old Index