public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Robin Getz <rgetz@blackfin.uclinux.org>
Cc: mingo@elte.hu, linux-kernel@vger.kernel.org,
	torvalds@linux-foundation.org, vapier.adi@gmail.com,
	lethal@linux-sh.org
Subject: Re: [RFC v2] kernel/printk.c - handling more than one CON_BOOT
Date: Wed, 1 Jul 2009 12:44:14 -0700	[thread overview]
Message-ID: <20090701124414.fe188893.akpm@linux-foundation.org> (raw)
In-Reply-To: <200906302251.52966.rgetz@blackfin.uclinux.org>

On Tue, 30 Jun 2009 22:51:52 -0400
Robin Getz <rgetz@blackfin.uclinux.org> wrote:

> From: Robin Getz <rgetz@blackfin.uclinux.org>
> 
> Today, register_console() assumes the following usage:
>   - The first console to register with a flag set to CON_BOOT is the
>     one and only bootconsole.
>   - If another register_console() is called with an additional CON_BOOT,
>     it is silently rejected.
>   - As soon as a console without the CON_BOOT set calls registers
>     the bootconsole is automatically unregistered.
>   - Once there is a "real" console - register_console() will silently
>     reject any consoles with it's CON_BOOT flag set.

hm.  I never knew all that.  Thanks for taking the time to explain all
this - it helps.

I think it would be useful if we had a description of the new design,
similar to your description of the "Today" behaviour above.  Perhaps
as a comment over register_console()?

> In many systems (alpha, blackfin, microblaze, mips, powerpc, sh, & x86), there 
> are early_printk implementations, which use the CON_BOOT which come out 
> serial ports, vga, usb, & memory buffers. In many embedded systems, it would 
> be nice to have two - in case the primary fails, you always have access to a
> backup memory buffer - but this requires at least two CON_BOOT consoles.
> 
> This changeset allows multiple boot consoles, and changes the functionality
> to, be mostly the same as the above.
>  - Any number CON_BOOT consoles of can be registered
>  - A "real" console will unregister all the CON_BOOT consoles
>  - Once a "real" console is registered, no more CON_BOOT consoles 
>    can be added (still silently rejected)

Is the "silent" rejection desirable?  Perhaps that's a
programming/configuration error which the developer should be informed
of?


> diff -puN kernel/printk.c~kernel-printkc-handling-more-than-one-con_boot kernel/printk.c
> --- a/kernel/printk.c~kernel-printkc-handling-more-than-one-con_boot
> +++ a/kernel/printk.c
> @@ -37,6 +37,12 @@
>  #include <asm/uaccess.h>
>  
>  /*
> + * for_each_console() allows you to iterate on each console
> + */
> +#define for_each_console(con) \
> +	for (con = console_drivers; con != NULL; con = con->next)

hum.  Fair enough.


The patch looks good to me.

  reply	other threads:[~2009-07-01 19:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-29 11:03 RFC - printk handling more than one CON_BOOT Robin Getz
2009-06-30 22:25 ` Ingo Molnar
2009-06-30 23:05   ` Robin Getz
2009-06-30 23:14     ` Ingo Molnar
2009-07-01  0:29       ` Robin Getz
2009-07-01  2:51 ` [RFC v2] kernel/printk.c - " Robin Getz
2009-07-01 19:44   ` Andrew Morton [this message]
2009-07-01 20:50     ` Robin Getz
2009-07-01 21:01       ` Andrew Morton
2009-07-01 21:14         ` Ingo Molnar
2009-07-01 21:28         ` Robin Getz
2009-07-01 21:31         ` Robin Getz
2009-07-02  1:08 ` [PATCH] - printk " Robin Getz
2009-07-03  8:58   ` [tip:core/printk] printk: Enable the use of more than one CON_BOOT (early console) tip-bot for Robin Getz
2009-07-21 18:37   ` [PATCH] - printk handling more than one CON_BOOT Robin Getz

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=20090701124414.fe188893.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=lethal@linux-sh.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rgetz@blackfin.uclinux.org \
    --cc=torvalds@linux-foundation.org \
    --cc=vapier.adi@gmail.com \
    /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