* [tip.git#x86/debug] Re: x86/dumpstack: Combine some printk()s
@ 2016-04-02 5:50 Sedat Dilek
2016-04-02 11:12 ` Thomas Gleixner
0 siblings, 1 reply; 3+ messages in thread
From: Sedat Dilek @ 2016-04-02 5:50 UTC (permalink / raw)
To: Rasmus Villemoes
Cc: Ingo Molnar, Linus Torvalds, Peter Zijlstra, Thomas Gleixner,
LKML, the arch/x86 maintainers
Hi,
I was looking through tip Git tree...
Why didn't you use...
+ IS_ENABLED(CONFIG_DEBUG_PAGEALLOC) ? " DEBUG_PAGEALLOC" : "",
...instead of...
+ debug_pagealloc_enabled() ? " DEBUG_PAGEALLOC" : "",
...for consistency reasons?
Regards,
- Sedat -
[1] http://git.kernel.org/cgit/linux/kernel/git/tip/tip.git/commit/?h=x86/debug&id=8fad7ec51e1b9e262e0bdd34e800ac1ea5e84dec
P.S.: From [1] "x86/dumpstack: Combine some printk()s"
--- a/arch/x86/kernel/dumpstack.c
+++ b/arch/x86/kernel/dumpstack.c
@@ -260,19 +260,12 @@ int __die(const char *str, struct pt_regs *regs, long err)
unsigned long sp;
#endif
printk(KERN_DEFAULT
- "%s: %04lx [#%d] ", str, err & 0xffff, ++die_counter);
-#ifdef CONFIG_PREEMPT
- printk("PREEMPT ");
-#endif
-#ifdef CONFIG_SMP
- printk("SMP ");
-#endif
- if (debug_pagealloc_enabled())
- printk("DEBUG_PAGEALLOC ");
-#ifdef CONFIG_KASAN
- printk("KASAN");
-#endif
- printk("\n");
+ "%s: %04lx [#%d]%s%s%s%s\n", str, err & 0xffff, ++die_counter,
+ IS_ENABLED(CONFIG_PREEMPT) ? " PREEMPT" : "",
+ IS_ENABLED(CONFIG_SMP) ? " SMP" : "",
+ debug_pagealloc_enabled() ? " DEBUG_PAGEALLOC" : "",
+ IS_ENABLED(CONFIG_KASAN) ? " KASAN" : "");
+
if (notify_die(DIE_OOPS, str, regs, err,
current->thread.trap_nr, SIGSEGV) == NOTIFY_STOP)
return 1;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [tip.git#x86/debug] Re: x86/dumpstack: Combine some printk()s
2016-04-02 5:50 [tip.git#x86/debug] Re: x86/dumpstack: Combine some printk()s Sedat Dilek
@ 2016-04-02 11:12 ` Thomas Gleixner
2016-04-04 15:34 ` Sedat Dilek
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Gleixner @ 2016-04-02 11:12 UTC (permalink / raw)
To: Sedat Dilek
Cc: Rasmus Villemoes, Ingo Molnar, Linus Torvalds, Peter Zijlstra,
LKML, the arch/x86 maintainers
On Sat, 2 Apr 2016, Sedat Dilek wrote:
> Hi,
>
> I was looking through tip Git tree...
>
> Why didn't you use...
>
> + IS_ENABLED(CONFIG_DEBUG_PAGEALLOC) ? " DEBUG_PAGEALLOC" : "",
>
> ...instead of...
>
> + debug_pagealloc_enabled() ? " DEBUG_PAGEALLOC" : "",
>
> ...for consistency reasons?
Hint: Lookup the implementation of debug_pagealloc_enabled()
Thanks,
tglx
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [tip.git#x86/debug] Re: x86/dumpstack: Combine some printk()s
2016-04-02 11:12 ` Thomas Gleixner
@ 2016-04-04 15:34 ` Sedat Dilek
0 siblings, 0 replies; 3+ messages in thread
From: Sedat Dilek @ 2016-04-04 15:34 UTC (permalink / raw)
To: Thomas Gleixner
Cc: Rasmus Villemoes, Ingo Molnar, Linus Torvalds, Peter Zijlstra,
LKML, the arch/x86 maintainers
On Sat, Apr 2, 2016 at 1:12 PM, Thomas Gleixner <tglx@linutronix.de> wrote:
> On Sat, 2 Apr 2016, Sedat Dilek wrote:
>
>> Hi,
>>
>> I was looking through tip Git tree...
>>
>> Why didn't you use...
>>
>> + IS_ENABLED(CONFIG_DEBUG_PAGEALLOC) ? " DEBUG_PAGEALLOC" : "",
>>
>> ...instead of...
>>
>> + debug_pagealloc_enabled() ? " DEBUG_PAGEALLOC" : "",
>>
>> ...for consistency reasons?
>
> Hint: Lookup the implementation of debug_pagealloc_enabled()
>
I did not look and simply trust you.
- sed@ -
> Thanks,
>
> tglx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-04-04 15:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-02 5:50 [tip.git#x86/debug] Re: x86/dumpstack: Combine some printk()s Sedat Dilek
2016-04-02 11:12 ` Thomas Gleixner
2016-04-04 15:34 ` Sedat Dilek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).