Date: Tue, 31 Oct 2017 18:22:21 +0000 (UTC) From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325242 - head/sys/arm64/arm64 Message-ID: <201710311822.v9VIMLP6042293@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: andrew Date: Tue Oct 31 18:22:21 2017 New Revision: 325242 URL: https://svnweb.freebsd.org/changeset/base/325242 Log: Use mp_maxid when iterating over CPUs as we may have sparse id allocations. Sponsored by: DARPA, AFRL Modified: head/sys/arm64/arm64/gicv3_its.c Modified: head/sys/arm64/arm64/gicv3_its.c ============================================================================== --- head/sys/arm64/arm64/gicv3_its.c Tue Oct 31 17:50:42 2017 (r325241) +++ head/sys/arm64/arm64/gicv3_its.c Tue Oct 31 18:22:21 2017 (r325242) @@ -557,7 +557,7 @@ gicv3_its_pendtables_init(struct gicv3_its_softc *sc) { int i; - for (i = 0; i < mp_ncpus; i++) { + for (i = 0; i <= mp_maxid; i++) { if (CPU_ISSET(i, &sc->sc_cpus) == 0) continue; @@ -736,7 +736,7 @@ gicv3_its_attach(device_t dev) gicv3_its_cmdq_init(sc); /* Allocate the per-CPU collections */ - for (int cpu = 0; cpu < mp_ncpus; cpu++) + for (int cpu = 0; cpu <= mp_maxid; cpu++) if (CPU_ISSET(cpu, &sc->sc_cpus) != 0) sc->sc_its_cols[cpu] = malloc( sizeof(*sc->sc_its_cols[0]), M_GICV3_ITS,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710311822.v9VIMLP6042293>