lkml.org 
[lkml]   [2009]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] [6/28] x86: MCE: Add machine check exception count in /proc/interrupts
Andi Kleen wrote:
> @@ -96,6 +97,12 @@
> seq_printf(p, " Threshold APIC interrupts\n");
> # endif
> #endif
> +#if defined(CONFIG_X86_MCE) && defined(CONFIG_X86_64)
> + seq_printf(p, "%*s: ", prec, "MCE");
> + for_each_online_cpu(j)
> + seq_printf(p, "%10u ", per_cpu(mce_exception_count, j));
> + seq_printf(p, " Machine check exceptions\n");
> +#endif
> seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read(&irq_err_count));
> #if defined(CONFIG_X86_IO_APIC)
> seq_printf(p, "%*s: %10u\n", prec, "MIS", atomic_read(&irq_mis_count));

How about unifying ifdefs?
The patched code will be:

#ifdef CONFIG_X86_MCE
seq_printf(p, "%*s: ", prec, "TRM");
for_each_online_cpu(j)
seq_printf(p, "%10u ", irq_stats(j)->irq_thermal_count);
seq_printf(p, " Thermal event interrupts\n");
# ifdef CONFIG_X86_64
seq_printf(p, "%*s: ", prec, "THR");
for_each_online_cpu(j)
seq_printf(p, "%10u ", irq_stats(j)->irq_threshold_count);
seq_printf(p, " Threshold APIC interrupts\n");
# endif
#endif
#if defined(CONFIG_X86_MCE) && defined(CONFIG_X86_64)
seq_printf(p, "%*s: ", prec, "MCE");
for_each_online_cpu(j)
seq_printf(p, "%10u ", per_cpu(mce_exception_count, j));
seq_printf(p, " Machine check exceptions\n");
#endif

> @@ -163,6 +170,9 @@
> {
> u64 sum = irq_stats(cpu)->__nmi_count;
>
> +#if defined(CONFIG_X86_MCE) && defined(CONFIG_X86_64)
> + sum += per_cpu(mce_exception_count, cpu);
> +#endif
> #ifdef CONFIG_X86_LOCAL_APIC
> sum += irq_stats(cpu)->apic_timer_irqs;
> sum += irq_stats(cpu)->irq_spurious_count;

Ditto.


Thanks,
H.Seto


\
 
 \ /
  Last update: 2009-04-08 07:03    [W:1.620 / U:0.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site