From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] fix DEBUG_LL DCC race condition
Date: Wed, 31 Oct 2012 16:36:15 +0000 [thread overview]
Message-ID: <20121031163615.GQ21164@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20121029151832.GA2162@sig21.net>
On Mon, Oct 29, 2012 at 04:18:32PM +0100, Johannes Stezenbach wrote:
> Trying to boot a kernel with I- and D-caches disabled
> sometimes hangs when DEBUG_LL output to DCC is enabled.
> Apparently the JTAG debugger sometimes reads the
> DCC register before busyuart could see the wDTRfull flag,
> thus busyuart spins in an endless loop.
This makes no sense. Why is busyuart spinning if it does _not_ see a
full flag? busyuart is supposed to spin _if_ the UART has data to be
sent. It's not supposed to spin if the data has been sent.
> The reason seems to be a misunderstanding of the purpose
> of the busyuart macro. For UART, waituart waits until
> there is space in the FIFO, and busyuart waits until
> the FIFO is empty (all data is sent).
> For DCC, busyuart should be identical to waituart since
> there is no FIFO.
Not quite. waituart is supposed to check that the flow control allows
the character to be sent _or_ it's supposed to do nothing. Look at
the 8250 implementation debug-8250.S - this is the first implementation,
authored by me, and therefore is the definitive implementation for this
stuff.
next prev parent reply other threads:[~2012-10-31 16:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-29 15:18 [PATCH] fix DEBUG_LL DCC race condition Johannes Stezenbach
2012-10-31 16:27 ` Tony Lindgren
2012-10-31 16:36 ` Russell King - ARM Linux [this message]
2012-10-31 17:08 ` Johannes Stezenbach
2012-10-31 17:25 ` [PATCH v2] " Johannes Stezenbach
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=20121031163615.GQ21164@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--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).