lkml.org 
[lkml]   [2011]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/2] apic: Add print error interrupt reason
From
Date
On Thu, 2011-01-06 at 11:28 +0800, Youquan Song 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.
>
> Signed-off-by: Youquan Song <youquan.song@intel.com>
> ---
> arch/x86/kernel/apic/apic.c | 28 +++++++++++++++++++++++++++-
> 1 files changed, 27 insertions(+), 1 deletions(-)
>
> diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
[]
> +static const char *error_interrupt_reason[] = {

static const char * const etc[]

> + "Send CS error",
> + "Receive CS error",
> + "Send accept error",
> + "Receive accept error",
> + "Redirectable IPI",
> + "Send illegal vector",
> + "Received illegal vector",
> + "Illegal register address",
> +};
> +
> +static void print_error_interrupt_reason(u32 reason)
> +{
> + u32 i = 0;
> + reason = reason & 0xff;
> + do {
> + if (reason & 0x1)
> + pr_debug(" : %s", error_interrupt_reason[i]);

This isn't correct as it will emit <7> for each reason.

You want pr_cont surrounded by #ifdef DEBUG
or some new #define pr_debug_cont in printk.h
but that won't play well with dynamic_debug.

Jason? Got a cure for this?




\
 
 \ /
  Last update: 2011-01-06 05:37    [W:0.868 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site