lkml.org 
[lkml]   [2014]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v3 2/3] proc: Provide access to /proc/interrupts from kdb
Date
The contents of /proc/interrupts is useful to diagnose problems during
boot up or when the system becomes unresponsive (or at least it can be if
failure is causes by interrupt problems). This command is also seen in
out-of-tree debug systems such as Android's FIQ debugger.

This change allows the file to be displayed from kdb.

Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
---
fs/proc/interrupts.c | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/fs/proc/interrupts.c b/fs/proc/interrupts.c
index a352d57..d8b64f0 100644
--- a/fs/proc/interrupts.c
+++ b/fs/proc/interrupts.c
@@ -4,6 +4,7 @@
#include <linux/irqnr.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
+#include <linux/kdb.h>

/*
* /proc/interrupts
@@ -45,9 +46,16 @@ static const struct file_operations proc_interrupts_operations = {
.release = seq_release,
};

+static int kdb_interrupts(int argc, const char **argv)
+{
+ return kdb_print_seq_file(&int_seq_ops);
+}
+
static int __init proc_interrupts_init(void)
{
proc_create("interrupts", 0, NULL, &proc_interrupts_operations);
+ kdb_register("interrupts", kdb_interrupts, "",
+ "Show /proc/interrupts", 3);
return 0;
}
fs_initcall(proc_interrupts_init);
--
1.9.3


\
 
 \ /
  Last update: 2014-08-19 17:21    [W:0.262 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site