diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2007-06-20 10:54:19 +1000 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-07-10 21:53:50 +1000 |
commit | 94a3807c2a547283bb2fb1728609ad51c09d5f79 (patch) | |
tree | d85fa4f63da7ccacaeaa1688718439c6741f1d56 /arch/powerpc/kernel/setup-common.c | |
parent | db0dbae9d9680bce69fe1ce775709e60c8ee9c29 (diff) |
[POWERPC] Make the debugfs "powerpc" dir globally accessible
The prom.c debugging code creates a "powerpc" directory in debugfs,
which is nice, but doesn't allow any other debugging code to stick things
under "powerpc" in debugfs. So make it global.
While we're there we should make the prom.c debugging code depend on
CONFIG_DEBUG_FS, because it doesn't work otherwise.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/setup-common.c')
-rw-r--r-- | arch/powerpc/kernel/setup-common.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index 38c4b733a72e..4924c48cb1ff 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c @@ -32,6 +32,7 @@ #include <linux/unistd.h> #include <linux/serial.h> #include <linux/serial_8250.h> +#include <linux/debugfs.h> #include <asm/io.h> #include <asm/prom.h> #include <asm/processor.h> @@ -579,3 +580,15 @@ static int __init check_cache_coherency(void) late_initcall(check_cache_coherency); #endif /* CONFIG_CHECK_CACHE_COHERENCY */ + +#ifdef CONFIG_DEBUG_FS +struct dentry *powerpc_debugfs_root; + +static int powerpc_debugfs_init(void) +{ + powerpc_debugfs_root = debugfs_create_dir("powerpc", NULL); + + return powerpc_debugfs_root == NULL; +} +arch_initcall(powerpc_debugfs_init); +#endif |