Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 336521
b: refs/heads/master
c: 3792987
h: refs/heads/master
i:
  336519: 6f45f26
v: v3
  • Loading branch information
Borislav Petkov authored and Borislav Petkov committed Nov 28, 2012
1 parent b0a43ac commit 66bc5c4
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 876bb331e26b970c2d8caea2c1d1209fdae953d0
refs/heads/master: 37929874d439d79e8f6128f400f63069ee1bbf3e
8 changes: 4 additions & 4 deletions trunk/drivers/edac/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ config EDAC_LEGACY_SYSFS
config EDAC_DEBUG
bool "Debugging"
help
This turns on debugging information for the entire EDAC
sub-system. You can insert module with "debug_level=x", current
there're four debug levels (x=0,1,2,3 from low to high).
Usually you should select 'N'.
This turns on debugging information for the entire EDAC subsystem.
You do so by inserting edac_module with "edac_debug_level=x." Valid
levels are 0-4 (from low to high) and by default it is set to 2.
Usually you should select 'N' here.

config EDAC_DECODE_MCE
tristate "Decode MCEs in human-readable form (only on AMD for now)"
Expand Down
27 changes: 20 additions & 7 deletions trunk/drivers/edac/edac_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,29 @@
#define EDAC_VERSION "Ver: 3.0.0"

#ifdef CONFIG_EDAC_DEBUG

static int edac_set_debug_level(const char *buf, struct kernel_param *kp)
{
unsigned long val;
int ret;

ret = kstrtoul(buf, 0, &val);
if (ret)
return ret;

if (val < 0 || val > 4)
return -EINVAL;

return param_set_int(buf, kp);
}

/* Values of 0 to 4 will generate output */
int edac_debug_level = 2;
EXPORT_SYMBOL_GPL(edac_debug_level);

module_param_call(edac_debug_level, edac_set_debug_level, param_get_int,
&edac_debug_level, 0644);
MODULE_PARM_DESC(edac_debug_level, "EDAC debug level: [0-4], default: 2");
#endif

/* scope is to module level only */
Expand Down Expand Up @@ -132,10 +152,3 @@ module_exit(edac_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Doug Thompson www.softwarebitmaker.com, et al");
MODULE_DESCRIPTION("Core library routines for EDAC reporting");

/* refer to *_sysfs.c files for parameters that are exported via sysfs */

#ifdef CONFIG_EDAC_DEBUG
module_param(edac_debug_level, int, 0644);
MODULE_PARM_DESC(edac_debug_level, "Debug level");
#endif

0 comments on commit 66bc5c4

Please sign in to comment.