diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kernel/prom.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 483455c5bb02..efed4bc2b454 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/bitops.h> | 30 | #include <linux/bitops.h> |
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/kexec.h> | 32 | #include <linux/kexec.h> |
33 | #include <linux/debugfs.h> | ||
33 | 34 | ||
34 | #include <asm/prom.h> | 35 | #include <asm/prom.h> |
35 | #include <asm/rtas.h> | 36 | #include <asm/rtas.h> |
@@ -2148,3 +2149,27 @@ struct device_node *of_get_cpu_node(int cpu, unsigned int *thread) | |||
2148 | } | 2149 | } |
2149 | return NULL; | 2150 | return NULL; |
2150 | } | 2151 | } |
2152 | |||
2153 | #ifdef DEBUG | ||
2154 | static struct debugfs_blob_wrapper flat_dt_blob; | ||
2155 | |||
2156 | static int __init export_flat_device_tree(void) | ||
2157 | { | ||
2158 | struct dentry *d; | ||
2159 | |||
2160 | d = debugfs_create_dir("powerpc", NULL); | ||
2161 | if (!d) | ||
2162 | return 1; | ||
2163 | |||
2164 | flat_dt_blob.data = initial_boot_params; | ||
2165 | flat_dt_blob.size = initial_boot_params->totalsize; | ||
2166 | |||
2167 | d = debugfs_create_blob("flat-device-tree", S_IFREG | S_IRUSR, | ||
2168 | d, &flat_dt_blob); | ||
2169 | if (!d) | ||
2170 | return 1; | ||
2171 | |||
2172 | return 0; | ||
2173 | } | ||
2174 | __initcall(export_flat_device_tree); | ||
2175 | #endif | ||