diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-29 11:29:28 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-29 11:29:28 -0700 |
commit | 57ed609d4b64139b4d2cf5f3b4880a573a7905d2 (patch) | |
tree | d824e1ebd33b28c4ccc53e9074064db479b17dc7 /arch/tile/kernel/proc.c | |
parent | a74d70b63f1a0230831bcca3145d85ae016f9d4c (diff) | |
parent | f133ecca9cbb31b5e6e9bda27cbe3034fbf656df (diff) | |
download | op-kernel-dev-57ed609d4b64139b4d2cf5f3b4880a573a7905d2.zip op-kernel-dev-57ed609d4b64139b4d2cf5f3b4880a573a7905d2.tar.gz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile
* git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
arch/tile: more /proc and /sys file support
Diffstat (limited to 'arch/tile/kernel/proc.c')
-rw-r--r-- | arch/tile/kernel/proc.c | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/arch/tile/kernel/proc.c b/arch/tile/kernel/proc.c index 2e02c41..62d8208 100644 --- a/arch/tile/kernel/proc.c +++ b/arch/tile/kernel/proc.c @@ -27,6 +27,7 @@ #include <asm/processor.h> #include <asm/sections.h> #include <asm/homecache.h> +#include <asm/hardwall.h> #include <arch/chip.h> @@ -88,3 +89,75 @@ const struct seq_operations cpuinfo_op = { .stop = c_stop, .show = show_cpuinfo, }; + +/* + * Support /proc/tile directory + */ + +static int __init proc_tile_init(void) +{ + struct proc_dir_entry *root = proc_mkdir("tile", NULL); + if (root == NULL) + return 0; + + proc_tile_hardwall_init(root); + + return 0; +} + +arch_initcall(proc_tile_init); + +/* + * Support /proc/sys/tile directory + */ + +#ifndef __tilegx__ /* FIXME: GX: no support for unaligned access yet */ +static ctl_table unaligned_subtable[] = { + { + .procname = "enabled", + .data = &unaligned_fixup, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec + }, + { + .procname = "printk", + .data = &unaligned_printk, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec + }, + { + .procname = "count", + .data = &unaligned_fixup_count, + .maxlen = sizeof(int), + .mode = 0644, + .proc_handler = &proc_dointvec + }, + {} +}; + +static ctl_table unaligned_table[] = { + { + .procname = "unaligned_fixup", + .mode = 0555, + .child = unaligned_subtable + }, + {} +}; +#endif + +static struct ctl_path tile_path[] = { + { .procname = "tile" }, + { } +}; + +static int __init proc_sys_tile_init(void) +{ +#ifndef __tilegx__ /* FIXME: GX: no support for unaligned access yet */ + register_sysctl_paths(tile_path, unaligned_table); +#endif + return 0; +} + +arch_initcall(proc_sys_tile_init); |