aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/prom.c
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2007-06-19 20:54:19 -0400
committerPaul Mackerras <paulus@samba.org>2007-07-10 07:53:50 -0400
commit94a3807c2a547283bb2fb1728609ad51c09d5f79 (patch)
treed85fa4f63da7ccacaeaa1688718439c6741f1d56 /arch/powerpc/kernel/prom.c
parentdb0dbae9d9680bce69fe1ce775709e60c8ee9c29 (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/prom.c')
-rw-r--r--arch/powerpc/kernel/prom.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 6d5e601097a0..0782afc29f5f 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -52,6 +52,7 @@
52#include <asm/pSeries_reconfig.h> 52#include <asm/pSeries_reconfig.h>
53#include <asm/pci-bridge.h> 53#include <asm/pci-bridge.h>
54#include <asm/kexec.h> 54#include <asm/kexec.h>
55#include <asm/system.h>
55 56
56#ifdef DEBUG 57#ifdef DEBUG
57#define DBG(fmt...) printk(KERN_ERR fmt) 58#define DBG(fmt...) printk(KERN_ERR fmt)
@@ -1730,22 +1731,18 @@ struct device_node *of_get_cpu_node(int cpu, unsigned int *thread)
1730} 1731}
1731EXPORT_SYMBOL(of_get_cpu_node); 1732EXPORT_SYMBOL(of_get_cpu_node);
1732 1733
1733#ifdef DEBUG 1734#if defined(CONFIG_DEBUG_FS) && defined(DEBUG)
1734static struct debugfs_blob_wrapper flat_dt_blob; 1735static struct debugfs_blob_wrapper flat_dt_blob;
1735 1736
1736static int __init export_flat_device_tree(void) 1737static int __init export_flat_device_tree(void)
1737{ 1738{
1738 struct dentry *d; 1739 struct dentry *d;
1739 1740
1740 d = debugfs_create_dir("powerpc", NULL);
1741 if (!d)
1742 return 1;
1743
1744 flat_dt_blob.data = initial_boot_params; 1741 flat_dt_blob.data = initial_boot_params;
1745 flat_dt_blob.size = initial_boot_params->totalsize; 1742 flat_dt_blob.size = initial_boot_params->totalsize;
1746 1743
1747 d = debugfs_create_blob("flat-device-tree", S_IFREG | S_IRUSR, 1744 d = debugfs_create_blob("flat-device-tree", S_IFREG | S_IRUSR,
1748 d, &flat_dt_blob); 1745 powerpc_debugfs_root, &flat_dt_blob);
1749 if (!d) 1746 if (!d)
1750 return 1; 1747 return 1;
1751 1748