qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/1] arm_gic: gic_update should always update all cores.
@ 2014-11-13 17:08 Johan Karlsson
  2015-06-05 12:48 ` Peter Maydell
  0 siblings, 1 reply; 2+ messages in thread
From: Johan Karlsson @ 2014-11-13 17:08 UTC (permalink / raw)
  To: qemu-devel@nongnu.org; +Cc: peter.maydell@linaro.org

This patch fixes so that gic_update always updates all the cores with new pending irq states.
If the function returns early it is possible to get interrupts that has already been acknowledged.

Signed-off-by: Johan Karlsson <johan.karlsson@enea.com>

diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c
index 270ce05..f1641f5 100644
--- a/hw/intc/arm_gic.c
+++ b/hw/intc/arm_gic.c
@@ -61,7 +61,7 @@ void gic_update(GICState *s)
         s->current_pending[cpu] = 1023;
         if (!s->enabled || !s->cpu_enabled[cpu]) {
             qemu_irq_lower(s->parent_irq[cpu]);
-            return;
+            continue;
         }
         best_prio = 0x100;
         best_irq = 1023;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH 1/1] arm_gic: gic_update should always update all cores.
  2014-11-13 17:08 [Qemu-devel] [PATCH 1/1] arm_gic: gic_update should always update all cores Johan Karlsson
@ 2015-06-05 12:48 ` Peter Maydell
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Maydell @ 2015-06-05 12:48 UTC (permalink / raw)
  To: Johan Karlsson; +Cc: qemu-devel@nongnu.org

On 13 November 2014 at 17:08, Johan Karlsson <Johan.Karlsson@enea.com> wrote:
> This patch fixes so that gic_update always updates all the cores with new pending irq states.
> If the function returns early it is possible to get interrupts that has already been acknowledged.
>
> Signed-off-by: Johan Karlsson <johan.karlsson@enea.com>
>
> diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c
> index 270ce05..f1641f5 100644
> --- a/hw/intc/arm_gic.c
> +++ b/hw/intc/arm_gic.c
> @@ -61,7 +61,7 @@ void gic_update(GICState *s)
>          s->current_pending[cpu] = 1023;
>          if (!s->enabled || !s->cpu_enabled[cpu]) {
>              qemu_irq_lower(s->parent_irq[cpu]);
> -            return;
> +            continue;
>          }
>          best_prio = 0x100;
>          best_irq = 1023;

Oops, this dropped through the cracks of the review process, but
Johan just pinged me on IRC about it.

Applied to target-arm.next, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-05 12:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-13 17:08 [Qemu-devel] [PATCH 1/1] arm_gic: gic_update should always update all cores Johan Karlsson
2015-06-05 12:48 ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).