aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/sh/kernel/setup.c14
-rw-r--r--arch/sh/mm/cache-debugfs.c4
-rw-r--r--arch/sh/mm/pmb.c2
-rw-r--r--include/asm-sh/system.h2
4 files changed, 19 insertions, 3 deletions
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
index ff4f54a47c07..23bc707c2b03 100644
--- a/arch/sh/kernel/setup.c
+++ b/arch/sh/kernel/setup.c
@@ -23,6 +23,8 @@
23#include <linux/kexec.h> 23#include <linux/kexec.h>
24#include <linux/module.h> 24#include <linux/module.h>
25#include <linux/smp.h> 25#include <linux/smp.h>
26#include <linux/err.h>
27#include <linux/debugfs.h>
26#include <asm/uaccess.h> 28#include <asm/uaccess.h>
27#include <asm/io.h> 29#include <asm/io.h>
28#include <asm/page.h> 30#include <asm/page.h>
@@ -443,3 +445,15 @@ const struct seq_operations cpuinfo_op = {
443 .show = show_cpuinfo, 445 .show = show_cpuinfo,
444}; 446};
445#endif /* CONFIG_PROC_FS */ 447#endif /* CONFIG_PROC_FS */
448
449struct dentry *sh_debugfs_root;
450
451static int __init sh_debugfs_init(void)
452{
453 sh_debugfs_root = debugfs_create_dir("sh", NULL);
454 if (IS_ERR(sh_debugfs_root))
455 return PTR_ERR(sh_debugfs_root);
456
457 return 0;
458}
459arch_initcall(sh_debugfs_init);
diff --git a/arch/sh/mm/cache-debugfs.c b/arch/sh/mm/cache-debugfs.c
index db6d950b6f5e..c5b56d52b7d2 100644
--- a/arch/sh/mm/cache-debugfs.c
+++ b/arch/sh/mm/cache-debugfs.c
@@ -127,13 +127,13 @@ static int __init cache_debugfs_init(void)
127{ 127{
128 struct dentry *dcache_dentry, *icache_dentry; 128 struct dentry *dcache_dentry, *icache_dentry;
129 129
130 dcache_dentry = debugfs_create_file("dcache", S_IRUSR, NULL, 130 dcache_dentry = debugfs_create_file("dcache", S_IRUSR, sh_debugfs_root,
131 (unsigned int *)CACHE_TYPE_DCACHE, 131 (unsigned int *)CACHE_TYPE_DCACHE,
132 &cache_debugfs_fops); 132 &cache_debugfs_fops);
133 if (IS_ERR(dcache_dentry)) 133 if (IS_ERR(dcache_dentry))
134 return PTR_ERR(dcache_dentry); 134 return PTR_ERR(dcache_dentry);
135 135
136 icache_dentry = debugfs_create_file("icache", S_IRUSR, NULL, 136 icache_dentry = debugfs_create_file("icache", S_IRUSR, sh_debugfs_root,
137 (unsigned int *)CACHE_TYPE_ICACHE, 137 (unsigned int *)CACHE_TYPE_ICACHE,
138 &cache_debugfs_fops); 138 &cache_debugfs_fops);
139 if (IS_ERR(icache_dentry)) { 139 if (IS_ERR(icache_dentry)) {
diff --git a/arch/sh/mm/pmb.c b/arch/sh/mm/pmb.c
index ab81c602295f..0b0ec6e04753 100644
--- a/arch/sh/mm/pmb.c
+++ b/arch/sh/mm/pmb.c
@@ -393,7 +393,7 @@ static int __init pmb_debugfs_init(void)
393 struct dentry *dentry; 393 struct dentry *dentry;
394 394
395 dentry = debugfs_create_file("pmb", S_IFREG | S_IRUGO, 395 dentry = debugfs_create_file("pmb", S_IFREG | S_IRUGO,
396 NULL, NULL, &pmb_debugfs_fops); 396 sh_debugfs_root, NULL, &pmb_debugfs_fops);
397 if (IS_ERR(dentry)) 397 if (IS_ERR(dentry))
398 return PTR_ERR(dentry); 398 return PTR_ERR(dentry);
399 399
diff --git a/include/asm-sh/system.h b/include/asm-sh/system.h
index 5145aa2a0ce9..e65b6b822cb3 100644
--- a/include/asm-sh/system.h
+++ b/include/asm-sh/system.h
@@ -146,6 +146,8 @@ extern unsigned int instruction_size(unsigned int insn);
146 146
147extern unsigned long cached_to_uncached; 147extern unsigned long cached_to_uncached;
148 148
149extern struct dentry *sh_debugfs_root;
150
149/* XXX 151/* XXX
150 * disable hlt during certain critical i/o operations 152 * disable hlt during certain critical i/o operations
151 */ 153 */