Re: [patch] Printk kernel version in WARN_ON

2007-11-21 Thread Pavel Machek
On Sat 2007-11-17 20:42:40, Sam Ravnborg wrote: > On Sat, Nov 17, 2007 at 11:35:01AM -0800, Arjan van de Ven wrote: > > On Sat, 17 Nov 2007 10:46:52 -0800 > > Andrew Morton <[EMAIL PROTECTED]> wrote: > > > > > > by ... not too much at least, gcc ought to be quite good at merging > > > > same-strin

Re: [patch] Printk kernel version in WARN_ON

2007-11-18 Thread Arjan van de Ven
On Sat, 17 Nov 2007 16:57:19 -0800 Andrew Morton <[EMAIL PROTECTED]> wrote: > > Should be done for all architectures, methinks. > > If so, an appropriate way to do that would be to do > s/dump_stack/arch_dump_stack/ and do a single all-arch implementation > of dump_stack(). (Where we might add

Re: [patch] Printk kernel version in WARN_ON

2007-11-17 Thread Ingo Molnar
* Andrew Morton <[EMAIL PROTECTED]> wrote: > Should be done for all architectures, methinks. > > If so, an appropriate way to do that would be to do > s/dump_stack/arch_dump_stack/ and do a single all-arch implementation > of dump_stack(). (Where we might add new goodies in the future). i ag

Re: [patch] Printk kernel version in WARN_ON

2007-11-17 Thread Andrew Morton
On Sun, 18 Nov 2007 01:42:18 +0100 Ingo Molnar <[EMAIL PROTECTED]> wrote: > > * Arjan van de Ven <[EMAIL PROTECTED]> wrote: > > > ok so how about putting the same into dump_stack() instead? (see > > below) added bonus is that it's now present for all dumps that use > > dump_stack(), not just W

Re: [patch] Printk kernel version in WARN_ON

2007-11-17 Thread Ingo Molnar
* Arjan van de Ven <[EMAIL PROTECTED]> wrote: > ok so how about putting the same into dump_stack() instead? (see > below) added bonus is that it's now present for all dumps that use > dump_stack(), not just WARN_ON() (the format I copied from the exact > line used by oopses) nice! I did thing

Re: [patch] Printk kernel version in WARN_ON

2007-11-17 Thread Denys Vlasenko
On Saturday 17 November 2007 10:15, Arjan van de Ven wrote: > Hi, > > #define WARN_ON(condition) ({ > \ > int __ret_warn_on = !!(condition); \ > if (unlikely(__ret_warn_on)) {

Re: [patch] Printk kernel version in WARN_ON

2007-11-17 Thread Sam Ravnborg
On Sat, Nov 17, 2007 at 11:35:01AM -0800, Arjan van de Ven wrote: > On Sat, 17 Nov 2007 10:46:52 -0800 > Andrew Morton <[EMAIL PROTECTED]> wrote: > > > > by ... not too much at least, gcc ought to be quite good at merging > > > same-strings into one, so it's just one extra pointer argument > > >

Re: [patch] Printk kernel version in WARN_ON

2007-11-17 Thread Arjan van de Ven
On Sat, 17 Nov 2007 10:46:52 -0800 Andrew Morton <[EMAIL PROTECTED]> wrote: > > by ... not too much at least, gcc ought to be quite good at merging > > same-strings into one, so it's just one extra pointer argument > > > > I think I knew that. At 1000 callsites. ok so how about putting the sam

Re: [patch] Printk kernel version in WARN_ON

2007-11-17 Thread Sam Ravnborg
On Sat, Nov 17, 2007 at 10:15:52AM -0800, Arjan van de Ven wrote: > Hi, > > today, all oopses contain a version number of the kernel, which is nice > because the people who actually do bother to read the oops get this > vital bit of information always without having to ask the reporter in > anothe

Re: [patch] Printk kernel version in WARN_ON

2007-11-17 Thread Andrew Morton
On Sat, 17 Nov 2007 10:39:47 -0800 Arjan van de Ven <[EMAIL PROTECTED]> wrote: > On Sat, 17 Nov 2007 10:27:20 -0800 > Andrew Morton <[EMAIL PROTECTED]> wrote: > > > On Sat, 17 Nov 2007 10:15:52 -0800 Arjan van de Ven > > <[EMAIL PROTECTED]> wrote: > > > > > @@ -35,8 +36,8 @@ struct bug_entry { >

Re: [patch] Printk kernel version in WARN_ON

2007-11-17 Thread Arjan van de Ven
On Sat, 17 Nov 2007 10:27:20 -0800 Andrew Morton <[EMAIL PROTECTED]> wrote: > On Sat, 17 Nov 2007 10:15:52 -0800 Arjan van de Ven > <[EMAIL PROTECTED]> wrote: > > > @@ -35,8 +36,8 @@ struct bug_entry { > > #define WARN_ON(condition) > > ({ \ int > > __ret

Re: [patch] Printk kernel version in WARN_ON

2007-11-17 Thread Andrew Morton
On Sat, 17 Nov 2007 10:15:52 -0800 Arjan van de Ven <[EMAIL PROTECTED]> wrote: > @@ -35,8 +36,8 @@ struct bug_entry { > #define WARN_ON(condition) ({ > \ > int __ret_warn_on = !!(condition); \ > if (unlikely(

[patch] Printk kernel version in WARN_ON

2007-11-17 Thread Arjan van de Ven
Hi, today, all oopses contain a version number of the kernel, which is nice because the people who actually do bother to read the oops get this vital bit of information always without having to ask the reporter in another round trip. However, WARN_ON() right now lacks this information; the patch