From: Julien Grall <julien.grall@linaro.org>
To: Vijay Kilari <vijay.kilari@gmail.com>,
Ian Campbell <Ian.Campbell@citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Tim Deegan <tim@xen.org>
Cc: "xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: xen/arm: uart interrupts handling
Date: Thu, 04 Dec 2014 13:51:58 +0000 [thread overview]
Message-ID: <548066FE.90905@linaro.org> (raw)
In-Reply-To: <CALicx6trd6Pvsit0LfbC66JU5G3r+1XTt0d-h0DLo8rd31X9vw@mail.gmail.com>
On 04/12/14 03:50, Vijay Kilari wrote:
> Hi Tim,
Hi Vijay,
> I see that on uart interrupt, ICR is written to clear the all
> interrupts except TX, RX and RX timeout. With this, cpu always finds
> TX/RX is active and never
> comes out of the loop.
FWIW, the PL011 serial code has been copied from the Linux drivers.
Linux interrupt handler also clear all interrupts except TX, RX, RX
timeout. So do you see the issue on Linux?
>
> With the below changes, TX, RX & RTI are cleared before handling this
> interrupts.
>
> Is my observation is correct?. If so I wonder how it is working on
> platforms that
> are using pl011. Without this for my cpu just keeps looping here.
>
> index fba0a55..d21bce3 100644
> --- a/xen/drivers/char/pl011.c
> +++ b/xen/drivers/char/pl011.c
> @@ -63,7 +63,7 @@ static void pl011_interrupt(int irq, void *data,
> struct cpu_user_regs *regs)
> {
> do
> {
> - pl011_write(uart, ICR, status & ~(TXI|RTI|RXI));
> + pl011_write(uart, ICR, status & (TXI|RTI|RXI));
This changes looks wrong to me. We want to clear the bit in status we
don't handle. Otherwise the interrupt will be fired in loop.
If I'm not mistaken, TXI/RTI/RXI will be cleared when data is read or
write into the fifo. So we should not clear automatically.
Regards,
--
Julien Grall
next prev parent reply other threads:[~2014-12-04 13:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-04 3:50 xen/arm: uart interrupts handling Vijay Kilari
2014-12-04 13:51 ` Julien Grall [this message]
2014-12-04 15:40 ` Tim Deegan
2014-12-05 0:46 ` Vijay Kilari
2014-12-05 10:52 ` Julien Grall
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=548066FE.90905@linaro.org \
--to=julien.grall@linaro.org \
--cc=Ian.Campbell@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=tim@xen.org \
--cc=vijay.kilari@gmail.com \
--cc=xen-devel@lists.xen.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.