hw/arm_gic.c: Fix improper DPRINTF output.
PATCH 1/1 hw/arm_gic.c: Fix improper DPRINTF output.
s->cpu_enabled is a massive, so s->cpu_enabled ? "En" : "Dis" returns "En" always. We should use s->cpu_enabled[cpu] here.
--- hw/arm_gic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/arm_gic.c +1 -1
@@ -566,7 +566,7 @@ static void gic_cpu_write(gic_state *s, int cpu, int offset, uint32_t value)switch (offset) {case 0x00 :/* Control */ s->cpu_enabled[cpu] = (value &1 ); -DPRINTF ("CPU %d %sabled\n" , cpu, s->cpu_enabled ?"En" :"Dis" ); +DPRINTF ("CPU %d %sabled\n" , cpu, s->cpu_enabled[cpu] ?"En" :"Dis" );break ;case 0x04 :/* Priority mask */ s->priority_mask[cpu] = (value &0xff );
Signature · 1 line
1.7.9.5
Quoted 1 line · Evgeny Voevodin
s->cpu_enabledis a massive, sos->cpu_enabled? "En" : "Dis" returns
"is an array"
Quoted 3 lines
"En" always. We should use s->cpu_enabled[cpu] here.
Signed-off-by Evgeny Voevodin <[email protected]>
...but nice catch.
-- PMM
PATCH 1/1 hw/arm_gic.c: Fix improper DPRINTF output.
s->cpu_enabled is an array, so s->cpu_enabled ? "En" : "Dis" returns "En" always. We should use s->cpu_enabled[cpu] here.
--- hw/arm_gic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/arm_gic.c +1 -1
@@ -566,7 +566,7 @@ static void gic_cpu_write(gic_state *s, int cpu, int offset, uint32_t value)switch (offset) {case 0x00 :/* Control */ s->cpu_enabled[cpu] = (value &1 ); -DPRINTF ("CPU %d %sabled\n" , cpu, s->cpu_enabled ?"En" :"Dis" ); +DPRINTF ("CPU %d %sabled\n" , cpu, s->cpu_enabled[cpu] ?"En" :"Dis" );break ;case 0x04 :/* Priority mask */ s->priority_mask[cpu] = (value &0xff );
Signature · 1 line
1.7.9.5
Quoted 13 lines · Evgeny Voevodin
s->cpu_enabledis an array, sos->cpu_enabled? "En" : "Dis" returns "En" always. We should use s->cpu_enabled[cpu] here.Signed-off-by Evgeny Voevodin <[email protected]>--- hw/arm_gic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)hw/arm_gic.c +0
-0
hw/arm_gic.c static void gic_cpu_write(gic_state *s, int cpu, int offset, uint32_t value) · line 572
Quoted 8 lines
hw/arm_gic.c +1
-1@@ -566,7 +566,7 @@ static void gic_cpu_write(gic_state *s, int cpu, int offset, uint32_t value)switch (offset) {case 0x00 :/* Control */ s->cpu_enabled[cpu] = (value &1 ); -DPRINTF ("CPU %d %sabled\n" , cpu, s->cpu_enabled ?"En" :"Dis" ); +DPRINTF ("CPU %d %sabled\n" , cpu, s->cpu_enabled[cpu] ?"En" :"Dis" );break ;case 0x04 :/* Priority mask */ s->priority_mask[cpu] = (value &0xff );
Did anybody pick this up?
Signature · 6 lines
Kind regards, Evgeny Voevodin, Technical Leader, Mobile Group, Samsung Moscow Research Center, e-mail: [email protected]
Quoted 6 lines · Evgeny Voevodin
Quoted 3 lines · Evgeny Voevodin
s->cpu_enabledis an array, sos->cpu_enabled? "En" : "Dis" returns "En" always. We should use s->cpu_enabled[cpu] here.Did anybody pick this up?
Yeah, I've put it in arm-devs.next.
-- PMM