From: Yinghai Lu <yinghai@kernel.org>
To: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [PATCH] x86: fix printk calling in print_local_apic
Date: Wed, 01 Jul 2009 22:21:00 -0700 [thread overview]
Message-ID: <4A4C43BC.90506@kernel.org> (raw)
In-Reply-To: <alpine.LFD.2.01.0907012126371.3380@localhost.localdomain>
From: Linus Torvalds <torvalds@linux-foundation.org>
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
Reported-and-Tested-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
arch/x86/kernel/apic/io_apic.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
Index: linux-2.6/arch/x86/kernel/apic/io_apic.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/apic/io_apic.c
+++ linux-2.6/arch/x86/kernel/apic/io_apic.c
@@ -1718,16 +1718,19 @@ __apicdebuginit(void) print_APIC_bitfiel
unsigned 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(v
unsigned 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());
next prev parent reply other threads:[~2009-07-02 5:21 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-02 4:14 printk regression? Yinghai Lu
2009-07-02 4:23 ` Linus Torvalds
2009-07-02 4:28 ` Linus Torvalds
2009-07-02 5:21 ` Yinghai Lu [this message]
2009-07-02 6:12 ` [PATCH] x86: fix printk calling in print_local_apic Ingo Molnar
2009-07-02 6:28 ` [PATCH, v2] x86: Fix printk call in print_local_apic() Ingo Molnar
2009-07-02 6:39 ` Yinghai Lu
2009-07-02 6:50 ` [PATCH, v3] " Ingo Molnar
2009-07-02 6:48 ` [PATCH, v2] " Andrew Morton
2009-07-02 6:59 ` [PATCH, v4] " Ingo Molnar
2009-07-02 7:09 ` Ingo Molnar
2009-07-02 7:07 ` [tip:x86/urgent] " tip-bot for Ingo Molnar
2009-07-02 5:42 ` printk regression? Joe Perches
2009-07-02 12:29 ` Michael S. Zick
2009-07-02 15:29 ` Joe Perches
2009-07-02 17:42 ` Linus Torvalds
2009-07-02 17:27 ` Linus Torvalds
2009-07-02 17:38 ` Joe Perches
2009-07-02 17:43 ` Linus Torvalds
2009-07-06 20:05 ` [PATCH] Remove multiple KERN_ prefixes from printk formats Joe Perches
2009-07-06 20:23 ` Mike Frysinger
2009-07-06 20:29 ` Joe Perches
2009-07-06 20:33 ` Linus Torvalds
2009-07-06 20:36 ` Mike Frysinger
2009-07-08 21:55 ` [PATCH] arch/blackfin/kernel/traps.c: Add visually separating newlines to printks Joe Perches
2009-07-06 20:38 ` [PATCH] Remove multiple KERN_ prefixes from printk formats Joe Perches
2009-07-08 17:11 ` Joe Perches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A4C43BC.90506@kernel.org \
--to=yinghai@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox