[RFC patch 1/2] x86: Add a arch directory for x86 under debugfs

From: venkatesh . pallipadi
Date: Fri Jul 18 2008 - 19:13:26 EST


Add a directory for x86 arch under debugfs. Can be used to accumulate all
x86 specific debugfs files.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@xxxxxxxxx>

---
arch/x86/kernel/kdebugfs.c | 8 ++++++++
include/linux/debugfs.h | 2 ++
2 files changed, 10 insertions(+)

Index: linux-2.6/arch/x86/kernel/kdebugfs.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/kdebugfs.c 2008-05-02 09:45:23.000000000 -0700
+++ linux-2.6/arch/x86/kernel/kdebugfs.c 2008-07-18 15:20:39.000000000 -0700
@@ -12,9 +12,13 @@
#include <linux/init.h>
#include <linux/io.h>
#include <linux/mm.h>
+#include <linux/module.h>

#include <asm/setup.h>

+struct dentry *arch_debugfs_dir;
+EXPORT_SYMBOL(arch_debugfs_dir);
+
#ifdef CONFIG_DEBUG_BOOT_PARAMS
struct setup_data_node {
u64 paddr;
@@ -209,6 +213,10 @@ static int __init arch_kdebugfs_init(voi
{
int error = 0;

+ arch_debugfs_dir = debugfs_create_dir("x86", NULL);
+ if (!arch_debugfs_dir)
+ return -ENOMEM;
+
#ifdef CONFIG_DEBUG_BOOT_PARAMS
error = boot_params_kdebugfs_init();
#endif
Index: linux-2.6/include/linux/debugfs.h
===================================================================
--- linux-2.6.orig/include/linux/debugfs.h 2008-05-01 15:31:18.000000000 -0700
+++ linux-2.6/include/linux/debugfs.h 2008-07-18 15:20:01.000000000 -0700
@@ -26,6 +26,8 @@ struct debugfs_blob_wrapper {
unsigned long size;
};

+extern struct dentry *arch_debugfs_dir;
+
#if defined(CONFIG_DEBUG_FS)

/* declared over in file.c */

--

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/