linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] ARM: Add inituart macro to initialize DEBUG_LL serial port based on the machine ID
Date: Fri, 4 Feb 2011 08:44:37 -0800	[thread overview]
Message-ID: <20110204164436.GT3322@atomide.com> (raw)
In-Reply-To: <20110204123220.GG15004@n2100.arm.linux.org.uk>

* Russell King - ARM Linux <linux@arm.linux.org.uk> [110204 04:31]:
> On Fri, Feb 04, 2011 at 08:39:34AM +0000, Russell King - ARM Linux wrote:
> > Can't we just hard-configure the virtual/physical address at build
> > time and be done with it?
> > 
> > I've given up with the current state of affairs which tries to use the
> > platform ID to select the UART to use as it never seems to work, and I
> > have a couple of patches which hard-code the address at compile time -
> > one for the SDP4430 board and one for the LDP3430 board.
> > 
> > If it's complicated, then it probably won't work.  Keep it simple.
> > That's especially true for debugging code, otherwise you need extra
> > debugging code to debug why the debugging code doesn't work.
> 
> There's another good reason to hard-configure the UART port rather
> than select it by ID.
> 
> The common usage scenario: you're bringing up a new board.  You know
> you're going to have your console connected to UART2.  So, no matter
> what you want your debug messages to come out of UART2 even if the
> machine ID is wrong.

Yes that's an important debugging case too. Another common use
case is "this kernel boots on machines a and b, but fails to boot
on c and d".
 
> By detecting the UART port from the machine number, you immediately
> lose that ability, and therefore the confidence, that "if I build the
> kernel for X with LL debug enabled, and monitor port Y, I will get
> messages out of port Y, and not some other random port Z which I'd to
> solder wires to to monitor."

True, but that easily also leads to confusion on why some kernel only
boots on one machine. So maybe we can do something that can easily be
selected in Kconfig for forcing certain port?
 
> In other words, no messages on the monitored port changes from "we didn't
> get into the kernel, or something early in the kernel boot before the C
> code went wrong" to "... or maybe the debugging code failed to get the
> right port too."
> 
> It is invaluable to know that the debugging code will always talk to
> the same UART which you're monitoring.

I'll take a look how we can allow forcing the uart easily.

Regards,

Tony

  reply	other threads:[~2011-02-04 16:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-04  1:22 [PATCH 0/2] Allow using machine ID for DEBUG_LL macros Tony Lindgren
2011-02-04  1:22 ` [PATCH 1/2] ARM: Add inituart macro to initialize DEBUG_LL serial port based on the machine ID Tony Lindgren
2011-02-04  2:16   ` Nicolas Pitre
2011-02-04  8:39   ` Russell King - ARM Linux
2011-02-04 12:32     ` Russell King - ARM Linux
2011-02-04 16:44       ` Tony Lindgren [this message]
2011-02-04  1:22 ` [PATCH 2/2] ARM: Add empty inituart macros Tony Lindgren
2011-02-04  2:20   ` Nicolas Pitre
2011-02-04  3:07     ` Tony Lindgren
2011-02-04  2:02 ` [PATCH 0/2] Allow using machine ID for DEBUG_LL macros Nicolas Pitre
2011-02-04  3:13   ` Tony Lindgren
2011-02-04  3:39     ` Nicolas Pitre

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=20110204164436.GT3322@atomide.com \
    --to=tony@atomide.com \
    --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).