edac: Add debufs nodes to allow doing fake error inject
Sometimes, it is useful to have a mechanism that generates fake errors, in order to test the EDAC core code, and the userspace tools. Provide such mechanism by adding a few debugfs nodes. Reviewed-by: Aristeu Rozanski <arozansk@redhat.com> Cc: Doug Thompson <norsk5@yahoo.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
8ad6c78a69
commit
452a6bf955
2 changed files with 94 additions and 0 deletions
|
@ -17,6 +17,7 @@
|
|||
#include <linux/kobject.h>
|
||||
#include <linux/completion.h>
|
||||
#include <linux/workqueue.h>
|
||||
#include <linux/debugfs.h>
|
||||
|
||||
struct device;
|
||||
|
||||
|
@ -634,6 +635,12 @@ struct mem_ctl_info {
|
|||
|
||||
/* the internal state of this controller instance */
|
||||
int op_state;
|
||||
|
||||
#ifdef CONFIG_EDAC_DEBUG
|
||||
struct dentry *debugfs;
|
||||
u8 fake_inject_layer[EDAC_MAX_LAYERS];
|
||||
u32 fake_inject_ue;
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue