linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH] Add an earlyprintk debug console
Date: Fri, 06 Nov 2009 12:22:10 +0000	[thread overview]
Message-ID: <1257510130.13580.38.camel@pc1117.cambridge.arm.com> (raw)
In-Reply-To: <20091105181501.GA7221@pengutronix.de>

Hi Uwe,

On Thu, 2009-11-05 at 18:15 +0000, Uwe Kleine-K?nig wrote:
> On Thu, Nov 05, 2009 at 12:35:12PM +0000, Catalin Marinas wrote:
> > diff --git a/arch/arm/kernel/early_printk.c b/arch/arm/kernel/early_printk.c
> > new file mode 100644
> > index 0000000..85aa2b2
> > --- /dev/null
> > +++ b/arch/arm/kernel/early_printk.c
> > @@ -0,0 +1,57 @@
> > +/*
> > + *  linux/arch/arm/kernel/early_printk.c
> > + *
> > + *  Copyright (C) 2009 Sascha Hauer <s.hauer@pengutronix.de>
> 
> <nitpick>
> remove one space before "linux" and "Copyright"
> </nitpick>

That's how many other files with Russell's copyright were written (e.g.
drivers/serial/serial_core.c, mmu.c etc.), so we just follow the
tradition :-).

> > +static void early_write(const char *s, unsigned n)
> > +{
> > +     while (n-- > 0) {
> > +             if (*s == '\n')
> > +                     printch('\r');
> > +             printch(*s);
> > +             s++;
> > +     }
> > +}
> 
> Can you better use uart_console_write here?  (If yes, don't forget to
> select CONFIG_SERIAL_CORE.)

This early console should work with ICE DCC as well, so adding the
uart_* calls may be a bit confusing (plus one more indirection of calls
to drop the first argument passed to printch by uart_console_write). The
x86 variant doesn't do this either.

-- 
Catalin

  reply	other threads:[~2009-11-06 12:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-05 12:35 [RFC PATCH] Add an earlyprintk debug console Catalin Marinas
2009-11-05 13:43 ` Sascha Hauer
2009-11-05 13:55 ` Pandita, Vikram
2009-11-05 18:17   ` Uwe Kleine-König
2009-11-05 18:15 ` Uwe Kleine-König
2009-11-06 12:22   ` Catalin Marinas [this message]
2009-11-07 22:05     ` Uwe Kleine-König
2009-11-05 20:36 ` Kristoffer Ericson
2009-11-10  7:56 ` Pavel Machek

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=1257510130.13580.38.camel@pc1117.cambridge.arm.com \
    --to=catalin.marinas@arm.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).