Commit b9e393c2babb8b6956de52fc580b7c23f3629232
1 parent
b420b1a7a1
Exists in
master
and in
4 other branches
sh: Create an sh debugfs root.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Showing 4 changed files with 19 additions and 3 deletions Side-by-side Diff
arch/sh/kernel/setup.c
... | ... | @@ -23,6 +23,8 @@ |
23 | 23 | #include <linux/kexec.h> |
24 | 24 | #include <linux/module.h> |
25 | 25 | #include <linux/smp.h> |
26 | +#include <linux/err.h> | |
27 | +#include <linux/debugfs.h> | |
26 | 28 | #include <asm/uaccess.h> |
27 | 29 | #include <asm/io.h> |
28 | 30 | #include <asm/page.h> |
... | ... | @@ -443,4 +445,16 @@ |
443 | 445 | .show = show_cpuinfo, |
444 | 446 | }; |
445 | 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); |
arch/sh/mm/cache-debugfs.c
... | ... | @@ -127,13 +127,13 @@ |
127 | 127 | { |
128 | 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 | 131 | (unsigned int *)CACHE_TYPE_DCACHE, |
132 | 132 | &cache_debugfs_fops); |
133 | 133 | if (IS_ERR(dcache_dentry)) |
134 | 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 | 137 | (unsigned int *)CACHE_TYPE_ICACHE, |
138 | 138 | &cache_debugfs_fops); |
139 | 139 | if (IS_ERR(icache_dentry)) { |
arch/sh/mm/pmb.c