x86: io-apic - do not use KERN_DEBUG marker too much
PATCH 1/1 x86: io-apic - do not use KERN_DEBUG marker too much
Do not use KERN_DEBUG several times on the same line being printed. Introduced by mine previous patch, sorry.
---
arch/x86/kernel/io_apic.c +11 -6
@@ -1526,11 +1526,16 @@ static void __init setup_IO_APIC_irqs(vo idx =find_irq_entry (apic, pin, mp_INT);if (idx ==-1 ) { -apic_printk (APIC_VERBOSE , -KERN_DEBUG " %d-%d" , - mp_ioapics[apic].mp_apicid, pin); -if (!notcon) +if (!notcon) { notcon =1 ; +apic_printk (APIC_VERBOSE , +KERN_DEBUG " %d-%d" , + mp_ioapics[apic].mp_apicid, + pin); + }else +apic_printk (APIC_VERBOSE ," %d-%d" , + mp_ioapics[apic].mp_apicid, + pin);continue ; }
@@ -1546,14 +1551,14 @@ static void __init setup_IO_APIC_irqs(vo }if (notcon) {apic_printk (APIC_VERBOSE , -KERN_DEBUG " (apicid-pin) not connected\n" ); +" (apicid-pin) not connected\n" ); notcon =0 ; } }if (notcon)apic_printk (APIC_VERBOSE , -KERN_DEBUG " (apicid-pin) not connected\n" ); +" (apicid-pin) not connected\n" ); }/*
Quoted 40 lines · Cyrill Gorcunov
Do not use
KERN_DEBUGseveral times on the same line being printed. Introduced by mine previous patch, sorry.Reported-by Yinghai Lu <[email protected]>Signed-off-by Cyrill Gorcunov <[email protected]>---
Index:
linux-2.6.git/arch/x86/kernel/io_apic.c
===================================================================arch/x86/kernel/io_apic.c 2008-09-08 19:34:10.000000000 +0400 renamed from arch/x86/kernel/io_apic.c 2008-09-08 19:32:34.000000000 +0400 +10
-5@@ -1526,11 +1526,16 @@ static void __init setup_IO_APIC_irqs(vo idx = find_irq_entry(apic, pin, mp_INT); if (idx == -1) { - apic_printk(APIC_VERBOSE, - KERN_DEBUG " %d-%d", - mp_ioapics[apic].mp_apicid, pin); - if (!notcon) + if (!notcon) { notcon = 1; + apic_printk(APIC_VERBOSE, + KERN_DEBUG " %d-%d", + mp_ioapics[apic].mp_apicid, + pin); + } else + apic_printk(APIC_VERBOSE, " %d-%d", + mp_ioapics[apic].mp_apicid, + pin); continue; }@@ -1546,14 +1551,14 @@ static void __init setup_IO_APIC_irqs(vo } if (notcon) { apic_printk(APIC_VERBOSE, - KERN_DEBUG " (apicid-pin) not connected\n"); + " (apicid-pin) not connected\n"); notcon = 0;
arch/x86/kernel/io_apic.c 2008-09-08 19:34:10.000000000 +0400 static void __init setup_IO_APIC_irqs(vo · line 1564
Quoted 10 lines
arch/x86/kernel/io_apic.c 2008-09-08 19:34:10.000000000 +0400 renamed from arch/x86/kernel/io_apic.c 2008-09-08 19:32:34.000000000 +0400 +1
-1} } if (notcon) apic_printk(APIC_VERBOSE, - KERN_DEBUG " (apicid-pin) not connected\n"); + " (apicid-pin) not connected\n"); } /*
still some wrong
init IO_APIC IRQs
8-0<7> 0 add_pin_to_irq: irq 1 --> apic 0 pin 1
IOAPIC[0]: Set routing entry (8-1 -> 0x31 -> IRQ 1 Mode:0 Active:0)
0 add_pin_to_irq: irq 0 --> apic 0 pin 2
IOAPIC[0]: Set routing entry (8-2 -> 0x30 -> IRQ 0 Mode:0 Active:0)
0 add_pin_to_irq: irq 3 --> apic 0 pin 3
IOAPIC[0]: Set routing entry (8-3 -> 0x33 -> IRQ 3 Mode:0 Active:0)
0 add_pin_to_irq: irq 4 --> apic 0 pin 4
IOAPIC[0]: Set routing entry (8-4 -> 0x34 -> IRQ 4 Mode:0 Active:0)
0 add_pin_to_irq: irq 5 --> apic 0 pin 5
IOAPIC[0]: Set routing entry (8-5 -> 0x35 -> IRQ 5 Mode:0 Active:0)
0 add_pin_to_irq: irq 6 --> apic 0 pin 6
IOAPIC[0]: Set routing entry (8-6 -> 0x36 -> IRQ 6 Mode:0 Active:0)
0 add_pin_to_irq: irq 7 --> apic 0 pin 7
IOAPIC[0]: Set routing entry (8-7 -> 0x37 -> IRQ 7 Mode:0 Active:0)
0 add_pin_to_irq: irq 8 --> apic 0 pin 8
IOAPIC[0]: Set routing entry (8-8 -> 0x38 -> IRQ 8 Mode:0 Active:0)
0 add_pin_to_irq: irq 9 --> apic 0 pin 9
IOAPIC[0]: Set routing entry (8-9 -> 0x39 -> IRQ 9 Mode:1 Active:0)
0 add_pin_to_irq: irq 10 --> apic 0 pin 10
IOAPIC[0]: Set routing entry (8-10 -> 0x3a -> IRQ 10 Mode:0 Active:0)
0 add_pin_to_irq: irq 11 --> apic 0 pin 11
IOAPIC[0]: Set routing entry (8-11 -> 0x3b -> IRQ 11 Mode:0 Active:0)
0 add_pin_to_irq: irq 12 --> apic 0 pin 12
IOAPIC[0]: Set routing entry (8-12 -> 0x3c -> IRQ 12 Mode:0 Active:0)
0 add_pin_to_irq: irq 13 --> apic 0 pin 13
IOAPIC[0]: Set routing entry (8-13 -> 0x3d -> IRQ 13 Mode:0 Active:0)
0 add_pin_to_irq: irq 14 --> apic 0 pin 14
IOAPIC[0]: Set routing entry (8-14 -> 0x3e -> IRQ 14 Mode:0 Active:0)
0 add_pin_to_irq: irq 15 --> apic 0 pin 15
IOAPIC[0]: Set routing entry (8-15 -> 0x3f -> IRQ 15 Mode:0 Active:0)
8-16 8-17 8-18 8-19 8-20 8-21 8-22 8-23 (apicid-pin) not connected 9-0 9-1 9-2 9-3 9-4 9-5 9-6 9-7 9-8 9-9 9-10 9-11 9-12 9-13 9-14 9-15
9-16 9-17 9-18 9-19 9-20 9-21 9-22 9-23 (apicid-pin) not connected
YH
Quoted 80 lines · Yinghai Lu
Quoted 40 lines · Cyrill Gorcunov
Do not use
KERN_DEBUGseveral times on the same line being printed. Introduced by mine previous patch, sorry.Reported-by Yinghai Lu <[email protected]>Signed-off-by Cyrill Gorcunov <[email protected]>---
Index:
linux-2.6.git/arch/x86/kernel/io_apic.c
===================================================================arch/x86/kernel/io_apic.c 2008-09-08 19:34:10.000000000 +0400 renamed from arch/x86/kernel/io_apic.c 2008-09-08 19:32:34.000000000 +0400 +10
-5@@ -1526,11 +1526,16 @@ static void __init setup_IO_APIC_irqs(vo idx = find_irq_entry(apic, pin, mp_INT); if (idx == -1) { - apic_printk(APIC_VERBOSE, - KERN_DEBUG " %d-%d", - mp_ioapics[apic].mp_apicid, pin); - if (!notcon) + if (!notcon) { notcon = 1; + apic_printk(APIC_VERBOSE, + KERN_DEBUG " %d-%d", + mp_ioapics[apic].mp_apicid, + pin); + } else + apic_printk(APIC_VERBOSE, " %d-%d", + mp_ioapics[apic].mp_apicid, + pin); continue; }@@ -1546,14 +1551,14 @@ static void __init setup_IO_APIC_irqs(vo } if (notcon) { apic_printk(APIC_VERBOSE, - KERN_DEBUG " (apicid-pin) not connected\n"); + " (apicid-pin) not connected\n"); notcon = 0;arch/x86/kernel/io_apic.c 2008-09-08 19:34:10.000000000 +0400 static void __init setup_IO_APIC_irqs(vo · line 1564
Quoted 10 lines
arch/x86/kernel/io_apic.c 2008-09-08 19:34:10.000000000 +0400 renamed from arch/x86/kernel/io_apic.c 2008-09-08 19:32:34.000000000 +0400 +1
-1} } if (notcon) apic_printk(APIC_VERBOSE, - KERN_DEBUG " (apicid-pin) not connected\n"); + " (apicid-pin) not connected\n"); } /*still some wrong
init
IO_APICIRQs
8-0<7> 0add_pin_to_irq: irq 1 --> apic 0 pin 1
IOAPIC[0]: Set routing entry (8-1 ->0x31-> IRQ 1 Mode:0 Active:0)
0add_pin_to_irq: irq 0 --> apic 0 pin 2
IOAPIC[0]: Set routing entry (8-2 ->0x30-> IRQ 0 Mode:0 Active:0)
0add_pin_to_irq: irq 3 --> apic 0 pin 3
IOAPIC[0]: Set routing entry (8-3 ->0x33-> IRQ 3 Mode:0 Active:0)
0add_pin_to_irq: irq 4 --> apic 0 pin 4
IOAPIC[0]: Set routing entry (8-4 ->0x34-> IRQ 4 Mode:0 Active:0)
0add_pin_to_irq: irq 5 --> apic 0 pin 5
IOAPIC[0]: Set routing entry (8-5 ->0x35-> IRQ 5 Mode:0 Active:0)
0add_pin_to_irq: irq 6 --> apic 0 pin 6
IOAPIC[0]: Set routing entry (8-6 ->0x36-> IRQ 6 Mode:0 Active:0)
0add_pin_to_irq: irq 7 --> apic 0 pin 7
IOAPIC[0]: Set routing entry (8-7 ->0x37-> IRQ 7 Mode:0 Active:0)
0add_pin_to_irq: irq 8 --> apic 0 pin 8
IOAPIC[0]: Set routing entry (8-8 ->0x38-> IRQ 8 Mode:0 Active:0)
0add_pin_to_irq: irq 9 --> apic 0 pin 9
IOAPIC[0]: Set routing entry (8-9 ->0x39-> IRQ 9 Mode:1 Active:0)
0add_pin_to_irq: irq 10 --> apic 0 pin 10
IOAPIC[0]: Set routing entry (8-10 ->0x3a-> IRQ 10 Mode:0 Active:0)
0add_pin_to_irq: irq 11 --> apic 0 pin 11
IOAPIC[0]: Set routing entry (8-11 ->0x3b-> IRQ 11 Mode:0 Active:0)
0add_pin_to_irq: irq 12 --> apic 0 pin 12
IOAPIC[0]: Set routing entry (8-12 ->0x3c-> IRQ 12 Mode:0 Active:0)
0add_pin_to_irq: irq 13 --> apic 0 pin 13
Quoted 9 lines
IOAPIC[0]: Set routing entry (8-13 ->
0x3d-> IRQ 13 Mode:0 Active:0)
0add_pin_to_irq: irq 14 --> apic 0 pin 14
IOAPIC[0]: Set routing entry (8-14 ->0x3e-> IRQ 14 Mode:0 Active:0)
0add_pin_to_irq: irq 15 --> apic 0 pin 15
IOAPIC[0]: Set routing entry (8-15 ->0x3f-> IRQ 15 Mode:0 Active:0)
8-16 8-17 8-18 8-19 8-20 8-21 8-22 8-23 (apicid-pin) not connected 9-0 9-1 9-2 9-3 9-4 9-5 9-6 9-7 9-8 9-9 9-10 9-11 9-12 9-13 9-14 9-15
9-16 9-17 9-18 9-19 9-20 9-21 9-22 9-23 (apicid-pin) not connected
only first one not connected at first, and ...
why not just revert those two patches?
YH
[Yinghai Lu - Fri, Sep 12, 2008 at 12:57:21PM -0700]
...
| > IOAPIC[0]: Set routing entry (8-14 -> 0x3e -> IRQ 14 Mode:0 Active:0) | > 0 add_pin_to_irq: irq 15 --> apic 0 pin 15 | > IOAPIC[0]: Set routing entry (8-15 -> 0x3f -> IRQ 15 Mode:0 Active:0) | > 8-16 8-17 8-18 8-19 8-20 8-21 8-22 8-23 (apicid-pin) not connected | > 9-0 9-1 9-2 9-3 9-4 9-5 9-6 9-7 9-8 9-9 9-10 9-11 9-12 9-13 9-14 9-15 | > 9-16 9-17 9-18 9-19 9-20 9-21 9-22 9-23 (apicid-pin) not connected | > | | only first one not connected at first, and ... | | why not just revert those two patches? | | YH |
ok, convinced - Ingo, could you drop them please?
(yes, I've missed one new-line printing, sorry -
but quite frankly - it reveals another problem - printing between other printing - which means ideally it would be to _have_ temporary buffer apart from printk buffer. So we have - either adding additional new line printout 'cause of printing inbetween or our own buffer to be able to print in nice-fasion. Anyway I'm fine to just revert these attempts made. And thanks Yinghai for comments and testing!)
- Cyrill -
Quoted 4 lines · Cyrill Gorcunov
but quite frankly - it reveals another problem - printing between other printing - which means ideally it would be to _have_ temporary buffer apart from printk buffer. So we have - either adding additional
Exactly what I wrote!
Maciej
[Yinghai Lu - Fri, Sep 12, 2008 at 12:57:21PM -0700]
...
| > 0 add_pin_to_irq: irq 15 --> apic 0 pin 15 | > IOAPIC[0]: Set routing entry (8-15 -> 0x3f -> IRQ 15 Mode:0 Active:0) | > 8-16 8-17 8-18 8-19 8-20 8-21 8-22 8-23 (apicid-pin) not connected | > 9-0 9-1 9-2 9-3 9-4 9-5 9-6 9-7 9-8 9-9 9-10 9-11 9-12 9-13 9-14 9-15 | > 9-16 9-17 9-18 9-19 9-20 9-21 9-22 9-23 (apicid-pin) not connected | > | | only first one not connected at first, and ... | | why not just revert those two patches? | | YH |
Ingo, Yinghai,
here is a quick fix for this.
Ingo - choose either use this patch or just _revert_ both previous - i do accept any decision.
- Cyrill -
---
From: Cyrill Gorcunov <[email protected]>
Subject: [PATCH] x86: io-apic - fix misplaced EOL in setup_IO_APIC_irqs
This issue is brought by mine commitf5143bce9d424bd400da48b1c7a2bc6a24403ada.
---
arch/x86/kernel/io_apic.c +5 -5
@@ -1541,6 +1541,11 @@ static void __init setup_IO_APIC_irqs(vo pin);continue ; } +if (notcon) { +apic_printk (APIC_VERBOSE , +" (apicid-pin) not connected\n" ); + notcon =0 ; + } irq =pin_2_irq (idx, apic, pin);#ifdef CONFIG_X86_32
@@ -1552,11 +1557,6 @@ static void __init setup_IO_APIC_irqs(vosetup_IO_APIC_irq (apic, pin, irq,irq_trigger (idx),irq_polarity (idx)); } -if (notcon) { -apic_printk (APIC_VERBOSE , -" (apicid-pin) not connected\n" ); - notcon =0 ; - } }if (notcon)