summaryrefslogtreecommitdiff
path: root/drivers/ras/ras.c
diff options
context:
space:
mode:
authorChen, Gong <gong.chen@linux.intel.com>2014-06-11 14:02:20 -0700
committerTony Luck <tony.luck@intel.com>2014-06-25 11:22:03 -0700
commitd963cd95bea93b7db9390a71d1e2cabbb3b2c3ea (patch)
treeb6d25da65a161f6c38207a2f15515c3b795d3396 /drivers/ras/ras.c
parent3760cd20402d4c131e1994c968ecb055fa0f74bc (diff)
RAS, debugfs: Add debugfs interface for RAS subsystem
Implement a new debugfs interface for RAS susbsystem. A file named daemon_active is added there accordingly. This file is used to track if user space daemon accesses perf/trace interface or not. One can track which daemon opens it via "lsof /path/to/debugfs/ras/daemon_active". Signed-off-by: Chen, Gong <gong.chen@linux.intel.com> Link: http://lkml.kernel.org/r/1402475691-30045-5-git-send-email-gong.chen@linux.intel.com Signed-off-by: Borislav Petkov <bp@suse.de> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'drivers/ras/ras.c')
-rw-r--r--drivers/ras/ras.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/ras/ras.c b/drivers/ras/ras.c
index b0c6ed1d8e77..4cac43a1e25c 100644
--- a/drivers/ras/ras.c
+++ b/drivers/ras/ras.c
@@ -5,8 +5,22 @@
* Chen, Gong <gong.chen@linux.intel.com>
*/
+#include <linux/init.h>
+#include <linux/ras.h>
+
#define CREATE_TRACE_POINTS
#define TRACE_INCLUDE_PATH ../../include/ras
#include <ras/ras_event.h>
+static int __init ras_init(void)
+{
+ int rc = 0;
+
+ ras_debugfs_init();
+ rc = ras_add_daemon_trace();
+
+ return rc;
+}
+subsys_initcall(ras_init);
+
EXPORT_TRACEPOINT_SYMBOL_GPL(mc_event);