Re: early_printk accessing __log_buf

2007-07-31 Thread Andrew Morton
On Tue, 31 Jul 2007 03:47:59 -0400 "Mike Frysinger" <[EMAIL PROTECTED]> wrote: > attached > -mike > > > [linux-log_buf_read.patch application/octet-stream (2.4KB)] Please sort out the email thing if you plan on sending more kernel patches? Incremental: From: Andrew Morton <[EMAIL PROTECTED]

Re: early_printk accessing __log_buf

2007-07-31 Thread Mike Frysinger
On 7/31/07, Bryan Wu <[EMAIL PROTECTED]> wrote: > why use attachment? You can just paste your patch in the email. gmail eats inline text and my normal e-mail account is offline atm -mike - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PR

Re: early_printk accessing __log_buf

2007-07-31 Thread Bryan Wu
On Tue, 2007-07-31 at 03:47 -0400, Mike Frysinger wrote: > On 7/24/07, Andrew Morton <[EMAIL PROTECTED]> wrote: > > On Tue, 24 Jul 2007 16:12:56 -0400 Robin Getz wrote: > > > On Tue 24 Jul 2007 14:12, Andrew Morton pondered: > > > > Oh well, it sounds like we need the super-duper fast version. Kee

Re: early_printk accessing __log_buf

2007-07-31 Thread Mike Frysinger
On 7/24/07, Andrew Morton <[EMAIL PROTECTED]> wrote: > On Tue, 24 Jul 2007 16:12:56 -0400 Robin Getz wrote: > > On Tue 24 Jul 2007 14:12, Andrew Morton pondered: > > > Oh well, it sounds like we need the super-duper fast version. Keep it > > > as simple as possible, please. > > > > What about: > >

Re: early_printk accessing __log_buf

2007-07-24 Thread Andrew Morton
On Tue, 24 Jul 2007 16:12:56 -0400 Robin Getz <[EMAIL PROTECTED]> wrote: > On Tue 24 Jul 2007 14:12, Andrew Morton pondered: > > Oh well, it sounds like we need the super-duper fast version. Keep it > > as simple as possible, please. > > What about: > > int log_buf_copy(void *dest, int idx, siz

Re: early_printk accessing __log_buf

2007-07-24 Thread Robin Getz
On Tue 24 Jul 2007 14:12, Andrew Morton pondered: > Oh well, it sounds like we need the super-duper fast version. Keep it > as simple as possible, please. What about: int log_buf_copy(void *dest, int idx, size_t n); starting at index idx - copy n bytes to dest, return the number of bytes copie

Re: early_printk accessing __log_buf

2007-07-24 Thread Andrew Morton
On Tue, 24 Jul 2007 13:50:44 -0400 Robin Getz <[EMAIL PROTECTED]> wrote: > > Lots of the kernel is pretty crappy. One of our main tools for fixing > > that is to ensure that new stuff is non-crappy. > > No problem - I wasn't advocating putting something that you thought was > crappy > into you

Re: early_printk accessing __log_buf

2007-07-24 Thread Robin Getz
On Mon 23 Jul 2007 18:34, Andrew Morton pondered: > On Mon, 23 Jul 2007 18:15:37 -0400 > Robin Getz <[EMAIL PROTECTED]> wrote: > > > > A single function which does the copy as a loop (existing) is going to > > be much faster than the overhead of 1024 function calls to copy the > > last k. > > I

Re: early_printk accessing __log_buf

2007-07-23 Thread Andrew Morton
On Mon, 23 Jul 2007 18:15:37 -0400 Robin Getz <[EMAIL PROTECTED]> wrote: > On Mon 23 Jul 2007 16:15, Andrew Morton pondered: > > This code would be > > simpler if it did not attempt to read more than one char at a time. It > > will be plenty fast enough. > > When systems have NMI kick off due to

Re: early_printk accessing __log_buf

2007-07-23 Thread Robin Getz
On Mon 23 Jul 2007 16:15, Andrew Morton pondered: > This code would be > simpler if it did not attempt to read more than one char at a time. It > will be plenty fast enough. When systems have NMI kick off due to power failure, and you want to grab the log buffer to write it to flash before power

Re: early_printk accessing __log_buf

2007-07-23 Thread Mike Frysinger
On 7/23/07, Andrew Morton <[EMAIL PROTECTED]> wrote: On Mon, 23 Jul 2007 16:54:36 -0400 "Mike Frysinger" <[EMAIL PROTECTED]> wrote: > On 7/23/07, Andrew Morton <[EMAIL PROTECTED]> wrote: > > On Mon, 23 Jul 2007 14:19:12 -0400 > > Robin Getz <[EMAIL PROTECTED]> wrote: > > > > > On Sun 22 Jul 2007

Re: early_printk accessing __log_buf

2007-07-23 Thread Andrew Morton
On Mon, 23 Jul 2007 16:54:36 -0400 "Mike Frysinger" <[EMAIL PROTECTED]> wrote: > On 7/23/07, Andrew Morton <[EMAIL PROTECTED]> wrote: > > On Mon, 23 Jul 2007 14:19:12 -0400 > > Robin Getz <[EMAIL PROTECTED]> wrote: > > > > > On Sun 22 Jul 2007 19:50, Mike Frysinger pondered: > > > > > > > > i thin

Re: early_printk accessing __log_buf

2007-07-23 Thread Mike Frysinger
On 7/23/07, Andrew Morton <[EMAIL PROTECTED]> wrote: On Mon, 23 Jul 2007 14:19:12 -0400 Robin Getz <[EMAIL PROTECTED]> wrote: > On Sun 22 Jul 2007 19:50, Mike Frysinger pondered: > > > > i think the attached two functions account for what Robin and Andrew > > were thinking ... > > A note about w

Re: early_printk accessing __log_buf

2007-07-23 Thread Andrew Morton
On Mon, 23 Jul 2007 14:19:12 -0400 Robin Getz <[EMAIL PROTECTED]> wrote: > On Sun 22 Jul 2007 19:50, Mike Frysinger pondered: > > > > i think the attached two functions account for what Robin and Andrew > > were thinking ... > > A note about why/when grab_lock would be set to zero (pre-kernel ini

Re: early_printk accessing __log_buf

2007-07-23 Thread Robin Getz
On Sun 22 Jul 2007 19:50, Mike Frysinger pondered: > > i think the attached two functions account for what Robin and Andrew > were thinking ... A note about why/when grab_lock would be set to zero (pre-kernel init, or OOPs) might be nice. Or - remove it - and tell people they should be using do

Re: early_printk accessing __log_buf

2007-07-22 Thread Paul Mundt
On Sun, Jul 22, 2007 at 07:50:47PM -0400, Mike Frysinger wrote: > On 7/18/07, Robin Getz <[EMAIL PROTECTED]> wrote: > >On Wed 18 Jul 2007 20:26, Andrew Morton pondered: > >> Robin Getz wrote: > >> > [need to access _log_buf from external for early debugging code] > >> > > >> > Something simple like

Re: early_printk accessing __log_buf

2007-07-22 Thread Mike Frysinger
On 7/18/07, Robin Getz <[EMAIL PROTECTED]> wrote: On Wed 18 Jul 2007 20:26, Andrew Morton pondered: > Robin Getz wrote: > > [need to access _log_buf from external for early debugging code] > > > > Something simple like - early_copy_log_buff(void *dest, size_t n) > > > > copies n bytes from log_bu

Re: early_printk accessing __log_buf

2007-07-18 Thread Stephane Couture
Andrew Morton wrote: On Wed, 18 Jul 2007 19:39:46 -0400 Robin Getz <[EMAIL PROTECTED]> 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_t

Re: early_printk accessing __log_buf

2007-07-18 Thread Robin Getz
On Wed 18 Jul 2007 20:26, Andrew Morton pondered: > Robin Getz wrote: > > [need to access _log_buf from external for early debugging code] > > > > 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 > > byte

Re: early_printk accessing __log_buf

2007-07-18 Thread Andrew Morton
On Wed, 18 Jul 2007 23:37:34 -0400 Robin Getz <[EMAIL PROTECTED]> wrote: > On Wed 18 Jul 2007 19:53, Mike Frysinger pondered: > > On 7/18/07, Robin Getz <[EMAIL PROTECTED]> wrote: > > > On Wed 18 Jul 2007 18:16, Andrew Morton pondered: > > > > I'd suggest that any interface into here should be via

Re: early_printk accessing __log_buf

2007-07-18 Thread Robin Getz
On Wed 18 Jul 2007 19:53, Mike Frysinger pondered: > On 7/18/07, Robin Getz <[EMAIL PROTECTED]> 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 ni

Re: early_printk accessing __log_buf

2007-07-18 Thread Andrew Morton
On Wed, 18 Jul 2007 19:39:46 -0400 Robin Getz <[EMAIL PROTECTED]> 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

Re: early_printk accessing __log_buf

2007-07-18 Thread Mike Frysinger
On 7/18/07, Robin Getz <[EMAIL PROTECTED]> 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 wou

Re: early_printk accessing __log_buf

2007-07-18 Thread Robin Getz
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

Re: early_printk accessing __log_buf

2007-07-18 Thread Andrew Morton
On Wed, 18 Jul 2007 17:56:43 -0400 Robin Getz <[EMAIL PROTECTED]> wrote: > Quick question: > > I am currently setting up an early_printk for the Blackfin - & I'm populating > an early fault interrupt handler at the same time. This allows things like > catching interrupts, or faults before the ker