aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/edac_mc_sysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/edac/edac_mc_sysfs.c')
-rw-r--r--drivers/edac/edac_mc_sysfs.c76
1 files changed, 44 insertions, 32 deletions
diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c
index 6b2217b741fb..7f8240f40db0 100644
--- a/drivers/edac/edac_mc_sysfs.c
+++ b/drivers/edac/edac_mc_sysfs.c
@@ -16,47 +16,44 @@
16#include "edac_module.h" 16#include "edac_module.h"
17 17
18/* MC EDAC Controls, setable by module parameter, and sysfs */ 18/* MC EDAC Controls, setable by module parameter, and sysfs */
19static int log_ue = 1; 19static int edac_mc_log_ue = 1;
20static int log_ce = 1; 20static int edac_mc_log_ce = 1;
21static int panic_on_ue; 21static int edac_mc_panic_on_ue = 0;
22static int poll_msec = 1000; 22static int edac_mc_poll_msec = 1000;
23 23
24/* Getter functions for above */ 24/* Getter functions for above */
25int edac_get_log_ue(void) 25int edac_mc_get_log_ue(void)
26{ 26{
27 return log_ue; 27 return edac_mc_log_ue;
28} 28}
29 29
30int edac_get_log_ce(void) 30int edac_mc_get_log_ce(void)
31{ 31{
32 return log_ce; 32 return edac_mc_log_ce;
33} 33}
34 34
35int edac_get_panic_on_ue(void) 35int edac_mc_get_panic_on_ue(void)
36{ 36{
37 return panic_on_ue; 37 return edac_mc_panic_on_ue;
38} 38}
39 39
40/* this is temporary */ 40/* this is temporary */
41int edac_mc_get_poll_msec(void) 41int edac_mc_get_poll_msec(void)
42{ 42{
43 return edac_get_poll_msec(); 43 return edac_mc_poll_msec;
44}
45
46int edac_get_poll_msec(void)
47{
48 return poll_msec;
49} 44}
50 45
51/* Parameter declarations for above */ 46/* Parameter declarations for above */
52module_param(panic_on_ue, int, 0644); 47module_param(edac_mc_panic_on_ue, int, 0644);
53MODULE_PARM_DESC(panic_on_ue, "Panic on uncorrected error: 0=off 1=on"); 48MODULE_PARM_DESC(edac_mc_panic_on_ue, "Panic on uncorrected error: 0=off 1=on");
54module_param(log_ue, int, 0644); 49module_param(edac_mc_log_ue, int, 0644);
55MODULE_PARM_DESC(log_ue, "Log uncorrectable error to console: 0=off 1=on"); 50MODULE_PARM_DESC(edac_mc_log_ue,
56module_param(log_ce, int, 0644); 51 "Log uncorrectable error to console: 0=off 1=on");
57MODULE_PARM_DESC(log_ce, "Log correctable error to console: 0=off 1=on"); 52module_param(edac_mc_log_ce, int, 0644);
58module_param(poll_msec, int, 0644); 53MODULE_PARM_DESC(edac_mc_log_ce,
59MODULE_PARM_DESC(poll_msec, "Polling period in milliseconds"); 54 "Log correctable error to console: 0=off 1=on");
55module_param(edac_mc_poll_msec, int, 0644);
56MODULE_PARM_DESC(edac_mc_poll_msec, "Polling period in milliseconds");
60 57
61 58
62/* 59/*
@@ -187,17 +184,32 @@ static struct memctrl_dev_attribute attr_##_name = { \
187}; 184};
188 185
189/* csrow<id> control files */ 186/* csrow<id> control files */
190MEMCTRL_ATTR(panic_on_ue,S_IRUGO|S_IWUSR,memctrl_int_show,memctrl_int_store); 187MEMCTRL_ATTR(edac_mc_panic_on_ue,
191MEMCTRL_ATTR(log_ue,S_IRUGO|S_IWUSR,memctrl_int_show,memctrl_int_store); 188 S_IRUGO | S_IWUSR,
192MEMCTRL_ATTR(log_ce,S_IRUGO|S_IWUSR,memctrl_int_show,memctrl_int_store); 189 memctrl_int_show,
193MEMCTRL_ATTR(poll_msec,S_IRUGO|S_IWUSR,memctrl_int_show,memctrl_int_store); 190 memctrl_int_store);
191
192MEMCTRL_ATTR(edac_mc_log_ue,
193 S_IRUGO|S_IWUSR,
194 memctrl_int_show,
195 memctrl_int_store);
196
197MEMCTRL_ATTR(edac_mc_log_ce,
198 S_IRUGO|S_IWUSR,
199 memctrl_int_show,
200 memctrl_int_store);
201
202MEMCTRL_ATTR(edac_mc_poll_msec,
203 S_IRUGO|S_IWUSR,
204 memctrl_int_show,
205 memctrl_int_store);
194 206
195/* Base Attributes of the memory ECC object */ 207/* Base Attributes of the memory ECC object */
196static struct memctrl_dev_attribute *memctrl_attr[] = { 208static struct memctrl_dev_attribute *memctrl_attr[] = {
197 &attr_panic_on_ue, 209 &attr_edac_mc_panic_on_ue,
198 &attr_log_ue, 210 &attr_edac_mc_log_ue,
199 &attr_log_ce, 211 &attr_edac_mc_log_ce,
200 &attr_poll_msec, 212 &attr_edac_mc_poll_msec,
201 NULL, 213 NULL,
202}; 214};
203 215