Module Name: src
Committed By: jmcneill
Date: Sun Oct 17 12:41:06 UTC 2021
Modified Files:
src/sys/arch/arm/acpi: cpu_acpi.c
Log Message:
Fix primary CPU detection in cpu_acpi_tprof_intr_establish
To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 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.10 src/sys/arch/arm/acpi/cpu_acpi.c:1.11
--- src/sys/arch/arm/acpi/cpu_acpi.c:1.10 Sat Jan 23 12:34:19 2021
+++ src/sys/arch/arm/acpi/cpu_acpi.c Sun Oct 17 12:41:05 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_acpi.c,v 1.10 2021/01/23 12:34:19 jmcneill Exp $ */
+/* $NetBSD: cpu_acpi.c,v 1.11 2021/10/17 12:41:05 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.10 2021/01/23 12:34:19 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_acpi.c,v 1.11 2021/10/17 12:41:05 jmcneill Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -168,7 +168,7 @@ cpu_acpi_tprof_intr_establish(ACPI_SUBTA
if ((gicc->Flags & ACPI_MADT_ENABLED) == 0)
return AE_OK;
- const bool cpu_primary_p = cpu_mpidr_aff_read() == gicc->ArmMpidr;
+ const bool cpu_primary_p = cpu_info_store[0].ci_cpuid == gicc->ArmMpidr;
const bool intr_ppi_p = gicc->PerformanceInterrupt < 32;
const int type = (gicc->Flags & ACPI_MADT_PERFORMANCE_IRQ_MODE) ?
IST_EDGE : IST_LEVEL;