Module Name: src Committed By: jmcneill Date: Wed Nov 24 10:01:24 UTC 2021
Modified Files: src/sys/arch/arm/acpi: cpu_acpi.c Log Message: 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". To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 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.11 src/sys/arch/arm/acpi/cpu_acpi.c:1.12 --- src/sys/arch/arm/acpi/cpu_acpi.c:1.11 Sun Oct 17 12:41:05 2021 +++ src/sys/arch/arm/acpi/cpu_acpi.c Wed Nov 24 10:01:24 2021 @@ -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 @@ cpu_acpi_match(device_t parent, cfdata_t 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 @@ cpu_acpi_attach(device_t parent, device_ } #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;