Module Name:    src
Committed By:   jmcneill
Date:           Thu Jan 30 00:43:56 UTC 2025

Modified Files:
        src/sys/arch/arm/acpi: cpu_acpi.c

Log Message:
arm: acpi: Early return when a CPU is not configured


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 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.17 src/sys/arch/arm/acpi/cpu_acpi.c:1.18
--- src/sys/arch/arm/acpi/cpu_acpi.c:1.17	Mon Dec 30 19:17:21 2024
+++ src/sys/arch/arm/acpi/cpu_acpi.c	Thu Jan 30 00:43:56 2025
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_acpi.c,v 1.17 2024/12/30 19:17:21 jmcneill Exp $ */
+/* $NetBSD: cpu_acpi.c,v 1.18 2025/01/30 00:43:56 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.17 2024/12/30 19:17:21 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_acpi.c,v 1.18 2025/01/30 00:43:56 jmcneill Exp $");
 
 #include <sys/param.h>
 #include <sys/bus.h>
@@ -154,6 +154,11 @@ cpu_acpi_attach(device_t parent, device_
 	/* Attach the CPU */
 	cpu_attach(self, mpidr);
 
+	if (ci->ci_dev == NULL) {
+		/* Not configured */
+		return;
+	}
+
 	/* Probe for low-power idle states. */
 	cpu_acpi_probe_lpi(self, ci);
 

Reply via email to