Skip to contentSkip to conversation

target-arm: Fix soft interrupt in GIC distributor

PATCH In review Adam Lackorzynski 2 participants 3 messages Feb 15, 2011 – Feb 21, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 2/3 target-arm: Fix soft interrupt in GIC distributor

Fix selection of target list filter mode.

---
 hw/arm_gic.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
hw/arm_gic.c +2 -2
index e6b1953..0e934ec 100644
@@ -549,10 +549,10 @@ static void gic_dist_writel(void *opaque, target_phys_addr_t offset,
             mask = (value >> 16) & ALL_CPU_MASK;
             break;
         case 1:
-            mask = 1 << cpu;
+            mask = ALL_CPU_MASK ^ (1 << cpu);
             break;
         case 2:
-            mask = ALL_CPU_MASK ^ (1 << cpu);
+            mask = 1 << cpu;
             break;
         default:
             DPRINTF("Bad Soft Int target filter\n");
Signature · 7 lines
1.7.2.3


Adam
-- 
Adam                 [email protected]
  Lackorzynski         http://os.inf.tu-dresden.de/~adam/
#1 lore raw
Quoted 16 lines · Adam Lackorzynski

Fix selection of target list filter mode.

---
 hw/arm_gic.c |    4 ++--

 1 files changed, 2 insertions(+), 2 deletions(-)
hw/arm_gic.c +0 -0
index e6b1953..0e934ec 100644
@@ -549,10 +549,10 @@ static void gic_dist_writel(void *opaque, target_phys_addr_t offset,
             mask = (value >> 16) & ALL_CPU_MASK;
             break;

        case 1:
-            mask = 1 << cpu;

Quoted 8 lines

+            mask = ALL_CPU_MASK ^ (1 << cpu); break;
        case 2:
-            mask = ALL_CPU_MASK ^ (1 << cpu);
+            mask = 1 << cpu;
            break;
        default:
            DPRINTF("Bad Soft Int target filter\n");

This looks like a good fix based on the TRM; however I don't have an A9-based image to hand to test with so I've asked a colleague to give it a quick smoke test before I formally mark it as reviewed-by me (probably some time next week).

thanks
-- PMM