Commit ba8ff1c6 authored by Corey Minyard's avatar Corey Minyard Committed by Linus Torvalds

IPMI: Convert system interface defines to an enum

Convert the #defines for statistics into an enum in the IPMI system interface
and remove the unused timeout_restart statistic.  And comment what these
statistics mean.
Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 64959e2d
...@@ -124,22 +124,50 @@ static struct device_driver ipmi_driver = ...@@ -124,22 +124,50 @@ static struct device_driver ipmi_driver =
/* /*
* Indexes into stats[] in smi_info below. * Indexes into stats[] in smi_info below.
*/ */
enum si_stat_indexes {
/*
* Number of times the driver requested a timer while an operation
* was in progress.
*/
SI_STAT_short_timeouts = 0,
/*
* Number of times the driver requested a timer while nothing was in
* progress.
*/
SI_STAT_long_timeouts,
/* Number of times the interface was idle while being polled. */
SI_STAT_idles,
/* Number of interrupts the driver handled. */
SI_STAT_interrupts,
/* Number of time the driver got an ATTN from the hardware. */
SI_STAT_attentions,
#define SI_STAT_short_timeouts 0 /* Number of times the driver requested flags from the hardware. */
#define SI_STAT_long_timeouts 1 SI_STAT_flag_fetches,
#define SI_STAT_timeout_restarts 2
#define SI_STAT_idles 3 /* Number of times the hardware didn't follow the state machine. */
#define SI_STAT_interrupts 4 SI_STAT_hosed_count,
#define SI_STAT_attentions 5
#define SI_STAT_flag_fetches 6 /* Number of completed messages. */
#define SI_STAT_hosed_count 7 SI_STAT_complete_transactions,
#define SI_STAT_complete_transactions 8
#define SI_STAT_events 9 /* Number of IPMI events received from the hardware. */
#define SI_STAT_watchdog_pretimeouts 10 SI_STAT_events,
#define SI_STAT_incoming_messages 11
/* Number of watchdog pretimeouts. */
/* If you add a stat, you must update this value. */ SI_STAT_watchdog_pretimeouts,
#define SI_NUM_STATS 12
/* Number of asyncronous messages received. */
SI_STAT_incoming_messages,
/* This *must* remain last, add new values above this. */
SI_NUM_STATS
};
struct smi_info struct smi_info
{ {
...@@ -2399,8 +2427,6 @@ static int stat_file_read_proc(char *page, char **start, off_t off, ...@@ -2399,8 +2427,6 @@ static int stat_file_read_proc(char *page, char **start, off_t off,
smi_get_stat(smi, short_timeouts)); smi_get_stat(smi, short_timeouts));
out += sprintf(out, "long_timeouts: %u\n", out += sprintf(out, "long_timeouts: %u\n",
smi_get_stat(smi, long_timeouts)); smi_get_stat(smi, long_timeouts));
out += sprintf(out, "timeout_restarts: %u\n",
smi_get_stat(smi, timeout_restarts));
out += sprintf(out, "idles: %u\n", out += sprintf(out, "idles: %u\n",
smi_get_stat(smi, idles)); smi_get_stat(smi, idles));
out += sprintf(out, "interrupts: %u\n", out += sprintf(out, "interrupts: %u\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment