mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: David Woodhouse <dwmw2@infradead.org>
Cc: David Brownell <david-b@pacbell.net>,
	alan@lxorguk.ukuu.org.uk, Ingo Molnar <mingo@elte.hu>,
	David VomLehn <dvomlehn@cisco.com>,
	Arjan van de Ven <arjan@infradead.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux USB Mailing List <linux-usb@vger.kernel.org>,
	Linux Embedded Mailing List <linux-embedded@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: Wait for console to become available, v3.2
Date: Tue, 21 Apr 2009 10:31:48 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.2.00.0904211016190.2199@localhost.localdomain> (raw)
In-Reply-To: <1240333871.3632.70.camel@macbook.infradead.org>



On Tue, 21 Apr 2009, David Woodhouse wrote:
> 
> We can provide un-hooked-up /dev/console though. Rather than just
> failing to open it, why can't we make __tty_open() give you a dummy tty
> driver which is basically equivalent to /dev/null? And then 'replace' it
> with the real console driver if/when that later gets registered? The
> latter will be a high-caffeine job, but surely not impossible?

This sounds like a good option. 

Right now we look through all the console_drivers at open time in that

	struct tty_driver *console_device(int *index)

thing, but it should be possible to just do something like

	static struct tty_driver console_driver;

and then just make "console_device()" always return _that_ tty driver 
instead. Then, we could make that console_device tty driver just at 
run-time spread the IO to the proper device(s), rather than fix the one 
particular device at "open()" time.

[ Actually, looking closer we should not use that particular name: we 
  already have something called a "console_driver" which is really the 
  "current VT" driver.

  So we should call it 'system_console_device' or something, but you 
  get the idea. ]

Anybody want to try it? Just make it ignore any IO if there are no 
registered consoles. The patch shouldn't even be all that big, I suspect.

		Linus

  parent reply	other threads:[~2009-04-21 17:40 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-20 23:40 David VomLehn
2009-04-21  6:43 ` Ingo Molnar
2009-04-21  7:13   ` David Brownell
2009-04-21  8:03     ` Ingo Molnar
2009-04-21 17:11     ` David Woodhouse
2009-04-21 17:29       ` David VomLehn
2009-04-21 17:37         ` Linus Torvalds
2009-04-21 17:59           ` David VomLehn
2009-04-21 17:41         ` David Woodhouse
2009-04-21 17:31       ` Linus Torvalds [this message]
2009-04-21 19:25         ` Alan Cox
2009-04-21 23:17           ` David VomLehn
2009-04-22  8:25         ` Jamie Lokier
2009-04-22  9:11           ` Alan Cox
2009-04-22 10:39             ` Jamie Lokier
2009-04-21 13:35   ` Arjan van de Ven
2009-04-21 13:50     ` Ingo Molnar
2009-04-21 14:05       ` Jamie Lokier
2009-04-21 14:26         ` Ingo Molnar
2009-04-21 14:37           ` Alan Cox
2009-04-22  8:22             ` Jamie Lokier
2009-04-22  9:13               ` Alan Cox
2009-04-21 16:42           ` David VomLehn
2009-04-21 14:36         ` Alan Stern
2009-04-21 16:52           ` David VomLehn
2009-04-21 19:09             ` Alan Stern
2009-04-21 23:08               ` David VomLehn
2009-04-22 15:40                 ` Alan Stern
2009-04-22 20:54                   ` David VomLehn
2009-04-22 21:08                     ` Alan Cox
2009-04-22 21:24                       ` Alan Stern
2009-04-24  0:35                         ` David VomLehn
2009-04-24 19:20                           ` Alan Stern
2009-04-24 21:32                             ` David VomLehn
2009-04-24 22:19                               ` Jamie Lokier
2009-04-24 23:10                                 ` David VomLehn
2009-04-25  1:41                                   ` Jamie Lokier
2009-04-25  3:11                                     ` Alan Stern
2009-04-26 19:52                                       ` Jamie Lokier
2009-04-26 21:20                                         ` Alan Stern
2009-04-26 21:37                                           ` Jamie Lokier
2009-04-26 22:36                                             ` Kay Sievers
2009-04-26 23:12                                               ` Jamie Lokier
2009-04-26 23:23                                                 ` Kay Sievers
2009-04-26 23:46                                                   ` Jamie Lokier
2009-04-26 17:55                                     ` David VomLehn
2009-04-22  5:35               ` David VomLehn

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=alpine.LFD.2.00.0904211016190.2199@localhost.localdomain \
    --to=torvalds@linux-foundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=arjan@infradead.org \
    --cc=david-b@pacbell.net \
    --cc=dvomlehn@cisco.com \
    --cc=dwmw2@infradead.org \
    --cc=hpa@zytor.com \
    --cc=linux-embedded@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    /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®