printk regression?
Subsystems (22)
[ 75.690022] <7>printing local APIC contents on CPU#0/0: [ 75.704406] ... APIC ID: 00000000 (0) [ 75.707905] ... APIC VERSION: 00060015 [ 75.722551] ... APIC TASKPRI: 00000000 (00) [ 75.725473] ... APIC PROCPRI: 00000000 [ 75.728592] ... APIC LDR: 00000001 [ 75.742137] ... APIC SPIV: 000001ff [ 75.744101] ... APIC ISR field: [ 75.746648] 0123456789abcdef0123456789abcdef [ 75.746649] <7>00000000000000000000000000000000 [ 75.774075] 00000000000000000000000000000000 [ 75.784750] 00000000000000000000000000000000 [ 75.795441] 00000000000000000000000000000000 [ 75.805870] 00000000000000000000000000000000 [ 75.817110] 00000000000000000000000000000000 [ 75.827522] 00000000000000000000000000000000 [ 75.836998] 00000000000000000000000000000000 [ 75.848060] ... APIC TMR field: [ 75.849677] 0123456789abcdef0123456789abcdef [ 75.849678] <7>00000000000000000000000000000000 [ 75.870185] 00000000000000000000000000000000 [ 75.881238] 00000000000000000000000000000000 [ 75.891653] 00000000000000000000000000000000 [ 75.902632] 00000000000000000000000000000000 [ 75.913418] 00000000000000000000000000000000 [ 75.923295] 00000000000000000000000000000000 [ 75.934364] 00000000000000000000000000000000 [ 75.945550] ... APIC IRR field: [ 75.948346] 0123456789abcdef0123456789abcdef [ 75.948347] <7>00000000000000000000000000000000 [ 75.968152] 00000000000000000000000000000000 [ 75.979004] 00000000000000000000000000000000 [ 75.990312] 00000000000000000000000000000000 [ 76.001879] 00000000000000000000000000000000 [ 76.012855] 00000000000000000000000000000000 [ 76.024529] 00000000000000000000000000000000 [ 76.034353] 00000000000000010000000000000000
got extra <7>
seems caused by:
commit 5fd29d6ccbc98884569d6f3105aeca70858b3e0f
Author: Linus Torvalds <[email protected]> Date: Tue Jun 16 10:57:02 2009 -0700
printk: clean up handling of log-levels and newlines
It used to be that we would only look at the log-level in a printk() after explicit newlines, which can cause annoying problems when the previous printk() did not end with a '\n'. In that case, the log-level marker would be just printed out in the middle of the line, and be seen as just noise rather than change the logging level.
This changes things to always look at the log-level in the first bytes of the printout. If a log level marker is found, it is always used as the log-level. Additionally, if no newline existed, one is added (unless the log-level is the explicit KERN_CONT marker, to explicitly show that it's a continuation of a previous line).
kernel/printk.c +22 -9
@@ -687,20 +687,33 @@ asmlinkage int vprintk(const char *fmt, va_list args) sizeof(printk_buf) - printed_len, fmt, args); + p = printk_buf; + +/* Do we have a loglevel in the string? */ +if (p[0 ] =='<' ) { +unsigned char c = p[1 ]; +if (c && p[2 ] =='>' ) { +switch (c) { + case '0' ... '7': /* loglevel */ + current_log_level = c -'0' ; +if (!new_text_line) { +emit_log_char ('\n' ); + new_text_line =1 ; + } +/* Fallthrough - skip the loglevel */ +case 'c' :/* KERN_CONT */ + p +=3 ; +break ; + } + } + } +/* * Copy the output into log_buf. If the caller didn't provide * appropriate log level tags, we insert them here */ -for (p = printk_buf; *p; p++) { +for ( ; *p; p++) {if (new_text_line) { -/* If a token, set current_log_level and skip over */ -if (p[0 ] =='<' && p[1 ] >='0' && p[1 ] <='7' && - p[2 ] =='>' ) { - current_log_level = p[1 ] -'0' ; - p +=3 ; - printed_len -=3 ; - } -/* Always output the token */ emit_log_char ('<' );emit_log_char (current_log_level +'0' );
Quoted 2 lines · Yinghai Lu
[ 75.690022] <7>printing local APIC contents on CPU#0/0:
Yes. This is because the io_apic code should be fixed.
It does:
printk("\n" KERN_DEBUG "printing local APIC
and that "\n" at the beginning should just be deleted. The log-level should be at the beginning of the printk, not in the middle.
Same goes for the insane binary printing crap. How about just making it sane?
Linus
Quoted 3 lines · Linus Torvalds
Same goes for the insane binary printing crap. How about just making it sane?
Untested.
Note the comment. I kept it doing the insane thing (print out bit#0 as the first bit), but do wonder if that's really what you want. Normally, you print the least-significant-bit right-most.
Linus
--- arch/x86/kernel/apic/io_apic.c | 17 ++++++++++------- 1 files changed, 10 insertions(+), 7 deletions(-)
arch/x86/kernel/apic/io_apic.c +10 -7
@@ -1724,16 +1724,19 @@ __apicdebuginit(void) print_APIC_bitfield(int base)if (apic_verbosity ==APIC_QUIET )return ; -printk (KERN_DEBUG "0123456789abcdef0123456789abcdef\n" KERN_DEBUG ); +printk (KERN_DEBUG "0123456789abcdef0123456789abcdef\n" );for (i =0 ; i <8 ; i++) { +char bin[33 ]; v =apic_read (base + i*0x10 ); + +/* Do we really want to print out LSB first? */ for (j =0 ; j <32 ; j++) { -if (v & (1 <<j)) -printk ("1" ); -else -printk ("0" ); + bin[j] ='0' + (v&1 ); + v >>=1 ; } -printk ("\n" ); + bin[32 ] =0 ; + +printk (KERN_DEBUG "%s\n" , bin); } }
@@ -1745,7 +1748,7 @@ __apicdebuginit(void) print_local_APIC(void *dummy)if (apic_verbosity ==APIC_QUIET )return ; -printk ("\n" KERN_DEBUG "printing local APIC contents on CPU#%d/%d:\n" , +printk (KERN_DEBUG "printing local APIC contents on CPU#%d/%d:\n" ,smp_processor_id (),hard_smp_processor_id ()); v =apic_read (APIC_ID );printk (KERN_INFO "... APIC ID: %08x (%01x)\n" , v,read_apic_id ());
PATCH 1/1 x86: fix printk calling in print_local_apic
From: Linus Torvalds <[email protected]>
remove the extra <7>
[ 75.690022] <7>printing local APIC contents on CPU#0/0: [ 75.704406] ... APIC ID: 00000000 (0) [ 75.707905] ... APIC VERSION: 00060015 [ 75.722551] ... APIC TASKPRI: 00000000 (00) [ 75.725473] ... APIC PROCPRI: 00000000 [ 75.728592] ... APIC LDR: 00000001 [ 75.742137] ... APIC SPIV: 000001ff [ 75.744101] ... APIC ISR field: [ 75.746648] 0123456789abcdef0123456789abcdef [ 75.746649] <7>00000000000000000000000000000000
arch/x86/kernel/apic/io_apic.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-)
arch/x86/kernel/apic/io_apic.c +11 -7
@@ -1718,16 +1718,19 @@ __apicdebuginit(void) print_APIC_bitfielunsigned int v;int i, j; -printk (KERN_DEBUG "0123456789abcdef0123456789abcdef\n" KERN_DEBUG ); +printk (KERN_DEBUG "0123456789abcdef0123456789abcdef\n" );for (i =0 ; i <8 ; i++) { +char bin[33 ]; v =apic_read (base + i*0x10 ); + +/* Do we really want to print out LSB first? */ for (j =0 ; j <32 ; j++) { -if (v & (1 <<j)) -printk ("1" ); -else -printk ("0" ); + bin[j] ='0' + (v&1 ); + v >>=1 ; } -printk ("\n" ); + bin[32 ] =0 ; + +printk (KERN_DEBUG "%s\n" , bin); } }
@@ -1736,7 +1739,8 @@ __apicdebuginit(void) print_local_APIC(vunsigned int i, v, ver, maxlvt;u64 icr; -printk ("\n" KERN_DEBUG "printing local APIC contents on CPU#%d/%d:\n" , +printk (KERN_DEBUG "\n" ); +printk (KERN_DEBUG "printing local APIC contents on CPU#%d/%d:\n" ,smp_processor_id (),hard_smp_processor_id ()); v =apic_read (APIC_ID );printk (KERN_INFO "... APIC ID: %08x (%01x)\n" , v,read_apic_id ());
Quoted 5 lines · Linus Torvalds
Quoted 2 lines · Yinghai Lu
[ 75.690022] <7>printing local APIC contents on CPU#0/0:
Quoted 8 lines
Yes. This is because the
io_apiccode should be fixed.It does:
printk("\n"
KERN_DEBUG"printing local APICand that "\n" at the beginning should just be deleted. The log-level should be at the beginning of the printk, not in the middle.
There's at least 72 of them:
$ grep -Pr --include=*.[ch] "\bprintk.*\\\n.*KERN_" *
Re: [PATCH] x86: fix printk calling in print_local_apic
In reply to Yinghai Luarch/x86/kernel/apic/io_apic.c __apicdebuginit(void) print_APIC_bitfiel · line 1726
Quoted 8 lines
arch/x86/kernel/apic/io_apic.c +4
-1-printk (KERN_DEBUG "0123456789abcdef0123456789abcdef\n" KERN_DEBUG ); +printk (KERN_DEBUG "0123456789abcdef0123456789abcdef\n" );for (i =0 ; i <8 ; i++) { +char bin[33 ]; v =apic_read (base + i*0x10 ); + +/* Do we really want to print out LSB first? */
We definitely want MSB first - i'll flip around the order.
Ingo
PATCH v2 1/1 x86: Fix printk call in print_local_apic()
Quoted 10 lines · Ingo Molnar
Review
Quoted 8 lines
(quoted diff) +4
-1- printk(KERN_DEBUG "0123456789abcdef0123456789abcdef\n" KERN_DEBUG); + printk(KERN_DEBUG "0123456789abcdef0123456789abcdef\n"); for (i = 0; i < 8; i++) { + char bin[33]; v = apic_read(base + i*0x10); + + /* Do we really want to print out LSB first? */We definitely want MSB first - i'll flip around the order.
in fact i dont remember ever having relied on the bitfield nature of that printout. Since this is uncommon debug code, printing the plain hexa value is more than enough.
In fact we can compact it down to a single line:
0123456701234567012345670123456701234567012345670123456701234567
instead of 4 lines of bitfields.
So i've done the patch below that looks quite a bit simpler. Mind testing it, does it fix all the printout artifacts you've seen?
Ingo
------------------>
Quoted 1 line
From
ef611b322dc9a917c71f28f9498dfff0d3949779Mon Sep 17 00:00:00 2001
From: Ingo Molnar <[email protected]>
Date: Thu, 2 Jul 2009 08:26:20 +0200
Subject: [PATCH] x86: Fix printk call in print_local_apic()
Instead of this:
[ 75.690022] <7>printing local APIC contents on CPU#0/0: [ 75.704406] ... APIC ID: 00000000 (0) [ 75.707905] ... APIC VERSION: 00060015 [ 75.722551] ... APIC TASKPRI: 00000000 (00) [ 75.725473] ... APIC PROCPRI: 00000000 [ 75.728592] ... APIC LDR: 00000001 [ 75.742137] ... APIC SPIV: 000001ff [ 75.744101] ... APIC ISR field: [ 75.746648] 0123456789abcdef0123456789abcdef [ 75.746649] <7>00000000000000000000000000000000
Improve the code to be saner and simpler and just print out the bitfield in a single line using hexa values - not as a (rather pointless) binary bitfield.
Partially reused Linus's initial fix for this.
LKML-Reference: <[email protected]>
--- arch/x86/kernel/apic/io_apic.c | 25 ++++++++++--------------- 1 files changed, 10 insertions(+), 15 deletions(-)
arch/x86/kernel/apic/io_apic.c +10 -15
@@ -1716,25 +1716,19 @@ __apicdebuginit(void) print_IO_APIC(void)return ; } -__apicdebuginit (void )print_APIC_bitfield (int base) +__apicdebuginit (void )print_APIC_ (int base) { -unsigned int v;int i, j; -if (apic_verbosity ==APIC_QUIET ) +if (apic_verbosity !=APIC_QUIET )return ; -printk (KERN_DEBUG "0123456789abcdef0123456789abcdef\n" KERN_DEBUG ); -for (i =0 ; i <8 ; i++) { - v =apic_read (base + i*0x10 ); -for (j =0 ; j <32 ; j++) { -if (v & (1 <<j)) -printk ("1" ); -else -printk ("0" ); - } -printk ("\n" ); - } +printk (KERN_DEBUG ); + +for (i =0 ; i <8 ; i++) +printk (KERN_CONT "%08x" , i,apic_read (base + i*0x10 )); + +printk (KERN_CONT "\n" ); }__apicdebuginit (void )print_local_APIC (void *dummy)
@@ -1745,7 +1739,8 @@ __apicdebuginit(void) print_local_APIC(void *dummy)if (apic_verbosity ==APIC_QUIET )return ; -printk ("\n" KERN_DEBUG "printing local APIC contents on CPU#%d/%d:\n" , +printk (KERN_DEBUG "\n" ); +printk (KERN_DEBUG "printing local APIC contents on CPU#%d/%d:\n" ,smp_processor_id (),hard_smp_processor_id ()); v =apic_read (APIC_ID );printk (KERN_INFO "... APIC ID: %08x (%01x)\n" , v,read_apic_id ());
Re: [PATCH, v2] x86: Fix printk call in print_local_apic()
Quoted 66 lines · Ingo Molnar
Quoted 8 lines · Ingo Molnar
Review
Quoted 7 lines
(quoted diff) +4
-1- printk(KERN_DEBUG "0123456789abcdef0123456789abcdef\n" KERN_DEBUG); + printk(KERN_DEBUG "0123456789abcdef0123456789abcdef\n"); for (i = 0; i < 8; i++) { + char bin[33]; v = apic_read(base + i*0x10); + + /* Do we really want to print out LSB first? */We definitely want MSB first - i'll flip around the order.
in fact i dont remember ever having relied on the bitfield nature of that printout. Since this is uncommon debug code, printing the plain hexa value is more than enough.
In fact we can compact it down to a single line:
0123456701234567012345670123456701234567012345670123456701234567
instead of 4 lines of bitfields.
So i've done the patch below that looks quite a bit simpler. Mind testing it, does it fix all the printout artifacts you've seen?
Ingo
------------------>
Quoted 1 line
From
ef611b322dc9a917c71f28f9498dfff0d3949779Mon Sep 17 00:00:00 2001From: Ingo Molnar <[email protected]>
Date: Thu, 2 Jul 2009 08:26:20 +0200
Subject: [PATCH] x86: Fix printk call inprint_local_apic()Instead of this:
[ 75.690022] <7>printing local APIC contents on CPU#0/0: [ 75.704406] ... APIC ID: 00000000 (0) [ 75.707905] ... APIC VERSION: 00060015 [ 75.722551] ... APIC TASKPRI: 00000000 (00) [ 75.725473] ... APIC PROCPRI: 00000000 [ 75.728592] ... APIC LDR: 00000001 [ 75.742137] ... APIC SPIV: 000001ff [ 75.744101] ... APIC ISR field: [ 75.746648] 0123456789abcdef0123456789abcdef [ 75.746649] <7>00000000000000000000000000000000Improve the code to be saner and simpler and just print out the bitfield in a single line using hexa values - not as a (rather pointless) binary bitfield.
Partially reused Linus's initial fix for this.
Reported-and-Tested-by Yinghai Lu <[email protected]>Signed-off-by Yinghai Lu <[email protected]>Cc Linus Torvalds <[email protected]>Cc Andrew Morton <[email protected]>LKML-Reference: <[email protected]>
Signed-off-by Ingo Molnar <[email protected]>--- arch/x86/kernel/apic/io_apic.c | 25 ++++++++++--------------- 1 files changed, 10 insertions(+), 15 deletions(-)arch/x86/kernel/apic/io_apic.c +0
-0
arch/x86/kernel/apic/io_apic.c __apicdebuginit(void) print_IO_APIC(void) · line 1719
Quoted 5 lines
arch/x86/kernel/apic/io_apic.c +1
-1@@ -1716,25 +1716,19 @@ __apicdebuginit(void) print_IO_APIC(void)return ; } -__apicdebuginit (void )print_APIC_bitfield (int base) +__apicdebuginit (void )print_APIC_ (int base)
?
arch/x86/kernel/apic/io_apic.c __apicdebuginit(void) print_IO_APIC(void) · line 1723
Quoted 6 lines
arch/x86/kernel/apic/io_apic.c +1
-2{ -unsigned int v;int i, j; -if (apic_verbosity ==APIC_QUIET ) +if (apic_verbosity !=APIC_QUIET )
is this one reversed?
Quoted 32 lines
arch/x86/kernel/apic/io_apic.c +8
-12return ; -printk (KERN_DEBUG "0123456789abcdef0123456789abcdef\n" KERN_DEBUG ); -for (i =0 ; i <8 ; i++) { - v =apic_read (base + i*0x10 ); -for (j =0 ; j <32 ; j++) { -if (v & (1 <<j)) -printk ("1" ); -else -printk ("0" ); - } -printk ("\n" ); - } +printk (KERN_DEBUG ); + +for (i =0 ; i <8 ; i++) +printk (KERN_CONT "%08x" , i,apic_read (base + i*0x10 )); + +printk (KERN_CONT "\n" ); }__apicdebuginit (void )print_local_APIC (void *dummy)@@ -1745,7 +1739,8 @@ __apicdebuginit(void) print_local_APIC(void *dummy)if (apic_verbosity ==APIC_QUIET )return ; -printk ("\n" KERN_DEBUG "printing local APIC contents on CPU#%d/%d:\n" , +printk (KERN_DEBUG "\n" ); +printk (KERN_DEBUG "printing local APIC contents on CPU#%d/%d:\n" ,smp_processor_id (),hard_smp_processor_id ()); v =apic_read (APIC_ID );printk (KERN_INFO "... APIC ID: %08x (%01x)\n" , v,read_apic_id ());
Re: [PATCH, v2] x86: Fix printk call in print_local_apic()
In reply to Ingo Molnararch/x86/kernel/apic/io_apic.c __apicdebuginit(void) print_IO_APIC(void) · line 1729
Quoted 1 line · On Thu, 2 Jul 2009 08:28:47 +0200 Ingo Molnar <[email protected]> wrote:
arch/x86/kernel/apic/io_apic.c +1
-0+printk (KERN_CONT "%08x" , i,apic_read (base + i*0x10 ));
oop - compile it first ;)
There was some talk about teaching the lib/hexdump.c code to be able to take a caller-provided give-me-another-byte function pointer. This is the first potential user of such a thing which I recall seeing, so it's probably good that we didn't do it ;)
PATCH v3 1/1 x86: Fix printk call in print_local_apic()
In reply to Yinghai LuQuoted 4 lines · Yinghai Lu
Review
Quoted 2 lines
(quoted diff) +1
-1-__apicdebuginit(void) print_APIC_bitfield(int base) +__apicdebuginit(void) print_APIC_(int base)?
Uhm, i should stop mixing Quilt with Git :-/ Tested v3 patch below.
Ingo
---------------->
Quoted 1 line
From
113179d18752f4a674dc71c59b426a64fa106f63Mon Sep 17 00:00:00 2001
From: Ingo Molnar <[email protected]>
Date: Thu, 2 Jul 2009 08:49:14 +0200
Subject: [PATCH] x86: fix printk call in print_local_apic()
Instead of this:
[ 75.690022] <7>printing local APIC contents on CPU#0/0: [ 75.704406] ... APIC ID: 00000000 (0) [ 75.707905] ... APIC VERSION: 00060015 [ 75.722551] ... APIC TASKPRI: 00000000 (00) [ 75.725473] ... APIC PROCPRI: 00000000 [ 75.728592] ... APIC LDR: 00000001 [ 75.742137] ... APIC SPIV: 000001ff [ 75.744101] ... APIC ISR field: [ 75.746648] 0123456789abcdef0123456789abcdef [ 75.746649] <7>00000000000000000000000000000000
Improve the code to be saner and simpler and just print out the bitfield in a single line using hexa values - not as a (rather pointless) binary bitfield.
Partially reused Linus's initial fix for this.
LKML-Reference: <[email protected]>
--- arch/x86/kernel/apic/io_apic.c | 31 +++++++++++++------------------ 1 files changed, 13 insertions(+), 18 deletions(-)
arch/x86/kernel/apic/io_apic.c +13 -18
@@ -1716,25 +1716,19 @@ __apicdebuginit(void) print_IO_APIC(void)return ; } -__apicdebuginit (void )print_APIC_bitfield (int base) +__apicdebuginit (void )print_APIC_field (int base) { -unsigned int v; -int i, j; +int i;if (apic_verbosity ==APIC_QUIET )return ; -printk (KERN_DEBUG "0123456789abcdef0123456789abcdef\n" KERN_DEBUG ); -for (i =0 ; i <8 ; i++) { - v =apic_read (base + i*0x10 ); -for (j =0 ; j <32 ; j++) { -if (v & (1 <<j)) -printk ("1" ); -else -printk ("0" ); - } -printk ("\n" ); - } +printk (KERN_DEBUG ); + +for (i =0 ; i <8 ; i++) +printk (KERN_CONT "%08x" , i,apic_read (base + i*0x10 )); + +printk (KERN_CONT "\n" ); }__apicdebuginit (void )print_local_APIC (void *dummy)
@@ -1745,7 +1739,8 @@ __apicdebuginit(void) print_local_APIC(void *dummy)if (apic_verbosity ==APIC_QUIET )return ; -printk ("\n" KERN_DEBUG "printing local APIC contents on CPU#%d/%d:\n" , +printk (KERN_DEBUG "\n" ); +printk (KERN_DEBUG "printing local APIC contents on CPU#%d/%d:\n" ,smp_processor_id (),hard_smp_processor_id ()); v =apic_read (APIC_ID );printk (KERN_INFO "... APIC ID: %08x (%01x)\n" , v,read_apic_id ());
@@ -1786,11 +1781,11 @@ __apicdebuginit(void) print_local_APIC(void *dummy)printk (KERN_DEBUG "... APIC SPIV: %08x\n" , v);printk (KERN_DEBUG "... APIC ISR field:\n" ); -print_APIC_bitfield (APIC_ISR ); +print_APIC_field (APIC_ISR );printk (KERN_DEBUG "... APIC TMR field:\n" ); -print_APIC_bitfield (APIC_TMR ); +print_APIC_field (APIC_TMR );printk (KERN_DEBUG "... APIC IRR field:\n" ); -print_APIC_bitfield (APIC_IRR ); +print_APIC_field (APIC_IRR );if (APIC_INTEGRATED (ver)) {/* !82489DX */ if (maxlvt >3 )/* Due to the Pentium erratum 3AP. */
PATCH v4 1/1 x86: Fix printk call in print_local_apic()
In reply to Andrew MortonQuoted 5 lines · Andrew Morton
Review
Quoted 1 line · On Thu, 2 Jul 2009 08:28:47 +0200 Ingo Molnar <[email protected]> wrote:
(quoted diff) +1
-0+ printk(KERN_CONT "%08x", i, apic_read(base + i*0x10));oop - compile it first ;)
oops - v4 below ...
Quoted 4 lines
There was some talk about teaching the
lib/hexdump.ccode to be able to take a caller-provided give-me-another-byte function pointer. This is the first potential user of such a thing which I recall seeing, so it's probably good that we didn't do it ;)
This at most has 'give me another 4 bytes' - plus there's some indexing weirdness as well. (the bitfield is holey in the MSR range)
Dunno. Once the facility is available this code can be updated to use it, although it's certainly obvious enough in its current form already.
Ingo
------------------->
Quoted 1 line
From
251e1e44b97852aa5e53e71c4b47e55b2dfd054eMon Sep 17 00:00:00 2001
From: Ingo Molnar <[email protected]>
Date: Thu, 2 Jul 2009 08:54:01 +0200
Subject: [PATCH] x86: Fix printk call in print_local_apic()
Instead of this:
[ 75.690022] <7>printing local APIC contents on CPU#0/0: [ 75.704406] ... APIC ID: 00000000 (0) [ 75.707905] ... APIC VERSION: 00060015 [ 75.722551] ... APIC TASKPRI: 00000000 (00) [ 75.725473] ... APIC PROCPRI: 00000000 [ 75.728592] ... APIC LDR: 00000001 [ 75.742137] ... APIC SPIV: 000001ff [ 75.744101] ... APIC ISR field: [ 75.746648] 0123456789abcdef0123456789abcdef [ 75.746649] <7>00000000000000000000000000000000
Improve the code to be saner and simpler and just print out the bitfield in a single line using hexa values - not as a (rather pointless) binary bitfield.
Partially reused Linus's initial fix for this.
LKML-Reference: <[email protected]>
--- arch/x86/kernel/apic/io_apic.c | 31 +++++++++++++------------------ 1 files changed, 13 insertions(+), 18 deletions(-)
arch/x86/kernel/apic/io_apic.c +13 -18
@@ -1716,25 +1716,19 @@ __apicdebuginit(void) print_IO_APIC(void)return ; } -__apicdebuginit (void )print_APIC_bitfield (int base) +__apicdebuginit (void )print_APIC_field (int base) { -unsigned int v; -int i, j; +int i;if (apic_verbosity ==APIC_QUIET )return ; -printk (KERN_DEBUG "0123456789abcdef0123456789abcdef\n" KERN_DEBUG ); -for (i =0 ; i <8 ; i++) { - v =apic_read (base + i*0x10 ); -for (j =0 ; j <32 ; j++) { -if (v & (1 <<j)) -printk ("1" ); -else -printk ("0" ); - } -printk ("\n" ); - } +printk (KERN_DEBUG ); + +for (i =0 ; i <8 ; i++) +printk (KERN_CONT "%08x" ,apic_read (base + i*0x10 )); + +printk (KERN_CONT "\n" ); }__apicdebuginit (void )print_local_APIC (void *dummy)
@@ -1745,7 +1739,8 @@ __apicdebuginit(void) print_local_APIC(void *dummy)if (apic_verbosity ==APIC_QUIET )return ; -printk ("\n" KERN_DEBUG "printing local APIC contents on CPU#%d/%d:\n" , +printk (KERN_DEBUG "\n" ); +printk (KERN_DEBUG "printing local APIC contents on CPU#%d/%d:\n" ,smp_processor_id (),hard_smp_processor_id ()); v =apic_read (APIC_ID );printk (KERN_INFO "... APIC ID: %08x (%01x)\n" , v,read_apic_id ());
@@ -1786,11 +1781,11 @@ __apicdebuginit(void) print_local_APIC(void *dummy)printk (KERN_DEBUG "... APIC SPIV: %08x\n" , v);printk (KERN_DEBUG "... APIC ISR field:\n" ); -print_APIC_bitfield (APIC_ISR ); +print_APIC_field (APIC_ISR );printk (KERN_DEBUG "... APIC TMR field:\n" ); -print_APIC_bitfield (APIC_TMR ); +print_APIC_field (APIC_TMR );printk (KERN_DEBUG "... APIC IRR field:\n" ); -print_APIC_bitfield (APIC_IRR ); +print_APIC_field (APIC_IRR );if (APIC_INTEGRATED (ver)) {/* !82489DX */ if (maxlvt >3 )/* Due to the Pentium erratum 3AP. */
[tip:x86/urgent] x86: Fix printk call in print_local_apic()
In reply to Yinghai LuCommit-ID: 251e1e44b97852aa5e53e71c4b47e55b2dfd054e Gitweb: http://git.kernel.org/tip/251e1e44b97852aa5e53e71c4b47e55b2dfd054e Author: Ingo Molnar <[email protected]> AuthorDate: Thu, 2 Jul 2009 08:54:01 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Thu, 2 Jul 2009 08:54:08 +0200
x86: Fix printk call in print_local_apic()
Instead of this:
[ 75.690022] <7>printing local APIC contents on CPU#0/0: [ 75.704406] ... APIC ID: 00000000 (0) [ 75.707905] ... APIC VERSION: 00060015 [ 75.722551] ... APIC TASKPRI: 00000000 (00) [ 75.725473] ... APIC PROCPRI: 00000000 [ 75.728592] ... APIC LDR: 00000001 [ 75.742137] ... APIC SPIV: 000001ff [ 75.744101] ... APIC ISR field: [ 75.746648] 0123456789abcdef0123456789abcdef [ 75.746649] <7>00000000000000000000000000000000
Improve the code to be saner and simpler and just print out the bitfield in a single line using hexa values - not as a (rather pointless) binary bitfield.
Partially reused Linus's initial fix for this.
LKML-Reference: <[email protected]>
--- arch/x86/kernel/apic/io_apic.c | 31 +++++++++++++------------------ 1 files changed, 13 insertions(+), 18 deletions(-)
arch/x86/kernel/apic/io_apic.c +13 -18
@@ -1716,25 +1716,19 @@ __apicdebuginit(void) print_IO_APIC(void)return ; } -__apicdebuginit (void )print_APIC_bitfield (int base) +__apicdebuginit (void )print_APIC_field (int base) { -unsigned int v; -int i, j; +int i;if (apic_verbosity ==APIC_QUIET )return ; -printk (KERN_DEBUG "0123456789abcdef0123456789abcdef\n" KERN_DEBUG ); -for (i =0 ; i <8 ; i++) { - v =apic_read (base + i*0x10 ); -for (j =0 ; j <32 ; j++) { -if (v & (1 <<j)) -printk ("1" ); -else -printk ("0" ); - } -printk ("\n" ); - } +printk (KERN_DEBUG ); + +for (i =0 ; i <8 ; i++) +printk (KERN_CONT "%08x" ,apic_read (base + i*0x10 )); + +printk (KERN_CONT "\n" ); }__apicdebuginit (void )print_local_APIC (void *dummy)
@@ -1745,7 +1739,8 @@ __apicdebuginit(void) print_local_APIC(void *dummy)if (apic_verbosity ==APIC_QUIET )return ; -printk ("\n" KERN_DEBUG "printing local APIC contents on CPU#%d/%d:\n" , +printk (KERN_DEBUG "\n" ); +printk (KERN_DEBUG "printing local APIC contents on CPU#%d/%d:\n" ,smp_processor_id (),hard_smp_processor_id ()); v =apic_read (APIC_ID );printk (KERN_INFO "... APIC ID: %08x (%01x)\n" , v,read_apic_id ());
@@ -1786,11 +1781,11 @@ __apicdebuginit(void) print_local_APIC(void *dummy)printk (KERN_DEBUG "... APIC SPIV: %08x\n" , v);printk (KERN_DEBUG "... APIC ISR field:\n" ); -print_APIC_bitfield (APIC_ISR ); +print_APIC_field (APIC_ISR );printk (KERN_DEBUG "... APIC TMR field:\n" ); -print_APIC_bitfield (APIC_TMR ); +print_APIC_field (APIC_TMR );printk (KERN_DEBUG "... APIC IRR field:\n" ); -print_APIC_bitfield (APIC_IRR ); +print_APIC_field (APIC_IRR );if (APIC_INTEGRATED (ver)) {/* !82489DX */ if (maxlvt >3 )/* Due to the Pentium erratum 3AP. */
Re: [PATCH, v4] x86: Fix printk call in print_local_apic()
In reply to Ingo Molnarthis is how it gets printed here with apic-debug enabled:
[ 6.519850] ... APIC ISR field: [ 6.523249] 0000000000000000000000000000000000000000000000000000000000000000 [ 6.531085] ... APIC TMR field: [ 6.534484] 0000000000000000000000000000000000000000000000000000000000000000 [ 6.542322] ... APIC IRR field: [ 6.545721] 0000000000000000000000000000000000000000000000000000000000008000
That's plenty enough.
Ingo
Quoted 10 lines · Joe Perches
Quoted 9 lines · Linus Torvalds
Quoted 2 lines · Yinghai Lu
[ 75.690022] <7>printing local APIC contents on CPU#0/0:Yes. This is because the
io_apiccode should be fixed.It does:
Quoted 9 lines
Quoted 4 lines
printk("\n"
KERN_DEBUG"printing local APICand that "\n" at the beginning should just be deleted. The log-level should be at the beginning of the printk, not in the middle.
There's at least 72 of them:
$ grep -Pr --include=*.[ch] "\bprintk.*\\\n.*KERN_" *
That should qualify it as a documented feature. ;) "To convert the log level marker into visible garbage, do..."
Mike
Quoted 8 lines
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Quoted 9 lines · Michael S. Zick
Quoted 8 lines · Joe Perches
Quoted 7 lines · Linus Torvalds
Quoted 1 line · Yinghai Lu
[ 75.690022] <7>printing local APIC contents on CPU#0/0:Yes. This is because the
io_apiccode should be fixed.
It does:
printk("\n"KERN_DEBUG"printing local APIC
and that "\n" at the beginning should just be deleted. The log-level should be at the beginning of the printk, not in the middle.
Quoted 4 lines
Quoted 2 lines
There's at least 72 of them:
$ grep -Pr --include=*.[ch] "\bprintk.*\\\n.*KERN_" *That should qualify it as a documented feature. ;) "To convert the log level marker into visible garbage, do..."
Before some changes to the printk code, that used to be the only way to get a single printk call with multiple line output to have a KERN_<level> on all output lines.
ie: printk(KERN_INFO "Line 1\n" KERN_INFO "Line 2\n");
That style doesn't show up in the grep I posted because most of them look like:
printk(KERN_INFO "Line 1\n" KERN_INFO "Line 2\n");
An example: here's a bit of kernel/module.c:
printk(KERN_WARNING "%s: '%s'->init suspiciously returned %d, "
"it should follow 0/-E convention\n"
KERN_WARNING "%s: loading module anyway...\n",
Quoted 4 lines · Joe Perches
There's at least 72 of them:
$ grep -Pr --include=*.[ch] "\bprintk.*\\\n.*KERN_" *
Yes. Most of these seem to be of the type that have just "\n" in front - probably exactly because the old code wasn't smart enough to notice the log-level unless it started a line.
For those cases, the trivial fix is to just remove the "\n". The new world order for printk is very much a simplification: the log-level is _always_ at the front of the printk, and printk will add the newline automatically if a log-level exists (unless it's KERN_CONT, of course).
So a simple
sed 's/printk("\n"[ ]*KERN_/printk(KERN_/'should basically take care of it.
Of course, some cases are just crazy. Here's one:
arch/m68knommu/kernel/traps.c: printk(KERN_CONT "\n" KERN_EMERG " [%08lx] ", addr);
and I have no clue about why it would have KERN_CONT there. That makes little sense. Again, with the new printk logic, it really should be just
printk(KERN_EMERG " [%08lx] ", addr);
and nothing odd.
Linus
Quoted 5 lines · Linus Torvalds
Of course, some cases are just crazy. Here's one:
arch/m68knommu/kernel/traps.c: printk(KERN_CONT "\n" KERN_EMERG " [%08lx] ", addr);and I have no clue about why it would have
KERN_CONTthere.
Generally, it's because hardware is being scanned in little bits and pieces with partial line printk's being used to document things "as it happens".
If something odd happens, the "in-progress" printk's are terminated and another "whoa nellie" printk is done.
There's a bunch of that in drivers/net.
Quoted 6 lines
That makes
little sense. Again, with the new printk logic, it really should be justprintk(KERN_EMERG " [%08lx] ", addr);and nothing odd.
Maybe, but your printk change does require that all of the kernel sources be updated as necessary.
Quoted 10 lines · Joe Perches
Before some changes to the printk code, that used to be the only way to get a single printk call with multiple line output to have a KERN_<level> on all output lines.
ie:
printk(KERN_INFO "Line 1\n" KERN_INFO "Line 2\n");That style doesn't show up in the grep I posted because most of them look like:
Quoted 8 lines
printk(KERN_INFO "Line 1\n" KERN_INFO "Line 2\n");An example: here's a bit of
kernel/module.c:printk(KERN_WARNING "%s: '%s'->init suspiciously returned %d, "
"it should follow 0/-E convention\n"
KERN_WARNING"%s: loading module anyway...\n",
Yeah. Today, the way you're supposed to do that is simply
printk(KERN_WARNING "%s: '%s'->init suspiciously returned %d, it should follow 0/-E convention\n" "%s: loading module anyway...\n", ...
because the KERN_WARNING will cover the whole multi-line printk.
And if you want multiple _different_ loglevels (which is crazy - if you really want this, then you should look at your walls and double-check that they are nice and softly padded), you need to split it up into multiple printk's.
Linus
Quoted 3 lines · Joe Perches
Maybe, but your printk change does require that all of the kernel sources be updated as necessary.
Sure. And if they aren't, nobody really cares.
Linus
PATCH 1/1 Remove multiple KERN_ prefixes from printk formats
Hi Linus, let me know if you want this submitted as a patchset to each maintainer or if you simply want this rolled-up patch.
Compiled x86 defconfig, but not for each arch.
------------------------
commit 5fd29d6ccbc98884569d6f3105aeca70858b3e0f changed printk semantics. printk lines with multiple KERN_<level> prefixes are no longer emitted as before the patch.
<level> is now included in the output on each additional use.
Remove all uses of multiple KERN_<level>s in formats.
arch/avr32/kernel/traps.c | 13 +++++--- arch/blackfin/kernel/setup.c | 41 ++++++++++++----------- arch/blackfin/kernel/traps.c | 34 ++++++++++---------- arch/m68knommu/kernel/process.c | 21 ++++++------ arch/m68knommu/kernel/traps.c | 6 ++-- arch/mn10300/kernel/traps.c | 21 +++++------- arch/parisc/kernel/process.c | 2 +- arch/parisc/kernel/traps.c | 20 ++++++------ arch/um/kernel/sysrq.c | 4 +- arch/x86/kernel/apic/io_apic.c | 2 +- arch/x86/kernel/cpu/cpufreq/powernow-k8.c | 2 +- arch/x86/kernel/cpu/mcheck/mce.c | 12 +++--- arch/x86/kernel/e820.c | 7 ++-- arch/x86/kernel/pci-gart_64.c | 2 +- arch/x86/mm/fault.c | 9 +++-- arch/xtensa/kernel/traps.c | 6 ++-- drivers/block/amiflop.c | 2 +- drivers/block/xsysace.c | 7 ++-- drivers/char/hw_random/intel-rng.c | 9 +++-- drivers/char/isicom.c | 16 +++++----- drivers/i2c/busses/i2c-ibm_iic.c | 9 +++-- drivers/md/md.c | 18 ++++++----- drivers/misc/sgi-xp/xpnet.c | 4 +- drivers/net/a2065.c | 12 +------ drivers/net/arcnet/arcnet.c | 26 ++++++--------- drivers/net/bmac.c | 7 ++-- drivers/net/bnx2x_main.c | 7 ++-- drivers/net/dl2k.c | 17 +++++----- drivers/net/epic100.c | 5 +-- drivers/net/fealnx.c | 15 +++++--- drivers/net/hamachi.c | 23 +++++++------ drivers/net/hamradio/baycom_epp.c | 2 +- drivers/net/hamradio/baycom_par.c | 2 +- drivers/net/hamradio/baycom_ser_fdx.c | 2 +- drivers/net/hamradio/baycom_ser_hdx.c | 2 +- drivers/net/natsemi.c | 4 +- drivers/net/ne.c | 2 +- drivers/net/pci-skeleton.c | 2 +- drivers/net/pcmcia/ibmtr_cs.c | 13 +++----- drivers/net/pcmcia/nmclan_cs.c | 15 +++----- drivers/net/pcnet32.c | 50 ++++++++++++++-------------- drivers/net/starfire.c | 2 +- drivers/net/sundance.c | 6 ++-- drivers/net/tsi108_eth.c | 8 +++-- drivers/net/tulip/de2104x.c | 7 ++-- drivers/net/tulip/tulip_core.c | 14 +++++--- drivers/net/tulip/winbond-840.c | 6 ++-- drivers/net/wan/hd64570.c | 3 +- drivers/net/wan/hd64572.c | 3 +- drivers/net/wan/sbni.c | 8 ++--- drivers/net/wireless/ray_cs.c | 9 ++--- drivers/net/wireless/wavelan_cs.c | 13 +------ drivers/net/yellowfin.c | 23 +++++++------ drivers/parisc/eisa_enumerator.c | 14 ++++---- drivers/pcmcia/tcic.c | 3 +- drivers/scsi/atari_NCR5380.c | 3 +- drivers/scsi/mac53c94.c | 5 ++- drivers/scsi/sg.c | 2 +- drivers/scsi/sun3_NCR5380.c | 3 +- drivers/serial/8250_pci.c | 11 +++--- drivers/ssb/pcmcia.c | 4 +- drivers/usb/core/hcd.c | 2 +- drivers/video/amba-clcd.c | 7 ++-- drivers/video/matrox/matroxfb_DAC1064.c | 4 +- drivers/video/matrox/matroxfb_Ti3026.c | 4 +- drivers/video/stifb.c | 7 ++-- fs/jffs2/erase.c | 10 +++-- kernel/module.c | 6 ++-- sound/pci/emu10k1/p16v.c | 2 +- sound/usb/usx2y/usbusx2yaudio.c | 7 ++-- 70 files changed, 331 insertions(+), 338 deletions(-)
arch/avr32/kernel/traps.c +8 -5
@@ -32,22 +32,25 @@ void NORET_TYPE die(const char *str, struct pt_regs *regs, long err)spin_lock_irq (&die_lock);bust_spinlocks (1 ); -printk (KERN_ALERT "Oops: %s, sig: %ld [#%d]\n" KERN_EMERG , +printk (KERN_ALERT "Oops: %s, sig: %ld [#%d]\n" , str, err, ++die_counter); + +printk (KERN_EMERG ); +#ifdef CONFIG_PREEMPT -printk ("PREEMPT " ); +printk (KERN_CONT "PREEMPT " );#endif #ifdef CONFIG_FRAME_POINTER -printk ("FRAME_POINTER " ); +printk (KERN_CONT "FRAME_POINTER " );#endif if (current_cpu_data.features &AVR32_FEATURE_OCD ) {unsigned long did =ocd_read (DID ); -printk ("chip: 0x%03lx:0x%04lx rev %lu\n" , +printk (KERN_CONT "chip: 0x%03lx:0x%04lx rev %lu\n" , (did >>1 ) &0x7ff , (did >>12 ) &0x7fff , (did >>28 ) &0xf ); }else { - printk("cpu: arch %u r%u / core %u r%u\n", + printk(KERN_CONT "cpu: arch %u r%u / core %u r%u\n", current_cpu_data.arch_type, current_cpu_data.arch_revision, current_cpu_data.cpu_type,
arch/blackfin/kernel/setup.c +21 -20
66 lines not on this page · raw message
arch/blackfin/kernel/traps.c +17 -17
@@ -212,7 +212,7 @@ asmlinkage void double_fault_c(struct pt_regs *fp)console_verbose (); oops_in_progress =1 ; #ifdef CONFIG_DEBUG_VERBOSE - printk(KERN_EMERG "\n" KERN_EMERG "Double Fault\n"); + printk(KERN_EMERG "Double Fault\n"); #ifdef CONFIG_DEBUG_DOUBLEFAULT_PRINT if (((long)fp->seqstat & SEQSTAT_EXCAUSE) == VEC_UNCOV) { unsigned int cpu = smp_processor_id();
@@ -583,15 +583,14 @@ asmlinkage void trap_c(struct pt_regs *fp)#ifndef CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE if (trapnr ==VEC_CPLB_I_M || trapnr ==VEC_CPLB_M )verbose_printk (KERN_NOTICE "No trace since you do not have " -"CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE enabled\n" -KERN_NOTICE "\n" ); +"CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE enabled\n\n" ); else#endif dump_bfin_trace_buffer ();if (oops_in_progress) {/* Dump the current kernel stack */ -verbose_printk (KERN_NOTICE "\n" KERN_NOTICE "Kernel Stack\n" ); +verbose_printk (KERN_NOTICE "Kernel Stack\n" );show_stack (current,NULL );print_modules ();#ifndef CONFIG_ACCESS_CHECK
@@ -906,7 +905,7 @@ void show_stack(struct task_struct *task, unsigned long *stack) ret_addr =0 ;if (!j && i %8 ==0 ) -printk ("\n" KERN_NOTICE "%p:" ,addr); +printk (KERN_NOTICE "%p:" ,addr);/* if it is an odd address, or zero, just skip it */ if (*addr &0x1 || !*addr)
@@ -996,9 +995,9 @@ void dump_bfin_process(struct pt_regs *fp)printk (KERN_NOTICE "CPU = %d\n" ,current_thread_info ()->cpu);if (!((unsigned long )current->mm &0x3 ) && (unsigned long )current->mm >=FIXED_CODE_START ) - verbose_printk(KERN_NOTICE "TEXT = 0x%p-0x%p DATA = 0x%p-0x%p\n" - KERN_NOTICE " BSS = 0x%p-0x%p USER-STACK = 0x%p\n" - KERN_NOTICE "\n", + verbose_printk(KERN_NOTICE + "TEXT = 0x%p-0x%p DATA = 0x%p-0x%p\n" + " BSS = 0x%p-0x%p USER-STACK = 0x%p\n\n", (void *)current->mm->start_code, (void *)current->mm->end_code, (void *)current->mm->start_data,
@@ -1009,8 +1008,8 @@ void dump_bfin_process(struct pt_regs *fp) else verbose_printk(KERN_NOTICE "invalid mm\n"); }else -verbose_printk (KERN_NOTICE "\n" KERN_NOTICE -"No Valid process in current context\n" ); +verbose_printk (KERN_NOTICE +"No Valid process in current context\n" );#endif }
@@ -1028,7 +1027,7 @@ void dump_bfin_mem(struct pt_regs *fp) addr < (unsigned short *)((unsigned long )erraddr & ~0xF ) +0x10 ; addr++) {if (!((unsigned long )addr &0xF )) -verbose_printk ("\n" KERN_NOTICE "0x%p: " , addr); +verbose_printk (KERN_NOTICE "0x%p: " , addr);if (!get_instruction (&val, addr)) { val =0 ;
@@ -1056,9 +1055,9 @@ void dump_bfin_mem(struct pt_regs *fp) oops_in_progress)){verbose_printk (KERN_NOTICE "Looks like this was a deferred error - sorry\n" );#ifndef CONFIG_DEBUG_HWERR -verbose_printk (KERN_NOTICE "The remaining message may be meaningless\n" -KERN_NOTICE "You should enable CONFIG_DEBUG_HWERR to get a" -" better idea where it came from\n" ); +verbose_printk (KERN_NOTICE +"The remaining message may be meaningless\n" +"You should enable CONFIG_DEBUG_HWERR to get a better idea where it came from\n" );#else /* If we are handling only one peripheral interrupt * and current mm and pid are valid, and the last error
@@ -1114,9 +1113,10 @@ void show_regs(struct pt_regs *fp)verbose_printk (KERN_NOTICE "%s" , linux_banner); -verbose_printk (KERN_NOTICE "\n" KERN_NOTICE "SEQUENCER STATUS:\t\t%s\n" ,print_tainted ()); +verbose_printk (KERN_NOTICE "\nSEQUENCER STATUS:\t\t%s\n" , +print_tainted ());verbose_printk (KERN_NOTICE " SEQSTAT: %08lx IPEND: %04lx SYSCFG: %04lx\n" , - (long )fp->seqstat, fp->ipend, fp->syscfg); + (long )fp->seqstat, fp->ipend, fp->syscfg);if ((fp->seqstat &SEQSTAT_EXCAUSE ) ==VEC_HWERR ) {verbose_printk (KERN_NOTICE " HWERRCAUSE: 0x%lx\n" , (fp->seqstat &SEQSTAT_HWERRCAUSE ) >>14 );
@@ -1184,7 +1184,7 @@ unlock:verbose_printk (KERN_NOTICE "ICPLB_FAULT_ADDR: %s\n" , buf); } -verbose_printk (KERN_NOTICE "\n" KERN_NOTICE "PROCESSOR STATE:\n" ); +verbose_printk (KERN_NOTICE "PROCESSOR STATE:\n" );verbose_printk (KERN_NOTICE " R0 : %08lx R1 : %08lx R2 : %08lx R3 : %08lx\n" , fp->r0, fp->r1, fp->r2, fp->r3); verbose_printk(KERN_NOTICE " R4 : %08lx R5 : %08lx R6 : %08lx R7 : %08lx\n",
arch/m68knommu/kernel/process.c +10 -11
@@ -290,7 +290,7 @@ void dump(struct pt_regs *fp)unsigned char *tp;int i; -printk (KERN_EMERG "\n" KERN_EMERG "CURRENT PROCESS:\n" KERN_EMERG "\n" ); +printk (KERN_EMERG "\nCURRENT PROCESS:\n\n" );printk (KERN_EMERG "COMM=%s PID=%d\n" , current->comm, current->pid);if (current->mm) {
@@ -301,8 +301,7 @@ void dump(struct pt_regs *fp) (int ) current->mm->end_data, (int ) current->mm->end_data, (int) current->mm->brk); -printk (KERN_EMERG "USER-STACK=%08x KERNEL-STACK=%08x\n" -KERN_EMERG "\n" , +printk (KERN_EMERG "USER-STACK=%08x KERNEL-STACK=%08x\n\n" , (int ) current->mm->start_stack, (int )(((unsigned long ) current) +THREAD_SIZE )); }
@@ -313,35 +312,35 @@ void dump(struct pt_regs *fp) fp->d0, fp->d1, fp->d2, fp->d3);printk (KERN_EMERG "d4: %08lx d5: %08lx a0: %08lx a1: %08lx\n" , fp->d4, fp->d5, fp->a0, fp->a1); -printk (KERN_EMERG "\n" KERN_EMERG "USP: %08x TRAPFRAME: %08x\n" , +printk (KERN_EMERG "\nUSP: %08x TRAPFRAME: %08x\n" , (unsigned int )rdusp (), (unsigned int ) fp); -printk (KERN_EMERG "\n" KERN_EMERG "CODE:" ); +printk (KERN_EMERG "\nCODE:" ); tp = ((unsigned char *) fp->pc) -0x20 ;for (sp = (unsigned long *) tp, i =0 ; (i <0x40 ); i +=4 ) {if ((i %0x10 ) ==0 ) -printk ("\n" KERN_EMERG "%08x: " , (int ) (tp + i)); +printk (KERN_EMERG "%08x: " , (int ) (tp + i));printk ("%08x " , (int ) *sp++); } -printk ("\n" KERN_EMERG "\n" ); +printk (KERN_EMERG "\n" );printk (KERN_EMERG "KERNEL STACK:" ); tp = ((unsigned char *) fp) -0x40 ;for (sp = (unsigned long *) tp, i =0 ; (i <0xc0 ); i +=4 ) {if ((i %0x10 ) ==0 ) -printk ("\n" KERN_EMERG "%08x: " , (int ) (tp + i)); +printk (KERN_EMERG "%08x: " , (int ) (tp + i));printk ("%08x " , (int ) *sp++); } -printk ("\n" KERN_EMERG "\n" ); +printk (KERN_EMERG "\n" );printk (KERN_EMERG "USER STACK:" ); tp = (unsigned char *) (rdusp () -0x10 );for (sp = (unsigned long *) tp, i =0 ; (i <0x80 ); i +=4 ) {if ((i %0x10 ) ==0 ) -printk ("\n" KERN_EMERG "%08x: " , (int ) (tp + i)); +printk (KERN_EMERG "%08x: " , (int ) (tp + i));printk ("%08x " , (int ) *sp++); } -printk ("\n" KERN_EMERG "\n" ); +printk (KERN_EMERG "\n" ); }/*
arch/m68knommu/kernel/traps.c +3 -3
@@ -111,7 +111,7 @@ static void print_this_address(unsigned long addr, int i)if (i %5 )printk (KERN_CONT " [%08lx] " , addr);else -printk (KERN_CONT "\n" KERN_EMERG " [%08lx] " , addr); +printk (KERN_EMERG " [%08lx] " , addr); i++;#endif }
@@ -137,8 +137,8 @@ static void __show_stack(struct task_struct *task, unsigned long *stack)if (stack +1 + i > endstack)break ;if (i %8 ==0 ) -printk ("\n" KERN_EMERG " " ); -printk (" %08lx" , *(stack + i)); +printk (KERN_EMERG " " ); +printk (KERN_CONT " %08lx" , *(stack + i)); }printk ("\n" ); i =0 ;
arch/mn10300/kernel/traps.c +8 -13
@@ -136,8 +136,7 @@ void show_trace(unsigned long *sp)unsigned long *stack, addr, module_start, module_end;int i; -printk (KERN_EMERG "\n" -KERN_EMERG "Call Trace:" ); +printk (KERN_EMERG "\nCall Trace:" ); stack = sp; i =0 ;
@@ -153,7 +152,7 @@ void show_trace(unsigned long *sp)printk ("\n" );#else if ((i %6 ) ==0 ) -printk ("\n" KERN_EMERG " " ); +printk (KERN_EMERG " " );printk ("[<%08lx>] " , addr); i++;#endif
@@ -180,7 +179,7 @@ void show_stack(struct task_struct *task, unsigned long *sp)if (((long ) stack & (THREAD_SIZE -1 )) ==0 )break ;if ((i %8 ) ==0 ) -printk ("\n" KERN_EMERG " " ); +printk (KERN_EMERG " " );printk ("%08lx " , *stack++); }
@@ -264,8 +263,7 @@ void show_registers(struct pt_regs *regs)show_stack (current, (unsigned long *) sp);#if 0 -printk (KERN_EMERG "\n" -KERN_EMERG "Code: " ); +printk (KERN_EMERG "\nCode: " );if (regs->pc <PAGE_OFFSET ) goto bad;
@@ -311,16 +309,14 @@ void die(const char *str, struct pt_regs *regs, enum exception_code code) {console_verbose ();spin_lock_irq (&die_lock); -printk (KERN_EMERG "\n" -KERN_EMERG "%s: %04x\n" , +printk (KERN_EMERG "\n%s: %04x\n" , str, code &0xffff );show_registers (regs);if (regs->pc >=0x02000000 && regs->pc <0x04000000 && (regs->epsw & (EPSW_IM |EPSW_IE )) != (EPSW_IM |EPSW_IE )) {printk (KERN_EMERG "Exception in usermode interrupt handler\n" ); -printk (KERN_EMERG "\n" -KERN_EMERG " Please connect to kernel debugger !!\n" ); +printk (KERN_EMERG "\nPlease connect to kernel debugger !!\n" ); asmvolatile ("0: bra 0b" ); }
@@ -429,9 +425,8 @@ asmlinkage void io_bus_error(u32 bcberr, u32 bcbear, struct pt_regs *regs) {console_verbose (); -printk (KERN_EMERG "\n" -KERN_EMERG "Asynchronous I/O Bus Error\n" -KERN_EMERG "==========================\n" ); +printk (KERN_EMERG "Asynchronous I/O Bus Error\n" ); +printk (KERN_EMERG "==========================\n" );if (bcberr &BCBERR_BEME )printk (KERN_EMERG "- Multiple recorded errors\n" );
arch/parisc/kernel/process.c +1 -1
@@ -156,7 +156,7 @@ void machine_power_off(void)* software. The user has to press the button himself. */ printk (KERN_EMERG "System shut down completed.\n" -KERN_EMERG "Please power this system off now." ); +"Please power this system off now." ); }void (*pm_power_off)(void ) = machine_power_off;
arch/parisc/kernel/traps.c +10 -10
@@ -250,15 +250,14 @@ void die_if_kernel(char *str, struct pt_regs *regs, long err)oops_enter ();/* Amuse the user in a SPARC fashion */ -if (err)printk ( -KERN_CRIT " _______________________________ \n" -KERN_CRIT " < Your System ate a SPARC! Gah! >\n" -KERN_CRIT " ------------------------------- \n" -KERN_CRIT " \\ ^__^\n" -KERN_CRIT " \\ (xx)\\_______\n" -KERN_CRIT " (__)\\ )\\/\\\n" -KERN_CRIT " U ||----w |\n" -KERN_CRIT " || ||\n" ); +if (err)printk (KERN_CRIT +" _______________________________ \n" +" < Your System ate a SPARC! Gah! >\n" +" ------------------------------- \n" +" \\ ^__^\n" +" (__)\\ )\\/\\\n" +" U ||----w |\n" +" || ||\n" );/* unlock the pdc lock if necessary */ pdc_emergency_unlock ();
@@ -797,7 +796,8 @@ void notrace handle_interruption(int code, struct pt_regs *regs) else printk(KERN_DEBUG "User Fault (long pointer) (fault %d) ", code); -printk ("pid=%d command='%s'\n" ,task_pid_nr (current), current->comm); +printk (KERN_CONT "pid=%d command='%s'\n" , +task_pid_nr (current), current->comm);show_regs (regs);#endif si.si_signo =SIGSEGV ;
arch/um/kernel/sysrq.c +2 -2
@@ -70,8 +70,8 @@ void show_stack(struct task_struct *task, unsigned long *esp)if (kstack_end (stack))break ;if (i && ((i %8 ) ==0 )) -printk ("\n" KERN_INFO " " ); -printk ("%08lx " , *stack++); +printk (KERN_INFO " " ); +printk (KERN_CONT "%08lx " , *stack++); }show_trace (task, esp);
arch/x86/kernel/apic/io_apic.c +1 -1
@@ -1745,7 +1745,7 @@ __apicdebuginit(void) print_local_APIC(void *dummy)if (apic_verbosity ==APIC_QUIET )return ; -printk ("\n" KERN_DEBUG "printing local APIC contents on CPU#%d/%d:\n" , +printk (KERN_DEBUG "printing local APIC contents on CPU#%d/%d:\n" ,smp_processor_id (),hard_smp_processor_id ()); v =apic_read (APIC_ID );printk (KERN_INFO "... APIC ID: %08x (%01x)\n" , v,read_apic_id ());
arch/x86/kernel/cpu/cpufreq/powernow-k8.c +1 -1
@@ -1267,7 +1267,7 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol) {static const char ACPI_PSS_BIOS_BUG_MSG [] = KERN_ERR FW_BUG PFX "No compatible ACPI _PSS objects found.\n" -KERN_ERR FW_BUG PFX "Try again with latest BIOS.\n" ; +FW_BUG PFX "Try again with latest BIOS.\n" ;struct powernow_k8_data *data;struct init_on_cpu init_on_cpu;int rc;
arch/x86/kernel/cpu/mcheck/mce.c +6 -6
@@ -194,14 +194,14 @@ static void print_mce(struct mce *m) m->cs, m->ip);if (m->cs == __KERNEL_CS)print_symbol ("{%s}" , m->ip); -printk ("\n" ); +printk (KERN_CONT "\n" ); }printk (KERN_EMERG "TSC %llx " , m->tsc);if (m->addr) -printk ("ADDR %llx " , m->addr); +printk (KERN_CONT "ADDR %llx " , m->addr);if (m->misc) -printk ("MISC %llx " , m->misc); -printk ("\n" ); +printk (KERN_CONT "MISC %llx " , m->misc); +printk (KERN_CONT "\n" );printk (KERN_EMERG "PROCESSOR %u:%x TIME %llu SOCKET %u APIC %x\n" , m->cpuvendor, m->cpuid, m->time, m->socketid, m->apicid);
@@ -209,13 +209,13 @@ static void print_mce(struct mce *m)static void print_mce_head (void ) { -printk (KERN_EMERG "\n" KERN_EMERG "HARDWARE ERROR\n" ); +printk (KERN_EMERG "\nHARDWARE ERROR\n" ); }static void print_mce_tail (void ) {printk (KERN_EMERG "This is not a software problem!\n" -KERN_EMERG "Run through mcelog --ascii to decode and contact your hardware vendor\n" ); +"Run through mcelog --ascii to decode and contact your hardware vendor\n" ); }#define PANIC_TIMEOUT 5/* 5 seconds */
arch/x86/kernel/e820.c +3 -4
@@ -627,10 +627,9 @@ __init void e820_setup_gap(void)#ifdef CONFIG_X86_64 if (!found) { gapstart = (max_pfn <<PAGE_SHIFT ) +1024 *1024 ; -printk (KERN_ERR "PCI: Warning: Cannot find a gap in the 32bit " -"address range\n" -KERN_ERR "PCI: Unassigned devices with 32bit resource " -"registers may break!\n" ); +printk (KERN_ERR +"PCI: Warning: Cannot find a gap in the 32bit address range\n" +"PCI: Unassigned devices with 32bit resource registers may break!\n" ); }#endif
arch/x86/kernel/pci-gart_64.c +1 -1
@@ -675,7 +675,7 @@ static __init int init_k8_gatt(struct agp_kern_info *info) nommu:/* Should not happen anymore */ printk (KERN_WARNING "PCI-DMA: More than 4GB of RAM and no IOMMU\n" -KERN_WARNING "falling back to iommu=soft.\n" ); +"falling back to iommu=soft.\n" );return -1 ; }
arch/x86/mm/fault.c +5 -4
@@ -426,10 +426,11 @@ static noinline int vmalloc_fault(unsigned long address) }static const char errata93_warning[] = -KERN_ERR "******* Your BIOS seems to not contain a fix for K8 errata #93\n" -KERN_ERR "******* Working around it, but it may cause SEGVs or burn power.\n" -KERN_ERR "******* Please consider a BIOS update.\n" -KERN_ERR "******* Disabling USB legacy in the BIOS may also help.\n" ; +KERN_ERR +"******* Your BIOS seems to not contain a fix for K8 errata #93\n" +"******* Working around it, but it may cause SEGVs or burn power.\n" +"******* Please consider a BIOS update.\n" +"******* Disabling USB legacy in the BIOS may also help.\n" ;/* * No vm86 mode in 64-bit mode:
arch/xtensa/kernel/traps.c +3 -3
@@ -354,10 +354,10 @@ void show_regs(struct pt_regs * regs)for (i =0 ; i <16 ; i++) {if ((i %8 ) ==0 ) -printk ("\n" KERN_INFO "a%02d: " , i); -printk ("%08lx " , regs->areg[i]); +printk (KERN_INFO "a%02d:" , i); +printk (KERN_CONT " %08lx" , regs->areg[i]); } -printk ("\n" ); +printk (KERN_CONT "\n" );printk ("pc: %08lx, ps: %08lx, depc: %08lx, excvaddr: %08lx\n" , regs->pc, regs->ps, regs->depc, regs->excvaddr);
drivers/block/amiflop.c +1 -1
@@ -1645,7 +1645,7 @@ static int __init fd_probe_drives(void) {int drive,drives,nomem; -printk (KERN_INFO "FD: probing units\n" KERN_INFO "found " ); +printk (KERN_INFO "FD: probing units\nfound " ); drives=0 ; nomem=0 ;for (drive=0 ;drive<FD_MAX_UNITS ;drive++) {
drivers/block/xsysace.c +4 -3
@@ -390,9 +390,10 @@ static inline void ace_dump_mem(void *base, int len)static void ace_dump_regs (struct ace_device *ace) { - dev_info(ace->dev, " ctrl: %.8x seccnt/cmd: %.4x ver:%.4x\n" - KERN_INFO " status:%.8x mpu_lba:%.8x busmode:%4x\n" - KERN_INFO " error: %.8x cfg_lba:%.8x fatstat:%.4x\n", + dev_info(ace->dev, + " ctrl: %.8x seccnt/cmd: %.4x ver:%.4x\n" + " status:%.8x mpu_lba:%.8x busmode:%4x\n" + " error: %.8x cfg_lba:%.8x fatstat:%.4x\n", ace_in32(ace, ACE_CTRL), ace_in(ace, ACE_SECCNTCMD), ace_in(ace, ACE_VERSION),
drivers/char/hw_random/intel-rng.c +5 -4
@@ -305,10 +305,11 @@ static int __init intel_init_hw_struct(struct intel_rng_hw *intel_rng_hw, (BIOS_CNTL_LOCK_ENABLE_MASK|BIOS_CNTL_WRITE_ENABLE_MASK)) == BIOS_CNTL_LOCK_ENABLE_MASK) {static __initdata /*const*/ char warning[] = - KERN_WARNING PFX "Firmware space is locked read-only. If you can't or\n" -KERN_WARNING PFX "don't want to disable this in firmware setup, and if\n" -KERN_WARNING PFX "you are certain that your system has a functional\n" -KERN_WARNING PFX "RNG, try using the 'no_fwh_detect' option.\n" ; +KERN_WARNING +PFX "Firmware space is locked read-only. If you can't or\n" +PFX "don't want to disable this in firmware setup, and if\n" +PFX "you are certain that your system has a functional\n" +PFX "RNG, try using the 'no_fwh_detect' option.\n" ;if (no_fwh_detect)return -ENODEV ;
drivers/char/isicom.c +8 -8
@@ -1478,10 +1478,10 @@ static int __devinit load_firmware(struct pci_dev *pdev, status =inw (base +0x4 );if (status !=0 ) {dev_warn (&pdev->dev,"Card%d rejected load header:\n" -KERN_WARNING "Address:0x%x\n" -KERN_WARNING "Count:0x%x\n" -KERN_WARNING "Status:0x%x\n" , - index +1 , frame->addr, frame->count, status); +"Address:0x%x\n" +"Count:0x%x\n" +"Status:0x%x\n" , + index +1 , frame->addr, frame->count, status); goto errrelfw; }outsw (base, frame->data, word_count);
@@ -1526,10 +1526,10 @@ static int __devinit load_firmware(struct pci_dev *pdev, status =inw (base +0x4 );if (status !=0 ) {dev_warn (&pdev->dev,"Card%d rejected verify header:\n" -KERN_WARNING "Address:0x%x\n" -KERN_WARNING "Count:0x%x\n" -KERN_WARNING "Status: 0x%x\n" , - index +1 , frame->addr, frame->count, status); +"Address:0x%x\n" +"Count:0x%x\n" +"Status: 0x%x\n" , + index +1 , frame->addr, frame->count, status); goto errrelfw; }
drivers/i2c/busses/i2c-ibm_iic.c +5 -4
@@ -85,10 +85,11 @@ static void dump_iic_regs(const char* header, struct ibm_iic_private* dev) {volatile struct iic_regs __iomem *iic = dev->vaddr;printk (KERN_DEBUG "ibm-iic%d: %s\n" , dev->idx, header); -printk (KERN_DEBUG " cntl = 0x%02x, mdcntl = 0x%02x\n" -KERN_DEBUG " sts = 0x%02x, extsts = 0x%02x\n" -KERN_DEBUG " clkdiv = 0x%02x, xfrcnt = 0x%02x\n" -KERN_DEBUG " xtcntlss = 0x%02x, directcntl = 0x%02x\n" , +printk (KERN_DEBUG +" cntl = 0x%02x, mdcntl = 0x%02x\n" +" sts = 0x%02x, extsts = 0x%02x\n" +" clkdiv = 0x%02x, xfrcnt = 0x%02x\n" +" xtcntlss = 0x%02x, directcntl = 0x%02x\n" ,in_8 (&iic->cntl),in_8 (&iic->mdcntl),in_8 (&iic->sts),in_8 (&iic->extsts),in_8 (&iic->clkdiv),in_8 (&iic->xfrcnt),in_8 (&iic->xtcntlss),in_8 (&iic->directcntl));
drivers/md/md.c +10 -8
@@ -1756,9 +1756,10 @@ static void print_sb_1(struct mdp_superblock_1 *sb)__u8 *uuid; uuid = sb->set_uuid; - printk(KERN_INFO "md: SB: (V:%u) (F:0x%08x) Array-ID:<%02x%02x%02x%02x" - ":%02x%02x:%02x%02x:%02x%02x:%02x%02x%02x%02x%02x%02x>\n" - KERN_INFO "md: Name: \"%s\" CT:%llu\n", + printk(KERN_INFO + "md: SB: (V:%u) (F:0x%08x) Array-ID:<%02x%02x%02x%02x" + ":%02x%02x:%02x%02x:%02x%02x:%02x%02x%02x%02x%02x%02x>\n" + "md: Name: \"%s\" CT:%llu\n", le32_to_cpu(sb->major_version), le32_to_cpu(sb->feature_map), uuid[0], uuid[1], uuid[2], uuid[3],
@@ -1770,12 +1771,13 @@ static void print_sb_1(struct mdp_superblock_1 *sb) & MD_SUPERBLOCK_1_TIME_SEC_MASK); uuid = sb->device_uuid; - printk(KERN_INFO "md: L%u SZ%llu RD:%u LO:%u CS:%u DO:%llu DS:%llu SO:%llu" + printk(KERN_INFO + "md: L%u SZ%llu RD:%u LO:%u CS:%u DO:%llu DS:%llu SO:%llu" " RO:%llu\n" - KERN_INFO "md: Dev:%08x UUID: %02x%02x%02x%02x:%02x%02x:%02x%02x:%02x%02x" - ":%02x%02x%02x%02x%02x%02x\n" - KERN_INFO "md: (F:0x%08x) UT:%llu Events:%llu ResyncOffset:%llu CSUM:0x%08x\n" - KERN_INFO "md: (MaxDev:%u) \n", + "md: Dev:%08x UUID: %02x%02x%02x%02x:%02x%02x:%02x%02x:%02x%02x" + ":%02x%02x%02x%02x%02x%02x\n" + "md: (F:0x%08x) UT:%llu Events:%llu ResyncOffset:%llu CSUM:0x%08x\n" + "md: (MaxDev:%u) \n", le32_to_cpu(sb->level), (unsigned long long)le64_to_cpu(sb->size), le32_to_cpu(sb->raid_disks),
drivers/misc/sgi-xp/xpnet.c +2 -2
@@ -235,7 +235,7 @@ xpnet_receive(short partid, int channel, struct xpnet_message *msg) skb->ip_summed =CHECKSUM_UNNECESSARY ;dev_dbg (xpnet,"passing skb to network layer\n" -KERN_DEBUG "\tskb->head=0x%p skb->data=0x%p skb->tail=0x%p " +"\tskb->head=0x%p skb->data=0x%p skb->tail=0x%p " "skb->end=0x%p skb->len=%d\n" , (void *)skb->head, (void *)skb->data,skb_tail_pointer (skb),skb_end_pointer (skb), skb->len);
@@ -399,7 +399,7 @@ xpnet_send(struct sk_buff *skb, struct xpnet_pending_msg *queued_msg, msg->buf_pa =xp_pa ((void *)start_addr);dev_dbg (xpnet,"sending XPC message to %d:%d\n" -KERN_DEBUG "msg->buf_pa=0x%lx, msg->size=%u, " +"msg->buf_pa=0x%lx, msg->size=%u, " "msg->leadin_ignore=%u, msg->tailout_ignore=%u\n" , dest_partid,XPC_NET_CHANNEL , msg->buf_pa, msg->size, msg->leadin_ignore, msg->tailout_ignore);
drivers/net/a2065.c +2 -10
@@ -569,16 +569,8 @@ static int lance_start_xmit (struct sk_buff *skb, struct net_device *dev)#ifdef DEBUG_DRIVER /* dump the packet */ - { -int i; - -for (i =0 ; i <64 ; i++) { -if ((i %16 ) ==0 ) -printk ("\n" KERN_DEBUG ); -printk ("%2.2x " , skb->data [i]); - } -printk ("\n" ); - } +print_hex_dump (KERN_DEBUG ,"skb->data: " ,DUMP_PREFIX_NONE , +16 ,1 , skb->data,64 , true);#endif entry = lp->tx_new & lp->tx_ring_mod_mask; ib->btx_ring [entry].length = (-skblen) |0xf000 ;
drivers/net/arcnet/arcnet.c +10 -16
@@ -158,15 +158,12 @@ module_exit(arcnet_exit);void arcnet_dump_skb (struct net_device *dev,struct sk_buff *skb,char *desc) { -int i; +char hdr[32 ]; -printk (KERN_DEBUG "%6s: skb dump (%s) follows:" , dev->name, desc); -for (i =0 ; i < skb->len; i++) { -if (i %16 ==0 ) -printk ("\n" KERN_DEBUG "[%04X] " , i); -printk ("%02X " , ((u_char *) skb->data)[i]); - } -printk ("\n" ); +/* dump the packet */ +snprintf (hdr,sizeof (hdr),"%6s:%s skb->data:" , dev->name, desc); +print_hex_dump (KERN_DEBUG , hdr,DUMP_PREFIX_OFFSET , +16 ,1 , skb->data, skb->len, true); }EXPORT_SYMBOL (arcnet_dump_skb);
@@ -184,6 +181,7 @@ static void arcnet_dump_packet(struct net_device *dev, int bufnum,int i, length;unsigned long flags =0 ;static uint8_t buf[512 ]; +char hdr[32 ];/* hw.copy_from_card expects IRQ context so take the IRQ lock to keep it single threaded */
@@ -197,14 +195,10 @@ static void arcnet_dump_packet(struct net_device *dev, int bufnum,/* if the offset[0] byte is nonzero, this is a 256-byte packet */ length = (buf[2 ] ?256 :512 ); -printk (KERN_DEBUG "%6s: packet dump (%s) follows:" , dev->name, desc); -for (i =0 ; i < length; i++) { -if (i %16 ==0 ) -printk ("\n" KERN_DEBUG "[%04X] " , i); -printk ("%02X " , buf[i]); - } - printk("\n"); - +/* dump the packet */ +snprintf (hdr,sizeof (hdr),"%6s:%s packet dump:" , dev->name, desc); +print_hex_dump (KERN_DEBUG , hdr,DUMP_PREFIX_OFFSET , + 16, 1, buf, length, true); }#else
drivers/net/bmac.c +4 -3
@@ -428,10 +428,11 @@ bmac_init_phy(struct net_device *dev)printk (KERN_DEBUG "phy registers:" );for (addr =0 ; addr <32 ; ++addr) {if ((addr &7 ) ==0 ) -printk ("\n" KERN_DEBUG ); -printk (" %.4x" ,bmac_mif_read (dev, addr)); +printk (KERN_DEBUG ); +printk (KERN_CONT " %.4x" ,bmac_mif_read (dev, addr)); } -printk ("\n" ); +KERN_CONT "\n" ); +if (bp->is_bmac_plus) {unsigned int capable, ctrl;
drivers/net/bnx2x_main.c +4 -3
@@ -484,8 +484,9 @@ static void bnx2x_fw_dump(struct bnx2x *bp) mark =REG_RD (bp,MCP_REG_MCPR_SCRATCH +0xf104 ); mark = ((mark +0x3 ) & ~0x3 ); - printk(KERN_ERR PFX "begin fw dump (mark 0x%x)\n" KERN_ERR, mark); + printk(KERN_ERR PFX "begin fw dump (mark 0x%x)\n", mark); + printk(KERN_ERR PFX);for (offset = mark -0x08000000 ; offset <=0xF900 ; offset +=0x8 *4 ) {for (word =0 ; word <8 ; word++) data[word] = htonl(REG_RD(bp, MCP_REG_MCPR_SCRATCH +
@@ -500,7 +501,7 @@ static void bnx2x_fw_dump(struct bnx2x *bp) data[8 ] =0x0 ;printk (KERN_CONT "%s" , (char *)data); } -printk ("\n" KERN_ERR PFX "end of fw dump\n" ); + printk(KERN_ERR PFX "end of fw dump\n"); }static void bnx2x_panic_dump (struct bnx2x *bp)
@@ -7354,7 +7355,7 @@ static void bnx2x_reset_task(struct work_struct *work)#ifdef BNX2X_STOP_ON_ERROR BNX2X_ERR ("reset task called but STOP_ON_ERROR defined" " so reset not done to allow debug dump,\n" -KERN_ERR " you will need to reboot when done\n" ); +" you will need to reboot when done\n" );return ;#endif
drivers/net/dl2k.c +9 -8
@@ -268,8 +268,9 @@ rio_probe1 (struct pci_dev *pdev, const struct pci_device_id *ent)printk (KERN_INFO "tx_coalesce:\t%d packets\n" , tx_coalesce);if (np->coalesce) -printk (KERN_INFO "rx_coalesce:\t%d packets\n" -KERN_INFO "rx_timeout: \t%d ns\n" , +printk (KERN_INFO +"rx_coalesce:\t%d packets\n" +"rx_timeout: \t%d ns\n" , np->rx_coalesce, np->rx_timeout*640 );if (np->vlan)printk (KERN_INFO "vlan(id):\t%d\n" , np->vlan);
@@ -1522,9 +1523,9 @@ mii_get_media (struct net_device *dev)printk (KERN_INFO "Operating at 10 Mbps, " ); }if (bmcr &MII_BMCR_DUPLEX_MODE ) { -printk ("Full duplex\n" ); +printk (KERN_CONT "Full duplex\n" ); }else { -printk ("Half duplex\n" ); +printk (KERN_CONT "Half duplex\n" ); } }if (np->tx_flow)
@@ -1614,9 +1615,9 @@ mii_set_media (struct net_device *dev) }if (np->full_duplex) { bmcr |=MII_BMCR_DUPLEX_MODE ; -printk ("Full duplex\n" ); +printk (KERN_CONT "Full duplex\n" ); }else { -printk ("Half duplex\n" ); +printk (KERN_CONT "Half duplex\n" ); }#if 0 /* Set 1000BaseT Master/Slave setting */
@@ -1669,9 +1670,9 @@ mii_get_media_pcs (struct net_device *dev)__u16 bmcr =mii_read (dev, phy_addr,PCS_BMCR );printk (KERN_INFO "Operating at 1000 Mbps, " );if (bmcr &MII_BMCR_DUPLEX_MODE ) { -printk ("Full duplex\n" ); +printk (KERN_CONT "Full duplex\n" ); }else { -printk ("Half duplex\n" ); +printk (KERN_CONT "Half duplex\n" ); } }if (np->tx_flow)
drivers/net/epic100.c +2 -3
@@ -338,8 +338,7 @@ static int __devinit epic_init_one (struct pci_dev *pdev,#ifndef MODULE static int printed_version;if (!printed_version++) -printk (KERN_INFO "%s" KERN_INFO "%s" , - version, version2); +printk (KERN_INFO "%s%s" , version, version2);#endif card_idx++;
@@ -1600,7 +1599,7 @@ static int __init epic_init (void) {/* when a module, this is printed whether or not devices are found in probe */ #ifdef MODULE -printk (KERN_INFO "%s" KERN_INFO "%s" , +printk (KERN_INFO "%s%s" , version, version2);#endif
drivers/net/fealnx.c +9 -6
@@ -1209,17 +1209,20 @@ static void fealnx_tx_timeout(struct net_device *dev)unsigned long flags;int i; -printk (KERN_WARNING "%s: Transmit timed out, status %8.8x," -" resetting...\n" , dev->name,ioread32 (ioaddr +ISR )); +printk (KERN_WARNING +"%s: Transmit timed out, status %8.8x, resetting...\n" , + dev->name,ioread32 (ioaddr +ISR )); {printk (KERN_DEBUG " Rx ring %p: " , np->rx_ring);for (i =0 ; i <RX_RING_SIZE ; i++) -printk (" %8.8x" , (unsigned int ) np->rx_ring[i].status); -printk ("\n" KERN_DEBUG " Tx ring %p: " , np->tx_ring); +printk (PR_CONT " %8.8x" , + (unsigned int ) np->rx_ring[i].status); +printk (KERN_CONT "\n" ); +printk (KERN_DEBUG " Tx ring %p: " , np->tx_ring);for (i =0 ; i <TX_RING_SIZE ; i++) -printk (" %4.4x" , np->tx_ring[i].status); -printk ("\n" ); +printk (PR_CONT " %4.4x" , np->tx_ring[i].status); +printk (PR_CONT "\n" ); }spin_lock_irqsave (&np->lock, flags);
drivers/net/hamachi.c +13 -10
@@ -173,8 +173,8 @@ static int tx_params[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1};static const char version[]__devinitconst = KERN_INFO DRV_NAME ".c:v" DRV_VERSION " " DRV_RELDATE " Written by Donald Becker\n" -KERN_INFO " Some modifications by Eric kasten <[email protected]>\n" -KERN_INFO " Further modifications by Keith Underwood <[email protected]>\n" ; +" Some modifications by Eric kasten <[email protected]>\n" +" Further modifications by Keith Underwood <[email protected]>\n" ;/* IP_MF appears to be only defined in <netinet/ip.h>, however,
@@ -1080,11 +1080,14 @@ static void hamachi_tx_timeout(struct net_device *dev) {printk (KERN_DEBUG " Rx ring %p: " , hmp->rx_ring);for (i =0 ; i <RX_RING_SIZE ; i++) -printk (" %8.8x" ,le32_to_cpu (hmp->rx_ring[i].status_n_length)); -printk ("\n" KERN_DEBUG " Tx ring %p: " , hmp->tx_ring); +printk (KERN_CONT " %8.8x" , +le32_to_cpu (hmp->rx_ring[i].status_n_length)); +printk (KERN_CONT "\n" ); +printk (KERN_DEBUG " Tx ring %p: " , hmp->tx_ring);for (i =0 ; i <TX_RING_SIZE ; i++) -printk (" %4.4x" ,le32_to_cpu (hmp->tx_ring[i].status_n_length)); -printk ("\n" ); +printk (KERN_CONT " %4.4x" , +le32_to_cpu (hmp->tx_ring[i].status_n_length)); +printk (KERN_CONT "\n" ); }/* Reinit the hardware and make sure the Rx and Tx processes
@@ -1753,13 +1756,13 @@ static int hamachi_close(struct net_device *dev)#ifdef __i386__if (hamachi_debug >2 ) { -printk ("\n" KERN_DEBUG " Tx ring at %8.8x:\n" , +printk (KERN_DEBUG " Tx ring at %8.8x:\n" , (int )hmp->tx_ring_dma);for (i =0 ; i <TX_RING_SIZE ; i++) -printk (" %c #%d desc. %8.8x %8.8x.\n" , +printk (KERN_DEBUG " %c #%d desc. %8.8x %8.8x.\n" ,readl (ioaddr + TxCurPtr) == (long )&hmp->tx_ring[i] ?'>' :' ' , i, hmp->tx_ring[i].status_n_length, hmp->tx_ring[i].addr); -printk ("\n" KERN_DEBUG " Rx ring %8.8x:\n" , +printk (KERN_DEBUG " Rx ring %8.8x:\n" , (int )hmp->rx_ring_dma);for (i =0 ; i <RX_RING_SIZE ; i++) { printk(KERN_DEBUG " %c #%d desc. %4.4x %8.8x\n",
@@ -1770,7 +1773,7 @@ static int hamachi_close(struct net_device *dev)u16 *addr = (u16 *) hmp->rx_skbuff[i]->data;int j; - +printk (KERN_DEBUG "Addr: " );for (j =0 ; j <0x50 ; j++)printk (" %4.4x" , addr[j]);printk ("\n" );
drivers/net/hamradio/baycom_epp.c +1 -1
@@ -68,7 +68,7 @@ static const char paranoia_str[] = KERN_ERRstatic const char bc_drvname[] ="baycom_epp" ;static const char bc_drvinfo[] =KERN_INFO "baycom_epp: (C) 1998-2000 Thomas Sailer, HB9JNX/AE4WA\n" -KERN_INFO "baycom_epp: version 0.7 compiled " __TIME__" " __DATE__"\n" ; +"baycom_epp: version 0.7 compiled " __TIME__" " __DATE__"\n" ;/* --------------------------------------------------------------------- */
drivers/net/hamradio/baycom_par.c +1 -1
@@ -102,7 +102,7 @@static const char bc_drvname[] ="baycom_par" ;static const char bc_drvinfo[] =KERN_INFO "baycom_par: (C) 1996-2000 Thomas Sailer, HB9JNX/AE4WA\n" -KERN_INFO "baycom_par: version 0.9 compiled " __TIME__" " __DATE__"\n" ; +"baycom_par: version 0.9 compiled " __TIME__" " __DATE__"\n" ;/* --------------------------------------------------------------------- */
drivers/net/hamradio/baycom_ser_fdx.c +1 -1
@@ -91,7 +91,7 @@static const char bc_drvname[] ="baycom_ser_fdx" ;static const char bc_drvinfo[] =KERN_INFO "baycom_ser_fdx: (C) 1996-2000 Thomas Sailer, HB9JNX/AE4WA\n" -KERN_INFO "baycom_ser_fdx: version 0.10 compiled " __TIME__" " __DATE__"\n" ; +"baycom_ser_fdx: version 0.10 compiled " __TIME__" " __DATE__"\n" ;/* --------------------------------------------------------------------- */
drivers/net/hamradio/baycom_ser_hdx.c +1 -1
@@ -79,7 +79,7 @@static const char bc_drvname[] ="baycom_ser_hdx" ;static const char bc_drvinfo[] =KERN_INFO "baycom_ser_hdx: (C) 1996-2000 Thomas Sailer, HB9JNX/AE4WA\n" -KERN_INFO "baycom_ser_hdx: version 0.10 compiled " __TIME__" " __DATE__"\n" ; +"baycom_ser_hdx: version 0.10 compiled " __TIME__" " __DATE__"\n" ;/* --------------------------------------------------------------------- */
drivers/net/natsemi.c +2 -2
@@ -130,8 +130,8 @@ static int full_duplex[MAX_UNITS];static const char version[]__devinitconst = KERN_INFO DRV_NAME " dp8381x driver, version "DRV_VERSION ", " DRV_RELDATE "\n" -KERN_INFO " originally by Donald Becker <[email protected]>\n" -KERN_INFO " 2.4.x kernel port by Jeff Garzik, Tjeerd Mulder\n" ; +" originally by Donald Becker <[email protected]>\n" +" 2.4.x kernel port by Jeff Garzik, Tjeerd Mulder\n" ;MODULE_AUTHOR ("Donald Becker <[email protected]>" );MODULE_DESCRIPTION ("National Semiconductor DP8381x series PCI Ethernet driver" );
drivers/net/ne.c +1 -1
@@ -321,7 +321,7 @@ static int __init ne_probe1(struct net_device *dev, unsigned long ioaddr) }if (ei_debug && version_printed++ ==0 ) -printk (KERN_INFO "%s" KERN_INFO "%s" , version1, version2); +printk (KERN_INFO "%s%s" , version1, version2);printk (KERN_INFO "NE*000 ethercard probe at %#3lx:" , ioaddr);
drivers/net/pci-skeleton.c +1 -1
@@ -105,7 +105,7 @@ IVc. Erratastatic char version[]__devinitdata = KERN_INFO NETDRV_DRIVER_LOAD_MSG "\n" -KERN_INFO " Support available from http://foo.com/bar/baz.html\n" ; +" Support available from http://foo.com/bar/baz.html\n" ;/* define to 1 to enable PIO instead of MMIO */ #undef USE_IO_OPS
drivers/net/pcmcia/ibmtr_cs.c +5 -8
@@ -298,14 +298,11 @@ static int __devinit ibmtr_config(struct pcmcia_device *link)strcpy (info->node.dev_name, dev->name); -printk (KERN_INFO "%s: port %#3lx, irq %d," , - dev->name, dev->base_addr, dev->irq); -printk (" mmio %#5lx," , (u_long )ti->mmio); -printk (" sram %#5lx," , (u_long )ti->sram_base <<12 ); -printk ("\n" KERN_INFO " hwaddr=" ); -for (i =0 ; i <TR_ALEN ; i++) -printk ("%02X" , dev->dev_addr[i]); -printk ("\n" ); +printk (KERN_INFO +"%s: port %#3lx, irq %d, mmio %#5lx, sram %#5lx, hwaddr=%pM\n" , + dev->name, dev->base_addr, dev->irq, + (u_long )ti->mmio, (u_long)(ti->sram_base <<12 ), + dev->dev_addr);return 0 ; cs_failed:
drivers/net/pcmcia/nmclan_cs.c +6 -9
@@ -1425,15 +1425,12 @@ static void BuildLAF(int *ladrf, int *adr) ladrf[byte] |= (1 << (hashcode &7 ));#ifdef PCMCIA_DEBUG -if (pc_debug >2 ) { -printk (KERN_DEBUG " adr =" ); -for (i =0 ; i <6 ; i++) -printk (" %02X" , adr[i]); -printk ("\n" KERN_DEBUG " hashcode = %d(decimal), ladrf[0:63]" -" =" , hashcode); -for (i =0 ; i <8 ; i++) -printk (" %02X" , ladrf[i]); -printk ("\n" ); +if (pc_debug >2 ) +printk (KERN_DEBUG " adr =%pM\n" , adr); +printk (KERN_DEBUG " hashcode = %d(decimal), ladrf[0:63] =" , hashcode); +for (i =0 ; i <8 ; i++) +printk (KERN_CONT " %02X" , ladrf[i]); + printk(KERN_CONT "\n"); }#endif }/* BuildLAF */
drivers/net/pcnet32.c +25 -25
147 lines not on this page · raw message
drivers/net/starfire.c +1 -1
@@ -180,7 +180,7 @@ static int full_duplex[MAX_UNITS] = {0, };/* These identify the driver base version and may not be removed. */ static const char version[]__devinitconst =KERN_INFO "starfire.c:v1.03 7/26/2000 Written by Donald Becker <[email protected]>\n" -KERN_INFO " (unofficial 2.2/2.4 kernel port, version " DRV_VERSION ", " DRV_RELDATE ")\n" ; +" (unofficial 2.2/2.4 kernel port, version " DRV_VERSION ", " DRV_RELDATE ")\n" ;MODULE_AUTHOR ("Donald Becker <[email protected]>" );MODULE_DESCRIPTION ("Adaptec Starfire Ethernet driver" );
drivers/net/sundance.c +3 -3
@@ -1698,13 +1698,13 @@ static int netdev_close(struct net_device *dev)#ifdef __i386__if (netif_msg_hw (np)) { -printk ("\n" KERN_DEBUG " Tx ring at %8.8x:\n" , +printk (KERN_DEBUG " Tx ring at %8.8x:\n" , (int )(np->tx_ring_dma));for (i =0 ; i <TX_RING_SIZE ; i++) -printk (" #%d desc. %4.4x %8.8x %8.8x.\n" , +printk (KERN_DEBUG " #%d desc. %4.4x %8.8x %8.8x.\n" , i, np->tx_ring[i].status, np->tx_ring[i].frag[0 ].addr, np->tx_ring[i].frag[0 ].length); -printk ("\n" KERN_DEBUG " Rx ring %8.8x:\n" , +printk (KERN_DEBUG " Rx ring %8.8x:\n" , (int )(np->rx_ring_dma));for (i =0 ; i </*RX_RING_SIZE*/ 4 ; i++) { printk(KERN_DEBUG " #%d desc. %4.4x %4.4x %8.8x\n",
drivers/net/tsi108_eth.c +5 -3
@@ -1132,7 +1132,9 @@ static int tsi108_get_mac(struct net_device *dev) }if (!is_valid_ether_addr (dev->dev_addr)) { -printk ("KERN_ERR: word1: %08x, word2: %08x\n" , word1, word2); +printk (KERN_ERR +"%s: Invalid MAC address. word1: %08x, word2: %08x\n" , + dev->name, word1, word2);return -EINVAL ; }
@@ -1201,8 +1203,8 @@ static void tsi108_set_rx_mode(struct net_device *dev)__set_bit (hash, &data->mc_hash[0 ]); }else {printk (KERN_ERR -"%s: got multicast address of length %d " -"instead of 6.\n" , dev->name, +"%s: got multicast address of length %d instead of 6.\n" , + dev->name, mc->dmi_addrlen); }
drivers/net/tulip/de2104x.c +4 -3
@@ -944,9 +944,10 @@ static void de_set_media (struct de_private *de) macmode &= ~FullDuplex;if (netif_msg_link (de)) { - printk(KERN_INFO "%s: set link %s\n" - KERN_INFO "%s: mode 0x%x, sia 0x%x,0x%x,0x%x,0x%x\n" - KERN_INFO "%s: set mode 0x%x, set sia 0x%x,0x%x,0x%x\n", + printk(KERN_INFO + "%s: set link %s\n" + "%s: mode 0x%x, sia 0x%x,0x%x,0x%x,0x%x\n" + "%s: set mode 0x%x, set sia 0x%x,0x%x,0x%x\n", de->dev->name, media_name[media], de->dev->name, dr32(MacMode), dr32(SIAStatus), dr32(CSR13), dr32(CSR14), dr32(CSR15),
drivers/net/tulip/tulip_core.c +8 -6
@@ -570,16 +570,18 @@ static void tulip_tx_timeout(struct net_device *dev) (unsigned int )tp->rx_ring[i].buffer2, buf[0], buf[1], buf[2]);for (j =0 ; buf[j] !=0xee && j <1600 ; j++) -if (j <100 )printk (" %2.2x" , buf[j]); - printk(" j=%d.\n", j); +if (j <100 ) +printk (KERN_CONT " %2.2x" , buf[j]); + printk(KERN_CONT " j=%d.\n", j); }printk (KERN_DEBUG " Rx ring %8.8x: " , (int )tp->rx_ring);for (i =0 ; i <RX_RING_SIZE ; i++) -printk (" %8.8x" , (unsigned int )tp->rx_ring[i].status); -printk ("\n" KERN_DEBUG " Tx ring %8.8x: " , (int )tp->tx_ring); +printk (KERN_CONT " %8.8x" , + (unsigned int )tp->rx_ring[i].status); +printk (KERN_DEBUG " Tx ring %8.8x: " , (int )tp->tx_ring);for (i =0 ; i <TX_RING_SIZE ; i++) -printk (" %8.8x" , (unsigned int )tp->tx_ring[i].status); -printk ("\n" ); +printk (KERN_CONT " %8.8x" , (unsigned int )tp->tx_ring[i].status); +printk (KERN_CONT "\n" ); }#endif
drivers/net/tulip/winbond-840.c +3 -3
@@ -142,7 +142,7 @@ static int full_duplex[MAX_UNITS] = {-1, -1, -1, -1, -1, -1, -1, -1};static const char version[]__initconst = KERN_INFO DRV_NAME ".c:v" DRV_VERSION " (2.4 port) "DRV_RELDATE " Donald Becker <[email protected]>\n" -KERN_INFO " http://www.scyld.com/network/drivers.html\n" ; +" http://www.scyld.com/network/drivers.html\n" ;MODULE_AUTHOR ("Donald Becker <[email protected]>" );MODULE_DESCRIPTION ("Winbond W89c840 Ethernet driver" );
@@ -939,7 +939,7 @@ static void tx_timeout(struct net_device *dev)printk (KERN_DEBUG " Rx ring %p: " , np->rx_ring);for (i =0 ; i <RX_RING_SIZE ; i++)printk (" %8.8x" , (unsigned int )np->rx_ring[i].status); -printk ("\n" KERN_DEBUG " Tx ring %p: " , np->tx_ring); +printk (KERN_DEBUG " Tx ring %p: " , np->tx_ring);for (i =0 ; i <TX_RING_SIZE ; i++)printk (" %8.8x" , np->tx_ring[i].status);printk ("\n" );
@@ -1520,7 +1520,7 @@ static int netdev_close(struct net_device *dev)printk (KERN_DEBUG " #%d desc. %4.4x %4.4x %8.8x.\n" , i, np->tx_ring[i].length, np->tx_ring[i].status, np->tx_ring[i].buffer1); -printk ("\n" KERN_DEBUG " Rx ring %8.8x:\n" , +printk (KERN_DEBUG " Rx ring %8.8x:\n" , (int )np->rx_ring);for (i =0 ; i <RX_RING_SIZE ; i++) { printk(KERN_DEBUG " #%d desc. %4.4x %4.4x %8.8x\n",
drivers/net/wan/hd64570.c +2 -1
@@ -584,8 +584,9 @@ static void sca_dump_rings(struct net_device *dev) sca_in(DSR_RX(phy_node(port)), card) & DSR_DE ? "" : "in");for (cnt =0 ; cnt <port_to_card (port)->rx_ring_buffers; cnt++)printk (" %02X" ,readb (&(desc_address (port, cnt,0 )->stat))); +printk (KERN_CONT "\n" ); - printk("\n" KERN_DEBUG "TX ring: CDA=%u EDA=%u DSR=%02X in=%u " + printk(KERN_DEBUG "TX ring: CDA=%u EDA=%u DSR=%02X in=%u " "last=%u %sactive", sca_inw(get_dmac_tx(port) + CDAL, card), sca_inw(get_dmac_tx(port) + EDAL, card),
drivers/net/wan/hd64572.c +2 -1
@@ -529,8 +529,9 @@ static void sca_dump_rings(struct net_device *dev) sca_in(DSR_RX(port->chan), card) & DSR_DE ? "" : "in");for (cnt =0 ; cnt < port->card->rx_ring_buffers; cnt++)printk (" %02X" ,readb (&(desc_address (port, cnt,0 )->stat))); +printk (KERN_CONT "\n" ); - printk("\n" KERN_DEBUG "TX ring: CDA=%u EDA=%u DSR=%02X in=%u " + printk(KERN_DEBUG "TX ring: CDA=%u EDA=%u DSR=%02X in=%u " "last=%u %sactive", sca_inl(get_dmac_tx(port) + CDAL, card), sca_inl(get_dmac_tx(port) + EDAL, card),
drivers/net/wan/sbni.c +3 -5
@@ -326,11 +326,9 @@ sbni_pci_probe( struct net_device *dev ) }if (pci_irq_line <=0 || pci_irq_line >= nr_irqs) -printk (KERN_WARNING " WARNING: The PCI BIOS assigned " -"this PCI card to IRQ %d, which is unlikely " -"to work!.\n" -KERN_WARNING " You should use the PCI BIOS " -"setup to assign a valid IRQ line.\n" , +printk (KERN_WARNING +" WARNING: The PCI BIOS assigned this PCI card to IRQ %d, which is unlikely to work!.\n" +" You should use the PCI BIOS setup to assign a valid IRQ line.\n" , pci_irq_line );/* avoiding re-enable dual adapters */
drivers/net/wireless/ray_cs.c +4 -5
@@ -2427,11 +2427,10 @@ static void untranslate(ray_dev_t *local, struct sk_buff *skb, int len)#ifdef PCMCIA_DEBUG if (pc_debug >3 ) { -int i; -printk (KERN_DEBUG "skb->data before untranslate" ); -for (i =0 ; i <64 ; i++) -printk ("%02x " , skb->data[i]); -printk ("\n" KERN_DEBUG +print_hex_dump (KERN_DEBUG ,"skb->data before untranslate: " , +DUMP_PREFIX_NONE ,16 ,1 , + skb->data,64 , true); +printk (KERN_DEBUG "type = %08x, xsap = %02x%02x%02x, org = %02x02x02x\n" ,ntohs (type), psnap->dsap, psnap->ssap, psnap->ctrl, psnap->org[0 ], psnap->org[1 ], psnap->org[2 ]);
drivers/net/wireless/wavelan_cs.c +2 -11
@@ -3556,17 +3556,8 @@ wv_82593_config(struct net_device * dev) cfblk.rcvstop = TRUE;/* Enable Receive Stop Register */ #ifdef DEBUG_I82593_SHOW - { -u_char *c = (u_char *) &cfblk; -int i; -printk (KERN_DEBUG "wavelan_cs: config block:" ); -for (i =0 ; i <sizeof (struct i82593_conf_block ); i++,c++) - { -if ((i %16 ) ==0 )printk ("\n" KERN_DEBUG ); -printk ("%02x " , *c); - } -printk ("\n" ); - } +print_hex_dump (KERN_DEBUG ,"wavelan_cs: config block: " ,DUMP_PREFIX_NONE , +16 ,1 , &cfblk,sizeof (struct i82593_conf_block ), false);#endif /* Copy the config block to the i82593 */
drivers/net/yellowfin.c +13 -10
@@ -109,7 +109,7 @@ static int gx_fix;/* These identify the driver base version and may not be removed. */ static const char version[]__devinitconst = KERN_INFO DRV_NAME ".c:v1.05 1/09/2001 Written by Donald Becker <[email protected]>\n" -KERN_INFO " (unofficial 2.4.x port, " DRV_VERSION ", " DRV_RELDATE ")\n" ; +" (unofficial 2.4.x port, " DRV_VERSION ", " DRV_RELDATE ")\n" ;MODULE_AUTHOR ("Donald Becker <[email protected]>" );MODULE_DESCRIPTION ("Packet Engines Yellowfin G-NIC Gigabit Ethernet driver" );
@@ -700,12 +700,15 @@ static void yellowfin_tx_timeout(struct net_device *dev)int i;printk (KERN_WARNING " Rx ring %p: " , yp->rx_ring);for (i =0 ; i <RX_RING_SIZE ; i++) -printk (" %8.8x" , yp->rx_ring[i].result_status); -printk ("\n" KERN_WARNING " Tx ring %p: " , yp->tx_ring); +printk (KERN_CONT " %8.8x" , + yp->rx_ring[i].result_status); +printk (KERN_CONT "\n" ); +printk (KERN_WARNING " Tx ring %p: " , yp->tx_ring);for (i =0 ; i <TX_RING_SIZE ; i++) -printk (" %4.4x /%8.8x" , yp->tx_status[i].tx_errs, - yp->tx_ring[i].result_status); -printk ("\n" ); +printk (KERN_CONT " %4.4x /%8.8x" , + yp->tx_status[i].tx_errs, + yp->tx_ring[i].result_status); +printk (KERN_CONT "\n" ); }/* If the hardware is found to hang regularly, we will update the code
@@ -1216,20 +1219,20 @@ static int yellowfin_close(struct net_device *dev)#if defined(__i386__)if (yellowfin_debug >2 ) { -printk ("\n" KERN_DEBUG " Tx ring at %8.8llx:\n" , +printk (KERN_DEBUG " Tx ring at %8.8llx:\n" , (unsigned long long )yp->tx_ring_dma);for (i =0 ; i <TX_RING_SIZE *2 ; i++) -printk (" %c #%d desc. %8.8x %8.8x %8.8x %8.8x.\n" , +printk (KERN_DEBUG " %c #%d desc. %8.8x %8.8x %8.8x %8.8x.\n" ,ioread32 (ioaddr + TxPtr) == (long )&yp->tx_ring[i] ?'>' :' ' , i, yp->tx_ring[i].dbdma_cmd, yp->tx_ring[i].addr, yp->tx_ring[i].branch_addr, yp->tx_ring[i].result_status);printk (KERN_DEBUG " Tx status %p:\n" , yp->tx_status);for (i =0 ; i <TX_RING_SIZE ; i++) -printk (" #%d status %4.4x %4.4x %4.4x %4.4x.\n" , +printk (KERN_DEBUG " #%d status %4.4x %4.4x %4.4x %4.4x.\n" , i, yp->tx_status[i].tx_cnt, yp->tx_status[i].tx_errs, yp->tx_status[i].total_tx_cnt, yp->tx_status[i].paused); -printk ("\n" KERN_DEBUG " Rx ring %8.8llx:\n" , +printk (KERN_DEBUG " Rx ring %8.8llx:\n" , (unsigned long long )yp->rx_ring_dma);for (i =0 ; i <RX_RING_SIZE ; i++) { printk(KERN_DEBUG " %c #%d desc. %8.8x %8.8x %8.8x\n",
drivers/parisc/eisa_enumerator.c +7 -7
@@ -101,7 +101,7 @@ static int configure_memory(const unsigned char *buf,printk ("memory %lx-%lx " , (unsigned long )res->start, (unsigned long )res->end); result =request_resource (mem_parent, res);if (result <0 ) { -printk ("\n" KERN_ERR "EISA Enumerator: failed to claim EISA Bus address space!\n" ); +printk (KERN_ERR "EISA Enumerator: failed to claim EISA Bus address space!\n" );return result; } }
@@ -191,7 +191,7 @@ static int configure_port(const unsigned char *buf, struct resource *io_parent,printk ("ioports %lx-%lx " , (unsigned long )res->start, (unsigned long )res->end); result =request_resource (io_parent, res);if (result <0 ) { -printk ("\n" KERN_ERR "EISA Enumerator: failed to claim EISA Bus address space!\n" ); +printk (KERN_ERR "EISA Enumerator: failed to claim EISA Bus address space!\n" );return result; } }
@@ -224,7 +224,7 @@ static int configure_port_init(const unsigned char *buf)case HPEE_PORT_INIT_WIDTH_BYTE : s=1 ;if (c &HPEE_PORT_INIT_MASK ) { -printk ("\n" KERN_WARNING "port_init: unverified mask attribute\n" ); +printk (KERN_WARNING "port_init: unverified mask attribute\n" );outb ((inb (get_16 (buf+len+1 ) &get_8 (buf+len+3 )) |get_8 (buf+len+4 )),get_16 (buf+len+1 ));
@@ -249,7 +249,7 @@ static int configure_port_init(const unsigned char *buf)case HPEE_PORT_INIT_WIDTH_DWORD : s=4 ;if (c &HPEE_PORT_INIT_MASK ) { -printk ("\n" KERN_WARNING "port_init: unverified mask attribute\n" ); +printk (KERN_WARNING "port_init: unverified mask attribute\n" );outl ((inl (get_16 (buf+len+1 ) &get_32 (buf+len+3 )) |get_32 (buf+len+7 )),get_16 (buf+len+1 ));
@@ -259,7 +259,7 @@ static int configure_port_init(const unsigned char *buf)break ;default : -printk ("\n" KERN_ERR "Invalid port init word %02x\n" , c); +printk (KERN_ERR "Invalid port init word %02x\n" , c);return 0 ; }
@@ -297,7 +297,7 @@ static int configure_type_string(const unsigned char *buf)/* just skip past the type field */ len =get_8 (buf);if (len >80 ) { -printk ("\n" KERN_ERR "eisa_enumerator: type info field too long (%d, max is 80)\n" , len); +printk (KERN_ERR "eisa_enumerator: type info field too long (%d, max is 80)\n" , len); }return 1 +len;
@@ -398,7 +398,7 @@ static int parse_slot_config(int slot, }if (p0 + function_len < pos) { -printk ("\n" KERN_ERR "eisa_enumerator: function %d length mis-match " +printk (KERN_ERR "eisa_enumerator: function %d length mis-match " "got %d, expected %d\n" , num_func, pos-p0, function_len); res=-1 ;
drivers/pcmcia/tcic.c +2 -1
@@ -472,7 +472,8 @@ static int __init init_tcic(void)init_timer (&poll_timer);/* Build interrupt mask */ -printk (", %d sockets\n" KERN_INFO " irq list (" , sockets); +printk (KERN_CONT ", %d sockets\n" , sockets); +printk (KERN_INFO " irq list (" );if (irq_list_count ==0 ) mask = irq_mask;else
drivers/scsi/atari_NCR5380.c +1 -2
@@ -2826,8 +2826,7 @@ int NCR5380_abort(Scsi_Cmnd *cmd)*/ local_irq_restore (flags); -printk (KERN_INFO "scsi%d: warning : SCSI command probably completed successfully\n" -KERN_INFO " before abortion\n" ,HOSTNO ); +printk (KERN_INFO "scsi%d: warning : SCSI command probably completed successfully before abortion\n" ,HOSTNO );/* Maybe it is sufficient just to release the ST-DMA lock... (if * possible at all) At least, we should check if the lock could be
drivers/scsi/mac53c94.c +3 -2
@@ -75,8 +75,9 @@ static int mac53c94_queue(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *int i;printk (KERN_DEBUG "mac53c94_queue %p: command is" , cmd);for (i =0 ; i < cmd->cmd_len; ++i) -printk (" %.2x" , cmd->cmnd[i]); -printk ("\n" KERN_DEBUG "use_sg=%d request_bufflen=%d request_buffer=%p\n" , +printk (KERN_CONT " %.2x" , cmd->cmnd[i]); +printk (KERN_CONT "\n" ); +printk (KERN_DEBUG "use_sg=%d request_bufflen=%d request_buffer=%p\n" , scsi_sg_count(cmd), scsi_bufflen(cmd), scsi_sglist(cmd)); }#endif
drivers/scsi/sg.c +1 -1
@@ -619,7 +619,7 @@ sg_write(struct file *filp, const char __user *buf, size_t count, loff_t * ppos)if (strcmp (current->comm, cmd) &&printk_ratelimit ()) { printk(KERN_WARNING "sg_write: data in/out %d/%d bytes for SCSI command 0x%x--" - "guessing data in;\n" KERN_WARNING " " + "guessing data in;\n " "program %s not setting count and/or reply_len properly\n", old_hdr.reply_len - (int)SZ_SG_HEADER, input_size, (unsigned int) cmnd[0],
drivers/scsi/sun3_NCR5380.c +1 -2
@@ -2860,8 +2860,7 @@ static int NCR5380_abort(struct scsi_cmnd *cmd)*/ local_irq_restore (flags); -printk (KERN_INFO "scsi%d: warning : SCSI command probably completed successfully\n" -KERN_INFO " before abortion\n" ,HOSTNO ); +printk (KERN_INFO "scsi%d: warning : SCSI command probably completed successfully before abortion\n" ,HOSTNO );return SCSI_ABORT_NOT_RUNNING ; }
drivers/serial/8250_pci.c +6 -5
@@ -60,11 +60,12 @@ struct serial_private {static void moan_device (const char *str,struct pci_dev *dev) { -printk (KERN_WARNING "%s: %s\n" -KERN_WARNING "Please send the output of lspci -vv, this\n" -KERN_WARNING "message (0x%04x,0x%04x,0x%04x,0x%04x), the\n" -KERN_WARNING "manufacturer and name of serial board or\n" -KERN_WARNING "modem board to [email protected].\n" , +printk (KERN_WARNING +"%s: %s\n" +"Please send the output of lspci -vv, this\n" +"message (0x%04x,0x%04x,0x%04x,0x%04x), the\n" +"manufacturer and name of serial board or\n" +"modem board to [email protected].\n" ,pci_name (dev), str, dev->vendor, dev->device, dev->subsystem_vendor, dev->subsystem_device); }
drivers/ssb/pcmcia.c +2 -2
@@ -583,7 +583,7 @@ static int ssb_pcmcia_sprom_write_all(struct ssb_bus *bus, const u16 *sprom)ssb_printk ("." ); err =ssb_pcmcia_sprom_write (bus, i, sprom[i]);if (err) { -ssb_printk ("\n" KERN_NOTICE PFX + ssb_printk(KERN_NOTICE PFX "Failed to write to SPROM.\n"); failed =1 ;break ;
@@ -591,7 +591,7 @@ static int ssb_pcmcia_sprom_write_all(struct ssb_bus *bus, const u16 *sprom) } err =ssb_pcmcia_sprom_command (bus,SSB_PCMCIA_SPROMCTL_WRITEDIS );if (err) { -ssb_printk ("\n" KERN_NOTICE PFX + ssb_printk(KERN_NOTICE PFX "Could not disable SPROM write access.\n"); failed =1 ; }
drivers/usb/core/hcd.c +1 -1
@@ -648,7 +648,7 @@ void usb_hcd_poll_rh_status(struct usb_hcd *hcd)struct urb *urb;int length;unsigned long flags; -char buffer[4 ];/* Any root hubs with > 31 ports? */ +char buffer[6 ];/* Any root hubs with > 31 ports? */ if (unlikely (!hcd->rh_registered))return ;
drivers/video/amba-clcd.c +4 -3
@@ -226,9 +226,10 @@ static int clcdfb_set_par(struct fb_info *info)clcdfb_enable (fb, regs.cntl);#ifdef DEBUG - printk(KERN_INFO "CLCD: Registers set to\n" - KERN_INFO " %08x %08x %08x %08x\n" - KERN_INFO " %08x %08x %08x %08x\n", + printk(KERN_INFO + "CLCD: Registers set to\n" + " %08x %08x %08x %08x\n" + " %08x %08x %08x %08x\n", readl(fb->regs + CLCD_TIM0), readl(fb->regs + CLCD_TIM1), readl(fb->regs + CLCD_TIM2), readl(fb->regs + CLCD_TIM3), readl(fb->regs + CLCD_UBAS), readl(fb->regs + CLCD_LBAS),
drivers/video/matrox/matroxfb_DAC1064.c +2 -2
@@ -454,9 +454,9 @@ static void DAC1064_restore_2(WPMINFO2) {dprintk (KERN_DEBUG "DAC1064regs " );for (i =0 ; i <sizeof (MGA1064_DAC_regs); i++) {dprintk ("R%02X=%02X " , MGA1064_DAC_regs[i],ACCESS_FBINFO (hw).DACreg[i]); -if ((i &0x7 ) ==0x7 )dprintk ("\n" KERN_DEBUG "continuing... " ); +if ((i &0x7 ) ==0x7 )dprintk (KERN_DEBUG "continuing... " ); } -dprintk ("\n" KERN_DEBUG "DAC1064clk " ); +dprintk (KERN_DEBUG "DAC1064clk " );for (i =0 ; i <6 ; i++)dprintk ("C%02X=%02X " , i,ACCESS_FBINFO (hw).DACclk[i]);dprintk ("\n" );
drivers/video/matrox/matroxfb_Ti3026.c +2 -2
@@ -651,9 +651,9 @@ static void Ti3026_restore(WPMINFO2) {dprintk (KERN_DEBUG "3026DACregs " );for (i =0 ; i <21 ; i++) {dprintk ("R%02X=%02X " , DACseq[i], hw->DACreg[i]); -if ((i &0x7 ) ==0x7 )dprintk ("\n" KERN_DEBUG "continuing... " ); +if ((i &0x7 ) ==0x7 )dprintk (KERN_DEBUG "continuing... " ); } -dprintk ("\n" KERN_DEBUG "DACclk " ); +dprintk (KERN_DEBUG "DACclk " );for (i =0 ; i <6 ; i++)dprintk ("C%02X=%02X " , i, hw->DACclk[i]);dprintk ("\n" );
drivers/video/stifb.c +3 -4
@@ -1115,10 +1115,9 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref)if the device name contains the string "DX" and tell the user how to reconfigure the card. */ if (strstr (sti->outptr.dev_name,"DX" )) { -printk (KERN_WARNING "WARNING: stifb framebuffer driver does not " -"support '%s' in double-buffer mode.\n" -KERN_WARNING "WARNING: Please disable the double-buffer mode " -"in IPL menu (the PARISC-BIOS).\n" , +printk (KERN_WARNING +"WARNING: stifb framebuffer driver does not support '%s' in double-buffer mode.\n" +"WARNING: Please disable the double-buffer mode in IPL menu (the PARISC-BIOS).\n" , sti->outptr.dev_name); goto out_err0; }
fs/jffs2/erase.c +6 -4
@@ -270,19 +270,21 @@ static inline void jffs2_remove_node_refs_from_ino_list(struct jffs2_sb_info *c,D2 ({int i=0 ;struct jffs2_raw_node_ref *this; -printk (KERN_DEBUG "After remove_node_refs_from_ino_list: \n" KERN_DEBUG ); +printk (KERN_DEBUG "After remove_node_refs_from_ino_list: \n" ); this = ic->nodes; +printk (KERN_DEBUG );while (this) { -printk ("0x%08x(%d)->" ,ref_offset (this),ref_flags (this)); +printk (KERN_CONT "0x%08x(%d)->" , +ref_offset (this),ref_flags (this));if (++i ==5 ) { -printk ("\n" KERN_DEBUG ); +printk (KERN_DEBUG ); i=0 ; } this = this->next_in_ino; } -printk ("\n" ); +printk (KERN_CONT "\n" ); });switch (ic->class) {
kernel/module.c +3 -3
@@ -2451,9 +2451,9 @@ SYSCALL_DEFINE3(init_module, void __user *, umod,return ret; }if (ret >0 ) { -printk (KERN_WARNING "%s: '%s'->init suspiciously returned %d, " -"it should follow 0/-E convention\n" -KERN_WARNING "%s: loading module anyway...\n" , +printk (KERN_WARNING +"%s: '%s'->init suspiciously returned %d, it should follow 0/-E convention\n" +"%s: loading module anyway...\n" , __func__, mod->name, ret, __func__);dump_stack ();
sound/pci/emu10k1/p16v.c +1 -1
@@ -644,7 +644,7 @@ int __devinit snd_p16v_pcm(struct snd_emu10k1 *emu, int device, struct snd_pcm *int err;int capture=1 ; -/* snd_printk("KERN_DEBUG snd_p16v_pcm called. device=%d\n", device); */ +/* snd_printk(KERN_DEBUG "snd_p16v_pcm called. device=%d\n", device); */ emu->p16v_device_offset = device;if (rpcm) *rpcm =NULL ;
sound/usb/usx2y/usbusx2yaudio.c +4 -3
@@ -296,9 +296,10 @@ static void usX2Y_error_urb_status(struct usX2Ydev *usX2Y,static void usX2Y_error_sequence (struct usX2Ydev *usX2Y,struct snd_usX2Y_substream *subs,struct urb *urb) { -snd_printk (KERN_ERR "Sequence Error!(hcd_frame=%i ep=%i%s;wait=%i,frame=%i).\n" -KERN_ERR "Most propably some urb of usb-frame %i is still missing.\n" -KERN_ERR "Cause could be too long delays in usb-hcd interrupt handling.\n" , +snd_printk (KERN_ERR +"Sequence Error!(hcd_frame=%i ep=%i%s;wait=%i,frame=%i).\n" +"Most propably some urb of usb-frame %i is still missing.\n" +"Cause could be too long delays in usb-hcd interrupt handling.\n" ,usb_get_current_frame_number (usX2Y->chip.dev), subs->endpoint,usb_pipein (urb->pipe) ?"in" :"out" , usX2Y->wait_iso_frame, urb->start_frame, usX2Y->wait_iso_frame);
Re: [PATCH] Remove multiple KERN_ prefixes from printk formats
Quoted 7 lines · Joe Perches
commit
5fd29d6ccbc98884569d6f3105aeca70858b3e0fchanged printk semantics. printk lines with multiple KERN_<level> prefixes are no longer emitted as before the patch.<level> is now included in the output on each additional use.
Remove all uses of multiple KERN_<level>s in formats.
thanks, i had started this in the Blackfin code a little, but your patch includes what i did and more, so the Blackfin stuff should be mostly fine (pending comments below).
arch/blackfin/kernel/traps.c asmlinkage void double_fault_c(struct pt_regs *fp) · line 215
Quoted 8 lines
arch/blackfin/kernel/traps.c +1
-1@@ -212,7 +212,7 @@ asmlinkage void double_fault_c(struct pt_regs *fp) console_verbose(); oops_in_progress = 1; #ifdef CONFIG_DEBUG_VERBOSE - printk(KERN_EMERG "\n" KERN_EMERG "Double Fault\n"); + printk(KERN_EMERG "Double Fault\n");
dropped a newline. we've largely made sure the newlines and such were as we want in the output ... in this case, it is not a matter of adding a newline where one did not exist before
arch/blackfin/kernel/traps.c asmlinkage void trap_c(struct pt_regs *fp) · line 593
Quoted 2 lines
arch/blackfin/kernel/traps.c +1
-1- verbose_printk(KERN_NOTICE "\n" KERN_NOTICE "Kernel Stack\n"); + verbose_printk(KERN_NOTICE "Kernel Stack\n");
and here
arch/blackfin/kernel/traps.c void dump_bfin_process(struct pt_regs *fp) · line 1012
Quoted 4 lines
arch/blackfin/kernel/traps.c +2
-2- verbose_printk(KERN_NOTICE "\n" KERN_NOTICE - "No Valid process in current context\n"); + verbose_printk(KERN_NOTICE + "No Valid process in current context\n");
and here
Quoted 3 lines
-
verbose_printk(KERN_NOTICE "\n" KERN_NOTICE "SEQUENCER STATUS:\t\t%s\n", print_tainted());
+ verbose_printk(KERN_NOTICE "\nSEQUENCER STATUS:\t\t%s\n",
+ print_tainted());
and here
Quoted 2 lines
-
verbose_printk(KERN_NOTICE "\n" KERN_NOTICE "PROCESSOR STATE:\n");
+verbose_printk(KERN_NOTICE "PROCESSOR STATE:\n");
and here
-mike
Re: [PATCH] Remove multiple KERN_ prefixes from printk formats
Quoted 3 lines · Mike Frysinger
thanks, i had started this in the Blackfin code a little, but your patch includes what i did and more, so the Blackfin stuff should be mostly fine (pending comments below).
[]
Quoted 6 lines
arch/blackfin/kernel/traps.c asmlinkage void double_fault_c(struct pt_regs *fp) · line 215
Quoted 2 lines
arch/blackfin/kernel/traps.c +1
-1-printk (KERN_EMERG "\n" KERN_EMERG "Double Fault\n" ); +printk (KERN_EMERG "Double Fault\n" );dropped a newline. we've largely made sure the newlines and such were as we want in the output ... in this case, it is not a matter of adding a newline where one did not exist before
Hi Mike.
I'm of the opinion that blank lines in the log file aren't very useful, but as you like, it's your code.
Re: [PATCH] Remove multiple KERN_ prefixes from printk formats
In reply to Mike FrysingerQuoted 7 lines · Mike Frysinger
Quoted 3 lines
#ifdef
CONFIG_DEBUG_VERBOSE
-printk(KERN_EMERG "\n" KERN_EMERG "Double Fault\n");
+printk(KERN_EMERG "Double Fault\n");dropped a newline. we've largely made sure the newlines and such were as we want in the output ... in this case, it is not a matter of adding a newline where one did not exist before
Note that the 'printk' itself will add a required newline these days.
So unless you want an _empty_ line due to an earlier '\n', the change is correct.
If you do want the empty line, it should looke like
printk(KERN_EMERG "\nDouble Fault\n");
but I suspect that you had the '\n' there because you had a previous printk which hadn't ended the line (in which case just removing it and relying on the KERN_EMERG causing a line break is the right thing to do).
Linus
Re: [PATCH] Remove multiple KERN_ prefixes from printk formats
Quoted 14 lines · Linus Torvalds
Quoted 7 lines · Mike Frysinger
Quoted 3 lines
#ifdef
CONFIG_DEBUG_VERBOSE
-printk(KERN_EMERG "\n" KERN_EMERG "Double Fault\n");
+printk(KERN_EMERG "Double Fault\n");dropped a newline. we've largely made sure the newlines and such were as we want in the output ... in this case, it is not a matter of adding a newline where one did not exist before
Note that the 'printk' itself will add a required newline these days.
So unless you want an _empty_ line due to an earlier '\n', the change is correct.
Quoted 7 lines
If you do want the empty line, it should looke like
printk(KERN_EMERG "\nDouble Fault\n");
but I suspect that you had the '\n' there because you had a previous printk which hadn't ended the line (in which case just removing it and relying on the
KERN_EMERGcausing a line break is the right thing to do).
yes, the newlines here were explicit, not follow up to previous ones missing lines. i ignored the ones Joe (correctly) dropped due to appending rather than explicit spacing.
-mike
Re: [PATCH] Remove multiple KERN_ prefixes from printk formats
In reply to Linus TorvaldsQuoted 6 lines · Linus Torvalds
Quoted 4 lines · Mike Frysinger
Quoted 3 lines
#ifdef
CONFIG_DEBUG_VERBOSEarch/blackfin/kernel/traps.c +1
-1-printk (KERN_EMERG "\n" KERN_EMERG "Double Fault\n" ); +printk (KERN_EMERG "Double Fault\n" );
Quoted 8 lines
Quoted 3 lines
dropped a newline. we've largely made sure the newlines and such were as we want in the output ... in this case, it is not a matter of adding a newline where one did not exist before
Note that the 'printk' itself will add a required newline these days.
So unless you want an _empty_ line due to an earlier '\n', the change is correct.
Note the prefix before and after the "\n"
I believe he _wants_ an empty line.
Re: [PATCH] Remove multiple KERN_ prefixes from printk formats
In reply to Linus TorvaldsQuoted 3 lines · Joe Perches
Hi Linus, let me know if you want this submitted as a patchset to each maintainer or if you simply want this rolled-up patch.
Quoted 2 lines · Linus Torvalds
So unless you want an _empty_ line due to an earlier '\n', the change is correct.
Linus, do you want this patch at all?
These changes do fix newly introduced log errors caused by commit 5fd29d6ccbc98884569d6f3105aeca70858b3e0f
PATCH 1/1 arch/blackfin/kernel/traps.c: Add visually separating newlines to printks
In reply to Mike FrysingerQuoted 8 lines · Mike Frysinger
Quoted 7 lines · Linus Torvalds
Quoted 6 lines · Mike Frysinger
Review
Quoted 3 lines
#ifdef
CONFIG_DEBUG_VERBOSE(quoted diff) +1
-1- printk(KERN_EMERG "\n" KERN_EMERG "Double Fault\n"); + printk(KERN_EMERG "Double Fault\n");dropped a newline. we've largely made sure the newlines and such were as we want in the output ... in this case, it is not a matter of adding a newline where one did not exist before
Quoted 6 lines
Quoted 3 lines
Note that the 'printk' itself will add a required newline these days. If you do want the empty line, it should look like
printk(KERN_EMERG "\nDouble Fault\n");yes, the newlines here were explicit, not follow up to previous ones missing lines. i ignored the ones Joe (correctly) dropped due to appending rather than explicit spacing.
Commit ad361c9884e809340f6daca80d56a9e9c871690a dropped some arguably useful newlines from printks unnecessarily.
arch/blackfin/kernel/traps.c +4 -4
@@ -212,7 +212,7 @@ asmlinkage void double_fault_c(struct pt_regs *fp)console_verbose (); oops_in_progress =1 ; #ifdef CONFIG_DEBUG_VERBOSE - printk(KERN_EMERG "Double Fault\n"); + printk(KERN_EMERG "\nDouble Fault\n"); #ifdef CONFIG_DEBUG_DOUBLEFAULT_PRINT if (((long)fp->seqstat & SEQSTAT_EXCAUSE) == VEC_UNCOV) { unsigned int cpu = smp_processor_id();
@@ -590,7 +590,7 @@ asmlinkage void trap_c(struct pt_regs *fp)if (oops_in_progress) {/* Dump the current kernel stack */ -verbose_printk (KERN_NOTICE "Kernel Stack\n" ); +verbose_printk (KERN_NOTICE "\nKernel Stack\n" );show_stack (current,NULL );print_modules ();#ifndef CONFIG_ACCESS_CHECK
@@ -1009,7 +1009,7 @@ void dump_bfin_process(struct pt_regs *fp) verbose_printk(KERN_NOTICE "invalid mm\n"); }else verbose_printk (KERN_NOTICE -"No Valid process in current context\n" ); +"\nNo Valid process in current context\n" );#endif }
@@ -1184,7 +1184,7 @@ unlock:verbose_printk (KERN_NOTICE "ICPLB_FAULT_ADDR: %s\n" , buf); } -verbose_printk (KERN_NOTICE "PROCESSOR STATE:\n" ); +verbose_printk (KERN_NOTICE "\nPROCESSOR STATE:\n" );verbose_printk (KERN_NOTICE " R0 : %08lx R1 : %08lx R2 : %08lx R3 : %08lx\n" , fp->r0, fp->r1, fp->r2, fp->r3); verbose_printk(KERN_NOTICE " R4 : %08lx R5 : %08lx R6 : %08lx R7 : %08lx\n",