From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Youquan Song <youquan.song@intel.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"mingo@elte.hu" <mingo@elte.hu>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"hpa@zytor.com" <hpa@zytor.com>,
"hpa@linux.intel.com" <hpa@linux.intel.com>,
"suresh.b.siddha@intel.com" <suresh.b.siddha@intel.com>,
"yong.y.wang@linux.intel.com" <yong.y.wang@linux.intel.com>,
"joe@perches.com" <joe@perches.com>,
"jbaron@redhat.com" <jbaron@redhat.com>,
"trenn@suse.de" <trenn@suse.de>,
"kent.liu@intel.com" <kent.liu@intel.com>,
"chaohong.guo@intel.com" <chaohong.guo@intel.com>,
Youquan Song <youquan.song@linux.intel.com>
Subject: Re: [PATCH v4 2/2] apic: Add print error interrupt reason
Date: Thu, 14 Apr 2011 11:57:39 +0400 [thread overview]
Message-ID: <BANLkTikSEJrWH09B7aiYUSaKhONyL25z4Q@mail.gmail.com> (raw)
In-Reply-To: <BANLkTi=Sk02k6f3gzTn+DJWX3HZKniWS6A@mail.gmail.com>
heh, drop my prev mail. Patch is good! thanks ans sorry for noise.
On Thursday, April 14, 2011, Cyrill Gorcunov <gorcunov@gmail.com> wrote:
> On Thu, Apr 14, 2011 at 10:36 AM, Youquan Song <youquan.song@intel.com> wrote:
>> End user worry about the error interrupt information and intend to know what
>> kind of error interrupts are generated, so this patch add printing out the
>> detail debug information of error interrupt.
>> dynamic debug is not initiated when LAPIC initiation, so the pr_debug will not
>> output the error interrupt debug information when boot.
>> In this patch, we use apic_printk(APIC_DEBUG,), so if add kernel option
>> apic=debug will output the error interrupt during boot.
>>
>> Signed-off-by: Youquan Song <youquan.song@intel.com>
>> Signed-off-by: Joe Perches <joe@perches.com>
>> ---
>> arch/x86/kernel/apic/apic.c | 38 +++++++++++++++++++++++++-------------
>> 1 files changed, 25 insertions(+), 13 deletions(-)
>>
>> diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
>> index fabf01e..3ddf4ef 100644
>> --- a/arch/x86/kernel/apic/apic.c
>> +++ b/arch/x86/kernel/apic/apic.c
>> @@ -1813,6 +1813,17 @@ void smp_spurious_interrupt(struct pt_regs *regs)
>> void smp_error_interrupt(struct pt_regs *regs)
>> {
>> u32 v, v1;
>> + u32 i = 0;
>> + static const char * const error_interrupt_reason[] = {
>> + "Send CS error", /* APIC Error Bit 0 */
>> + "Receive CS error", /* APIC Error Bit 1 */
>> + "Send accept error", /* APIC Error Bit 2 */
>> + "Receive accept error", /* APIC Error Bit 3 */
>> + "Redirectable IPI", /* APIC Error Bit 4 */
>> + "Send illegal vector", /* APIC Error Bit 5 */
>> + "Received illegal vector", /* APIC Error Bit 6 */
>> + "Illegal register address", /* APIC Error Bit 7 */
>> + };
>>
> ...
>> - pr_debug("APIC error on CPU%d: %02x(%02x)\n",
>> - smp_processor_id(), v , v1);
>> + apic_printk(APIC_DEBUG, KERN_DEBUG "APIC error on CPU%d: %02x(%02x)",
>> + smp_processor_id(), v , v1);
>> +
>> + v1 = v1 & 0xff;
>> + while (v1) {
>> + if (v1 & 0x1)
>> + apic_printk(APIC_DEBUG, KERN_CONT " : %s",
>> + error_interrupt_reason[i]);
>> + i++;
>> + v1 >>= 1;
>> + };
>> +
>
> Hi looks good but please add some array-checking in case if we get
> some damaged result
> from hardware, ie check for i not being out of error_interrupt_reason. Thanks!
>
next prev parent reply other threads:[~2011-04-14 7:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-14 6:36 [PATCH v4 1/2] apic: Fix error interrupt report at all APs Youquan Song
2011-04-14 6:36 ` [PATCH v4 2/2] apic: Add print error interrupt reason Youquan Song
2011-04-14 7:54 ` Cyrill Gorcunov
2011-04-14 7:57 ` Cyrill Gorcunov [this message]
2011-04-19 17:48 ` [tip:x86/apic] x86, apic: Print verbose error interrupt reason on apic=debug tip-bot for Youquan Song
2011-04-19 17:01 ` [PATCH v4 1/2] apic: Fix error interrupt report at all APs Ingo Molnar
2011-04-22 3:12 ` Youquan Song
2011-04-21 15:27 ` Ingo Molnar
2011-04-22 4:34 ` Youquan Song
-- strict thread matches above, loose matches on Subject: below --
2011-04-06 12:20 Youquan Song
2011-04-06 12:20 ` [PATCH v4 2/2] apic: Add print error interrupt reason Youquan Song
2011-01-08 16:01 Youquan Song
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=BANLkTikSEJrWH09B7aiYUSaKhONyL25z4Q@mail.gmail.com \
--to=gorcunov@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=chaohong.guo@intel.com \
--cc=hpa@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jbaron@redhat.com \
--cc=joe@perches.com \
--cc=kent.liu@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=suresh.b.siddha@intel.com \
--cc=tglx@linutronix.de \
--cc=trenn@suse.de \
--cc=yong.y.wang@linux.intel.com \
--cc=youquan.song@intel.com \
--cc=youquan.song@linux.intel.com \
/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;
as well as URLs for NNTP newsgroup(s).