From: anton.vorontsov@linaro.org (Anton Vorontsov)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 09/14] tty/serial/amba-pl011: Implement clear_irqs callback
Date: Mon, 10 Sep 2012 10:56:01 -0700 [thread overview]
Message-ID: <20120910175601.GA13164@lizard> (raw)
In-Reply-To: <20120910121702.550b8a90@pyramind.ukuu.org.uk>
On Mon, Sep 10, 2012 at 12:17:02PM +0100, Alan Cox wrote:
[...]
> > +static void pl011_clear_irqs(struct uart_port *port)
> > +{
> > + struct uart_amba_port *uap = (struct uart_amba_port *)port;
> > + unsigned char __iomem *regs = uap->port.membase;
> > +
> > + writew(readw(regs + UART011_MIS), regs + UART011_ICR);
> > + /*
> > + * There is no way to clear TXIM, this is "ready to transmit IRQ", so
> > + * we simply mask it. ops->start_tx will unmask it.
> > + */
>
> Not if you race here with the transmit start it won't.
True, the race is possible. But I guess there will be no harm: only non-polling
code uses ->start_tx(), but then we don't care, the port is used for NMI
debugger, so the worst that can happen, is that we'll get another NMI just
after the race, and so we'll mask it again.
And once we release the port from KDB, we never call this function anymore
(since normal IRQ routine will be called instead).
I guess I need to add some commens about this.
Thanks!
next prev parent reply other threads:[~2012-09-10 17:56 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-10 4:08 [PATCH v5 0/14] KGDB/KDB FIQ (NMI) debugger Anton Vorontsov
2012-09-10 4:11 ` [PATCH 01/14] serial/amba-pl011: fix ages old copy-paste errors Anton Vorontsov
2012-09-10 4:12 ` [PATCH 02/14] drivers/tty/serial/amba-pl0{10,11}.c: use clk_prepare_enable and clk_disable_unprepare Anton Vorontsov
2012-09-10 4:12 ` [PATCH 03/14] kernel/debug: Mask KGDB NMI upon entry Anton Vorontsov
2012-09-10 4:13 ` [PATCH 04/14] kdb: Implement disable_nmi command Anton Vorontsov
2012-09-10 4:13 ` [PATCH 05/14] kdb: Turn KGDB_KDB=n stubs into static inlines Anton Vorontsov
2012-09-10 4:13 ` [PATCH 06/14] tty/serial/core: Introduce poll_init callback Anton Vorontsov
2012-09-10 11:13 ` Alan Cox
2012-09-10 17:57 ` Anton Vorontsov
2012-09-10 19:18 ` Alan Cox
2012-09-10 4:13 ` [PATCH 07/14] tty/serial/amba-pl011: Implement " Anton Vorontsov
2012-09-10 4:13 ` [PATCH 08/14] tty/serial/kgdboc: Add and wire up clear_irqs callback Anton Vorontsov
2012-09-10 11:16 ` Alan Cox
2012-09-10 17:57 ` Anton Vorontsov
2012-09-10 19:19 ` Alan Cox
2012-09-10 20:13 ` Anton Vorontsov
2012-09-10 4:14 ` [PATCH 09/14] tty/serial/amba-pl011: Implement " Anton Vorontsov
2012-09-10 11:17 ` Alan Cox
2012-09-10 17:56 ` Anton Vorontsov [this message]
2012-09-10 4:14 ` [PATCH 10/14] tty/serial: Add kgdb_nmi driver Anton Vorontsov
2012-09-10 11:11 ` Alan Cox
2012-09-10 17:54 ` Anton Vorontsov
2012-09-10 4:14 ` [PATCH 11/14] ARM: Move some macros from entry-armv to entry-header Anton Vorontsov
2012-09-10 4:14 ` [PATCH 12/14] ARM: Add KGDB/KDB FIQ debugger generic code Anton Vorontsov
2012-09-10 4:14 ` [PATCH 13/14] ARM: VIC: Add a couple of low-level FIQ management helpers Anton Vorontsov
2012-09-10 4:14 ` [PATCH 14/14] ARM: versatile: Make able to use UART ports for KGDB FIQ debugger Anton Vorontsov
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=20120910175601.GA13164@lizard \
--to=anton.vorontsov@linaro.org \
--cc=linux-arm-kernel@lists.infradead.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 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).