From 16f0d01f9ca1e28bede9a493329c5d66e317d88f Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Thu, 9 Jan 2025 22:27:50 -0600 Subject: [PATCH] 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 b500099a543..c9ce3b4d216 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++) {