All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoffer Dall <christoffer.dall@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Rob Herring <robh@kernel.org>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	qemu-devel@nongnu.org, patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH] hw/arm/virt: fix pl011 and pl031 irq flags
Date: Wed, 10 Sep 2014 12:43:28 +0200	[thread overview]
Message-ID: <20140910104328.GB3002@lvm> (raw)
In-Reply-To: <1410274423-9461-1-git-send-email-peter.maydell@linaro.org>

On Tue, Sep 09, 2014 at 03:53:43PM +0100, Peter Maydell wrote:
> The pl011 and pl031 devices both use level triggered interrupts,
> but the device tree we construct was incorrectly telling the
> kernel to configure the GIC to treat them as edge triggered.
> This meant that output from the pl011 would hang after a while.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> Cc: qemu-stable@nongnu.org
> ---
> Thanks to Christoffer Dall for figuring out the cause of the hangs here.
> 
>  hw/arm/virt.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> index e8f231e..1b343f0 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -371,7 +371,7 @@ static void create_uart(const VirtBoardInfo *vbi, qemu_irq *pic)
>                                       2, base, 2, size);
>      qemu_fdt_setprop_cells(vbi->fdt, nodename, "interrupts",
>                                 GIC_FDT_IRQ_TYPE_SPI, irq,
> -                               GIC_FDT_IRQ_FLAGS_EDGE_LO_HI);
> +                               GIC_FDT_IRQ_FLAGS_LEVEL_HI);
>      qemu_fdt_setprop_cells(vbi->fdt, nodename, "clocks",
>                                 vbi->clock_phandle, vbi->clock_phandle);
>      qemu_fdt_setprop(vbi->fdt, nodename, "clock-names",
> @@ -398,7 +398,7 @@ static void create_rtc(const VirtBoardInfo *vbi, qemu_irq *pic)
>                                   2, base, 2, size);
>      qemu_fdt_setprop_cells(vbi->fdt, nodename, "interrupts",
>                             GIC_FDT_IRQ_TYPE_SPI, irq,
> -                           GIC_FDT_IRQ_FLAGS_EDGE_LO_HI);
> +                           GIC_FDT_IRQ_FLAGS_LEVEL_HI);
>      qemu_fdt_setprop_cell(vbi->fdt, nodename, "clocks", vbi->clock_phandle);
>      qemu_fdt_setprop_string(vbi->fdt, nodename, "clock-names", "apb_pclk");
>      g_free(nodename);
> -- 
> 1.9.1
> 
I've been trying to figure out why we would see this particular hang
with SMP and not UP (or maybe it is just very much more unlikely to
happen with UP), but haven't been able to come up with a sequence of
events to support this yet.  It also worries me that we weren't seeing
this with KVM, since it indicates that we're either doing something
wrong in the KVM or QEMU GIC emulation code, potentially.

In any case, this patch is correct, so:

Acked-by: Christoffer Dall <christoffer.dall@linaro.org>

  reply	other threads:[~2014-09-10 10:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-09 14:53 [Qemu-devel] [PATCH] hw/arm/virt: fix pl011 and pl031 irq flags Peter Maydell
2014-09-10 10:43 ` Christoffer Dall [this message]
2014-09-10 10:48   ` Ard Biesheuvel
2014-09-10 11:32     ` Christoffer Dall
2014-09-10 12:42       ` Peter Crosthwaite

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140910104328.GB3002@lvm \
    --to=christoffer.dall@linaro.org \
    --cc=ard.biesheuvel@linaro.org \
    --cc=patches@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.