As with r325242 use mp_maxid when iterating over CPUs in the GICv3 driver.
Sponsored by: DARPA, AFRL
This commit is contained in:
parent
651c6845c7
commit
2ed578e1db
@ -343,7 +343,7 @@ gic_v3_detach(device_t dev)
|
|||||||
for (rid = 0; rid < (sc->gic_redists.nregions + 1); rid++)
|
for (rid = 0; rid < (sc->gic_redists.nregions + 1); rid++)
|
||||||
bus_release_resource(dev, SYS_RES_MEMORY, rid, sc->gic_res[rid]);
|
bus_release_resource(dev, SYS_RES_MEMORY, rid, sc->gic_res[rid]);
|
||||||
|
|
||||||
for (i = 0; i < mp_ncpus; i++)
|
for (i = 0; i <= mp_maxid; i++)
|
||||||
free(sc->gic_redists.pcpu[i], M_GIC_V3);
|
free(sc->gic_redists.pcpu[i], M_GIC_V3);
|
||||||
|
|
||||||
free(sc->gic_res, M_GIC_V3);
|
free(sc->gic_res, M_GIC_V3);
|
||||||
@ -895,7 +895,7 @@ gic_v3_ipi_send(device_t dev, struct intr_irqsrc *isrc, cpuset_t cpus,
|
|||||||
val = 0;
|
val = 0;
|
||||||
|
|
||||||
/* Iterate through all CPUs in set */
|
/* Iterate through all CPUs in set */
|
||||||
for (i = 0; i < mp_ncpus; i++) {
|
for (i = 0; i <= mp_maxid; i++) {
|
||||||
/* Move to the next affinity group */
|
/* Move to the next affinity group */
|
||||||
if (aff != GIC_AFFINITY(i)) {
|
if (aff != GIC_AFFINITY(i)) {
|
||||||
/* Send the IPI */
|
/* Send the IPI */
|
||||||
@ -1103,7 +1103,7 @@ gic_v3_redist_alloc(struct gic_v3_softc *sc)
|
|||||||
u_int cpuid;
|
u_int cpuid;
|
||||||
|
|
||||||
/* Allocate struct resource for all CPU's Re-Distributor registers */
|
/* Allocate struct resource for all CPU's Re-Distributor registers */
|
||||||
for (cpuid = 0; cpuid < mp_ncpus; cpuid++)
|
for (cpuid = 0; cpuid <= mp_maxid; cpuid++)
|
||||||
if (CPU_ISSET(cpuid, &all_cpus) != 0)
|
if (CPU_ISSET(cpuid, &all_cpus) != 0)
|
||||||
sc->gic_redists.pcpu[cpuid] =
|
sc->gic_redists.pcpu[cpuid] =
|
||||||
malloc(sizeof(*sc->gic_redists.pcpu[0]),
|
malloc(sizeof(*sc->gic_redists.pcpu[0]),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user