Skip to contentSkip to conversation

pl330: Interrupt logic fix

PATCH New Peter Crosthwaite 2 participants 3 messages Apr 3, 2013 – Apr 5, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pl330: Interrupt logic fix

Hi Peter

I recently did a bringup of the common Linux kernel pl330 driver as instantiated in Zynq. Just the one QEMU bug discovered in the process, with the interrupt logic.

Regards,
Peter

Peter Crosthwaite (1):
pl330: Dont inhibit ES bits on INTEN

 hw/pl330.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
#1 lore raw

PATCH 1/1 pl330: Dont inhibit ES bits on INTEN

This if-else logic inhibits setting of the event status (ES) bits when interrupts are enabled. This is incorrect. ES should be set regardless on INTEN state. INTEN only inhibits the signalling of events to PL330 threads, not setting of the ES register.

---

 hw/pl330.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
hw/pl330.c +1 -2
index 1a04773..60aa4a8 100644
@@ -870,9 +870,8 @@ static void pl330_dmasev(PL330Chan *ch, uint8_t opcode, uint8_t *args, int len)
         ch->parent->int_status |= (1 << ev_id);
         DB_PRINT("event interrupt raised %d\n", ev_id);
         qemu_irq_raise(ch->parent->irq[ev_id]);
-    } else {
-        ch->parent->ev_status |= (1 << ev_id);
     }
+    ch->parent->ev_status |= (1 << ev_id);
 }
 
 static void pl330_dmast(PL330Chan *ch, uint8_t opcode, uint8_t *args, int len)
Signature · 1 line
1.7.0.4
#2 lore raw

Re: [Qemu-devel] [PATCH arm-devs v1] pl330: Dont inhibit ES bits on INTEN

Quoted 6 lines · Peter Crosthwaite

This if-else logic inhibits setting of the event status (ES) bits when interrupts are enabled. This is incorrect. ES should be set regardless on INTEN state. INTEN only inhibits the signalling of events to PL330 threads, not setting of the ES register.

Thanks, applied to arm-devs.next.

-- PMM