Skip to contentSkip to conversation

hw/intc/arm_gicv3_common: fix aff3 in typer

PATCH Applied Andrew Jones 2 participants 2 messages Dec 9, 2016 – Dec 13, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/intc/arm_gicv3_common: fix aff3 in typer

---
 hw/intc/arm_gicv3_common.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
hw/intc/arm_gicv3_common.c +2 -1
index 0f8c4b86e023..0aa9b9ca6655 100644
@@ -204,7 +204,8 @@ static void arm_gicv3_common_realize(DeviceState *dev, Error **errp)
         /* The CPU mp-affinity property is in MPIDR register format; squash
          * the affinity bytes into 32 bits as the GICR_TYPER has them.
          */
-        cpu_affid = (cpu_affid & 0xFF00000000ULL >> 8) | (cpu_affid & 0xFFFFFF);
+        cpu_affid = ((cpu_affid & 0xFF00000000ULL) >> 8) |
+                     (cpu_affid & 0xFFFFFF);
         s->cpu[i].gicr_typer = (cpu_affid << 32) |
             (1 << 24) |
             (i << 8) |
Signature · 1 line
2.9.3
#1 lore raw
Quoted 10 lines · Andrew Jones
---
 hw/intc/arm_gicv3_common.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
hw/intc/arm_gicv3_common.c +0 -0
index 0f8c4b86e023..0aa9b9ca6655 100644

hw/intc/arm_gicv3_common.c static void arm_gicv3_common_realize(DeviceState *dev, Error **errp) · line 211

Quoted 9 lines
hw/intc/arm_gicv3_common.c +2 -1
@@ -204,7 +204,8 @@ static void arm_gicv3_common_realize(DeviceState *dev, Error **errp)
         /* The CPU mp-affinity property is in MPIDR register format; squash
          * the affinity bytes into 32 bits as the GICR_TYPER has them.
          */
-        cpu_affid = (cpu_affid & 0xFF00000000ULL >> 8) | (cpu_affid & 0xFFFFFF);
+        cpu_affid = ((cpu_affid & 0xFF00000000ULL) >> 8) |
+                     (cpu_affid & 0xFFFFFF);
         s->cpu[i].gicr_typer = (cpu_affid << 32) |
             (1 << 24) |
             (i << 8) |

Oops :-)

Applied to target-arm.next for 2.9, thanks.

-- PMM