git: 16f0d01f9ca1 - main - arm64: apple: fix aic for !SMP configurations

From: Kyle Evans <kevans_at_FreeBSD.org>
Date: Fri, 10 Jan 2025 04:28:14 UTC
The branch main has been updated by kevans:

URL: https://cgit.FreeBSD.org/src/commit/?id=16f0d01f9ca1e28bede9a493329c5d66e317d88f

commit 16f0d01f9ca1e28bede9a493329c5d66e317d88f
Author:     Kyle Evans <kevans@FreeBSD.org>
AuthorDate: 2025-01-10 04:27:50 +0000
Commit:     Kyle Evans <kevans@FreeBSD.org>
CommitDate: 2025-01-10 04:28:05 +0000

    arm64: apple: fix aic for !SMP configurations
    
    Allocate sc_cpuids anyways, even if it's just a single entry, to
    minimize functional diff between SMP and !SMP.
    
    Reviewed by:    jhb
    Differential Revision:  https://reviews.freebsd.org/D48289
---
 sys/arm64/apple/apple_aic.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/sys/arm64/apple/apple_aic.c b/sys/arm64/apple/apple_aic.c
index b500099a5430..c9ce3b4d2165 100644
--- a/sys/arm64/apple/apple_aic.c
+++ b/sys/arm64/apple/apple_aic.c
@@ -137,9 +137,9 @@ struct apple_aic_softc {
 	u_int			sc_ndie;
 #ifdef SMP
 	struct apple_aic_irqsrc	sc_ipi_srcs[AIC_NIPIS];
-	u_int			*sc_cpuids;	/* cpu index to AIC CPU ID */
 	uint32_t		*sc_ipimasks;
 #endif
+	u_int			*sc_cpuids;	/* cpu index to AIC CPU ID */
 };
 
 static u_int aic_next_cpu;
@@ -215,6 +215,7 @@ apple_aic_attach(device_t dev)
 #ifdef SMP
 	sc->sc_ipimasks = malloc(sizeof(*sc->sc_ipimasks) * mp_maxid + 1,
 	    M_DEVBUF, M_WAITOK | M_ZERO);
+#endif
 	sc->sc_cpuids = malloc(sizeof(*sc->sc_cpuids) * mp_maxid + 1,
 	    M_DEVBUF, M_WAITOK | M_ZERO);
 
@@ -223,8 +224,6 @@ apple_aic_attach(device_t dev)
 	if (bootverbose)
 		device_printf(dev, "BSP CPU %d: whoami %x\n", cpu,
 		    sc->sc_cpuids[cpu]);
-#endif
-
 
 	name = device_get_nameunit(dev);
 	for (i = 0; i < sc->sc_ndie; i++) {