Skip to content

Commit

Permalink
Fix bug in per-CPU resource allocation for GICv3 redistributor.
Browse files Browse the repository at this point in the history
  • Loading branch information
semihalf-bodek-zbigniew committed Mar 11, 2015
1 parent aa7f775 commit d98edaf
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions sys/arm64/arm64/gic_v3.c
Expand Up @@ -459,15 +459,7 @@ gic_v3_redist_find(struct gic_v3_softc *sc)

/* Allocate struct resource for this CPU's Re-Distributor registers */
sc->gic_redists.pcpu[cpuid] =
malloc(sizeof(*sc->gic_redists.pcpu), M_GIC_V3, M_WAITOK);
if (sc->gic_redists.pcpu[cpuid] == NULL) {
if (bootverbose) {
device_printf(sc->dev,
"Could not allocate memory for CPU%u "
"Re-Distributor resource description\n", cpuid);
}
return (ENOMEM);
}
malloc(sizeof(*sc->gic_redists.pcpu[0]), M_GIC_V3, M_WAITOK);

aff = CPU_AFFINITY(cpuid);
/* Affinity in format for comparison with typer */
Expand Down

0 comments on commit d98edaf

Please sign in to comment.