diff options
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/kernel/setup.c | 14 | ||||
-rw-r--r-- | arch/sh/mm/cache-debugfs.c | 4 | ||||
-rw-r--r-- | arch/sh/mm/pmb.c | 2 |
3 files changed, 17 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 | |||
449 | struct dentry *sh_debugfs_root; | ||
450 | |||
451 | static 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 | } | ||
459 | arch_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 | ||