Re: [PATCH 20/21] Introduce struct eeh_stats for EEH

2012-02-29 Thread Michael Ellerman
On Tue, 2012-02-28 at 14:04 +0800, Gavin Shan wrote: With the original EEH implementation, the EEH global statistics are maintained by individual global variables. That makes the code a little hard to maintain. Hi Gavin, @@ -1174,21 +1182,24 @@ static int proc_eeh_show(struct seq_file *m,

Re: [PATCH 20/21] Introduce struct eeh_stats for EEH

2012-02-29 Thread Gavin Shan
With the original EEH implementation, the EEH global statistics are maintained by individual global variables. That makes the code a little hard to maintain. Hi Gavin, @@ -1174,21 +1182,24 @@ static int proc_eeh_show(struct seq_file *m, void *v) { if (0 ==

Re: [PATCH 20/21] Introduce struct eeh_stats for EEH - Reworked

2012-02-29 Thread Gavin Shan
With the original EEH implementation, the EEH global statistics are maintained by individual global variables. That makes the code a little hard to maintain. The patch introduces extra struct eeh_stats for the EEH global statistics so that it can be maintained in collective fashion. It's the

RE: [PATCH 20/21] Introduce struct eeh_stats for EEH

2012-02-28 Thread David Laight
+struct eeh_stats { + unsigned int no_device; /* PCI device not found */ ... + no device =%d\n ... Use %u (for all the stats), you really don't want negative values printed. I've NFI how long wrapping these counters might take! If it is

Re: [PATCH 20/21] Introduce struct eeh_stats for EEH

2012-02-28 Thread Gavin Shan
+struct eeh_stats { + unsigned int no_device; /* PCI device not found */ ... + no device =%d\n ... Use %u (for all the stats), you really don't want negative values printed. Yes. I've NFI how long wrapping these counters might take!

Re: [PATCH 20/21] Introduce struct eeh_stats for EEH

2012-02-28 Thread Gavin Shan
With the original EEH implementation, the EEH global statistics are maintained by individual global variables. That makes the code a little hard to maintain. The patch introduces extra struct eeh_stats for the EEH global statistics so that it can be maintained in collective fashion. It's the

Re: [PATCH 20/21] Introduce struct eeh_stats for EEH

2012-02-27 Thread Gavin Shan
Hi Gavin, On Fri, 24 Feb 2012 17:38:17 +0800 Gavin Shan sha...@linux.vnet.ibm.com wrote: diff --git a/arch/powerpc/include/asm/eeh.h b/arch/powerpc/include/asm/eeh.h index 1310971..226c9a5 100644 --- a/arch/powerpc/include/asm/eeh.h +++ b/arch/powerpc/include/asm/eeh.h @@ -98,6

Re: [PATCH 20/21] Introduce struct eeh_stats for EEH

2012-02-27 Thread Gavin Shan
+/* + * The struct is used to maintain the EEH global statistic + * information. Besides, the EEH global statistics will be + * exported to user space through procfs + */ +struct eeh_stats { + unsigned long no_device;/* PCI device not found */ + unsigned long no_dn;

Re: [PATCH 20/21] Introduce struct eeh_stats for EEH

2012-02-24 Thread Stephen Rothwell
Hi Gavin, On Fri, 24 Feb 2012 17:38:17 +0800 Gavin Shan sha...@linux.vnet.ibm.com wrote: diff --git a/arch/powerpc/include/asm/eeh.h b/arch/powerpc/include/asm/eeh.h index 1310971..226c9a5 100644 --- a/arch/powerpc/include/asm/eeh.h +++ b/arch/powerpc/include/asm/eeh.h @@ -98,6 +98,21 @@

RE: [PATCH 20/21] Introduce struct eeh_stats for EEH

2012-02-24 Thread David Laight
+/* + * The struct is used to maintain the EEH global statistic + * information. Besides, the EEH global statistics will be + * exported to user space through procfs + */ +struct eeh_stats { + unsigned long no_device;/* PCI device not found */ + unsigned long no_dn;