mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bjorn.helgaas@hp.com>
To: Andi Kleen <ak@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Yinghai Lu <Yinghai.Lu@sun.com>,
	Gerd Hoffmann <kraxel@redhat.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH]serial: make early_uart to use early_prarm instead of console_initcall
Date: Mon, 21 May 2007 10:27:38 -0600	[thread overview]
Message-ID: <200705211027.38958.bjorn.helgaas@hp.com> (raw)
In-Reply-To: <20070521104221.GU2012@bingen.suse.de>

On Monday 21 May 2007 04:42:21 am Andi Kleen wrote:
> On Sun, May 20, 2007 at 08:23:32PM -0700, Andrew Morton wrote:
> > I'll queue this up for some testing, but I'd be a bit reluctant to send it
> > into Linus due to my poor understanding of what it actually does.  What
> > _is_ an early console, and how does it differ from a non-early one?
> 
> It is someone's reimplemention of earlyprintk= for another architecture

I implemented 8250_early for ia64.  It is based on early_printk and
is quite similar to it.

One important difference is that early_printk has the "ttyS0 is at
0x3f8" knowledge compiled into it.  That doesn't work for ia64
because ttyS0 may be anywhere.

Since 8250_early doesn't assume the ttyS locations, you have to tell
it the device address, not the name.  Some ia64 firmware tells the OS
the address of the console device.  With 8250_early, if the user wants
the OS to use the same console as the firmware, he doesn't need any
"console=" argument at all.

The other important difference is that 8250_early tries to coordinate
with the normal 8250 console driver.  For example, if you use
"console=uart,io,0x3f8", 8250_early works like early_printk does,
and then automatically switches to the normal 8250 driver later.  With
early_printk, I think you would have to use "earlyprintk=serial,ttyS0
console=ttyS0" to do the same thing.

> that happens to mostly work on x86 too because the code is not ifdeffed.

8250_early has no arch dependency, so there's no reason to ifdef it.
It only depends on ioremap/inb/outb/readb/writeb.

> I don't think it makes much sense on x86 though because earlyprintk exists.

There are two reasons 8250_early might make sense on x86:

  - x86 firmware might someday tell the OS where the console is
    (e.g., via drivers/firmware/pcdp.c).  That requires a way to
    locate the device by its address, not by the name.

  - You only have to specify the console device once, not twice.

On the other hand, maybe you *want* the earlyprintk device to be
a different device than the regular console.  8250_early wouldn't
handle that very well.

Bjorn

      parent reply	other threads:[~2007-05-21 16:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-19  2:00 Yinghai Lu
2007-05-21  3:23 ` Andrew Morton
2007-05-21  4:29   ` Yinghai Lu
2007-05-21  4:46     ` Andrew Morton
2007-05-21  6:56       ` Yinghai Lu
2007-05-21 16:53         ` Bjorn Helgaas
2007-05-21 17:36           ` Yinghai Lu
2007-05-21 18:02             ` Bjorn Helgaas
2007-05-21 18:39               ` Yinghai Lu
2007-05-21 10:22     ` Gerd Hoffmann
2007-05-21 16:39       ` Yinghai Lu
2007-05-21 10:42   ` Andi Kleen
2007-05-21 16:27     ` Bjorn Helgaas
2007-05-21 16:27     ` Yinghai Lu
2007-05-21 16:27     ` Bjorn Helgaas [this message]

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=200705211027.38958.bjorn.helgaas@hp.com \
    --to=bjorn.helgaas@hp.com \
    --cc=Yinghai.Lu@sun.com \
    --cc=ak@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=kraxel@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.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

all inboxes | Powered by JetHome®