Re: [PATCH] CON_BOOT

2005-03-16 Thread Andrew Morton
James Simmons <[EMAIL PROTECTED]> wrote: > > Where is this patch? From: Matthew Wilcox <[EMAIL PROTECTED]> CON_BOOT is like early printk in that it allows for output really early on. It's better than early printk because it unregisters automatically when a real console is initialised. So if

Re: [PATCH] CON_BOOT

2005-03-16 Thread James Simmons
Where is this patch? The work looks like the stuff I did a few years ago. On Wed, 16 Mar 2005, Andrew Morton wrote: > Matthew Wilcox <[EMAIL PROTECTED]> wrote: > > > > I think it's doable > > if we do something like: > > > > - Add an int (*takeover)(struct console *); to struct console >

Re: [PATCH] CON_BOOT

2005-03-16 Thread James Simmons
> You're spot on, we get no info. That's why there's a bunch of kludges > around, mostly called early_printk. But most people use x86 and they > get console output sufficiently early anyway because they know their > serial port is at 0x3f8 ... > > I just realised that with CON_BOOT, we could

Re: [PATCH] CON_BOOT

2005-03-16 Thread Matthew Wilcox
On Wed, Mar 16, 2005 at 01:09:48PM -0800, Andrew Morton wrote: > It doesn't sound terribly important - I was just curious, thanks. We can > let this one be demand-driven. OK, thanks ;-) > I'm surprised that more systems don't encounter this - there's potentially > quite a gap between

Re: [PATCH] CON_BOOT

2005-03-16 Thread Andrew Morton
Matthew Wilcox <[EMAIL PROTECTED]> wrote: > > I think it's doable > if we do something like: > > - Add an int (*takeover)(struct console *); to struct console > - Replace the hunk above with: > > for (existing = console_drivers; existing; existing = existing->next) { >

Re: [PATCH] CON_BOOT

2005-03-16 Thread Matthew Wilcox
On Tue, Mar 15, 2005 at 02:37:11PM -0800, Andrew Morton wrote: > Matthew Wilcox <[EMAIL PROTECTED]> wrote: > > > > + if (console_drivers && (console_drivers->flags & CON_BOOT)) { > > + unregister_console(console_drivers); > > + console->flags &= ~CON_PRINTBUFFER; > > + } >

Re: [PATCH] CON_BOOT

2005-03-16 Thread Matthew Wilcox
On Tue, Mar 15, 2005 at 02:37:11PM -0800, Andrew Morton wrote: Matthew Wilcox [EMAIL PROTECTED] wrote: + if (console_drivers (console_drivers-flags CON_BOOT)) { + unregister_console(console_drivers); + console-flags = ~CON_PRINTBUFFER; + } + Should we

Re: [PATCH] CON_BOOT

2005-03-16 Thread Andrew Morton
Matthew Wilcox [EMAIL PROTECTED] wrote: I think it's doable if we do something like: - Add an int (*takeover)(struct console *); to struct console - Replace the hunk above with: for (existing = console_drivers; existing; existing = existing-next) { if

Re: [PATCH] CON_BOOT

2005-03-16 Thread Matthew Wilcox
On Wed, Mar 16, 2005 at 01:09:48PM -0800, Andrew Morton wrote: It doesn't sound terribly important - I was just curious, thanks. We can let this one be demand-driven. OK, thanks ;-) I'm surprised that more systems don't encounter this - there's potentially quite a gap between console_init()

Re: [PATCH] CON_BOOT

2005-03-16 Thread James Simmons
You're spot on, we get no info. That's why there's a bunch of kludges around, mostly called early_printk. But most people use x86 and they get console output sufficiently early anyway because they know their serial port is at 0x3f8 ... I just realised that with CON_BOOT, we could

Re: [PATCH] CON_BOOT

2005-03-16 Thread James Simmons
Where is this patch? The work looks like the stuff I did a few years ago. On Wed, 16 Mar 2005, Andrew Morton wrote: Matthew Wilcox [EMAIL PROTECTED] wrote: I think it's doable if we do something like: - Add an int (*takeover)(struct console *); to struct console - Replace

Re: [PATCH] CON_BOOT

2005-03-16 Thread Andrew Morton
James Simmons [EMAIL PROTECTED] wrote: Where is this patch? From: Matthew Wilcox [EMAIL PROTECTED] CON_BOOT is like early printk in that it allows for output really early on. It's better than early printk because it unregisters automatically when a real console is initialised. So if you

Re: [PATCH] CON_BOOT

2005-03-15 Thread Andrew Morton
Matthew Wilcox <[EMAIL PROTECTED]> wrote: > > + if (console_drivers && (console_drivers->flags & CON_BOOT)) { > + unregister_console(console_drivers); > + console->flags &= ~CON_PRINTBUFFER; > + } > + Should we support more than a single CON_BOOT-labelled driver? -

[PATCH] CON_BOOT

2005-03-15 Thread Matthew Wilcox
New console flag: CON_BOOT CON_BOOT is like early printk in that it allows for output really early on. It's better than early printk because it unregisters automatically when a real console is initialised. So if you don't get consoles registering in console_init, there isn't a huge delay

[PATCH] CON_BOOT

2005-03-15 Thread Matthew Wilcox
New console flag: CON_BOOT CON_BOOT is like early printk in that it allows for output really early on. It's better than early printk because it unregisters automatically when a real console is initialised. So if you don't get consoles registering in console_init, there isn't a huge delay

Re: [PATCH] CON_BOOT

2005-03-15 Thread Andrew Morton
Matthew Wilcox [EMAIL PROTECTED] wrote: + if (console_drivers (console_drivers-flags CON_BOOT)) { + unregister_console(console_drivers); + console-flags = ~CON_PRINTBUFFER; + } + Should we support more than a single CON_BOOT-labelled driver? - To