mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Mike Frysinger" <vapier.adi@gmail.com>
To: "Robin Getz" <rgetz@blackfin.uclinux.org>
Cc: "Andrew Morton" <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: early_printk accessing __log_buf
Date: Wed, 18 Jul 2007 19:53:04 -0400	[thread overview]
Message-ID: <8bd0f97a0707181653j3d44aab2tf8b6d24689458023@mail.gmail.com> (raw)
In-Reply-To: <200707181939.46910.rgetz@blackfin.uclinux.org>

On 7/18/07, Robin Getz <rgetz@blackfin.uclinux.org> wrote:
> On Wed 18 Jul 2007 18:16, Andrew Morton pondered:
> > I'd suggest that any interface into here should be via function calls,
> > not via direct access to printk internals: think up some nice
> > copy_me_some_of_the_log_buffer() interface.
>
> If so - I would still like to put it in:
>  - ifdef CONFIG_EARLY_PRINTK
>  - and define as __init
>
> so that people don't use it when they shouldn't (when the kernel is up an
> running).
>
> Something simple like - early_copy_log_buff(void *dest, size_t n)
>
> copies n bytes from log_buf to memory area dest. Returns number of bytes that
> could not be copied. Can find out how many bytes are in the log_buff by
> calling with zero size.
>
> This is not destructive to existing interfaces (log_start and con_start are
> not updated/used). This should ensure that if booting does work - that normal
> messages come out the standard method.
>
> Any other suggestions?

maybe something as cheesy as early_get_log_buf() ?  that way you dont
have to do any buffer management, you can just operate read-only on
the string ...
-mike

  reply	other threads:[~2007-07-18 23:53 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-18 21:56 Robin Getz
2007-07-18 22:16 ` Andrew Morton
2007-07-18 23:39   ` Robin Getz
2007-07-18 23:53     ` Mike Frysinger [this message]
2007-07-19  3:37       ` Robin Getz
2007-07-19  3:47         ` Andrew Morton
2007-07-19  0:26     ` Andrew Morton
2007-07-19  2:26       ` Stephane Couture
2007-07-19  3:58       ` Robin Getz
2007-07-22 23:50         ` Mike Frysinger
2007-07-23  0:14           ` Paul Mundt
2007-07-23 18:19           ` Robin Getz
2007-07-23 20:15             ` Andrew Morton
2007-07-23 20:54               ` Mike Frysinger
2007-07-23 21:05                 ` Andrew Morton
2007-07-23 22:10                   ` Mike Frysinger
2007-07-23 22:15               ` Robin Getz
2007-07-23 22:34                 ` Andrew Morton
2007-07-24 17:50                   ` Robin Getz
2007-07-24 18:12                     ` Andrew Morton
2007-07-24 20:12                       ` Robin Getz
2007-07-24 21:30                         ` Andrew Morton
2007-07-31  7:47                           ` Mike Frysinger
2007-07-31  7:59                             ` Bryan Wu
2007-07-31  8:11                               ` Mike Frysinger
2007-07-31 18:36                             ` Andrew Morton

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=8bd0f97a0707181653j3d44aab2tf8b6d24689458023@mail.gmail.com \
    --to=vapier.adi@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rgetz@blackfin.uclinux.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®