diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2017-03-13 16:15:06 +0100 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2017-03-22 08:29:17 +0100 |
commit | cdd3bd9d618d7a4a3920a193e20ca40736b878e9 (patch) | |
tree | ed14b009396a34692b9cd487d16798b6e68cc882 /arch/s390 | |
parent | ae5ca67acaf070ced4e3ba324160ad6a99637e71 (diff) |
s390/sysinfo: provide remaining stsi information via debugfs
Provide the remaining stsi information via debugfs files. This also
might be useful for debugging purposes.
Suggested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/kernel/sysinfo.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/arch/s390/kernel/sysinfo.c b/arch/s390/kernel/sysinfo.c index 1d4680e38378..eefcb54872a5 100644 --- a/arch/s390/kernel/sysinfo.c +++ b/arch/s390/kernel/sysinfo.c @@ -522,6 +522,12 @@ static ssize_t stsi_read(struct file *file, char __user *buf, size_t size, loff_ return simple_read_from_buffer(buf, size, ppos, file->private_data, PAGE_SIZE); } +STSI_FILE( 1, 1, 1); +STSI_FILE( 1, 2, 1); +STSI_FILE( 1, 2, 2); +STSI_FILE( 2, 2, 1); +STSI_FILE( 2, 2, 2); +STSI_FILE( 3, 2, 2); STSI_FILE(15, 1, 2); STSI_FILE(15, 1, 3); STSI_FILE(15, 1, 4); @@ -534,6 +540,12 @@ struct stsi_file { }; static struct stsi_file stsi_file[] __initdata = { + {.fops = &stsi_1_1_1_fs_ops, .name = "1_1_1"}, + {.fops = &stsi_1_2_1_fs_ops, .name = "1_2_1"}, + {.fops = &stsi_1_2_2_fs_ops, .name = "1_2_2"}, + {.fops = &stsi_2_2_1_fs_ops, .name = "2_2_1"}, + {.fops = &stsi_2_2_2_fs_ops, .name = "2_2_2"}, + {.fops = &stsi_3_2_2_fs_ops, .name = "3_2_2"}, {.fops = &stsi_15_1_2_fs_ops, .name = "15_1_2"}, {.fops = &stsi_15_1_3_fs_ops, .name = "15_1_3"}, {.fops = &stsi_15_1_4_fs_ops, .name = "15_1_4"}, @@ -541,15 +553,21 @@ static struct stsi_file stsi_file[] __initdata = { {.fops = &stsi_15_1_6_fs_ops, .name = "15_1_6"}, }; +static u8 stsi_0_0_0; + static __init int stsi_init_debugfs(void) { struct dentry *stsi_root; struct stsi_file *sf; - int i; + int lvl, i; stsi_root = debugfs_create_dir("stsi", arch_debugfs_dir); if (IS_ERR_OR_NULL(stsi_root)) return 0; + lvl = stsi(NULL, 0, 0, 0); + if (lvl > 0) + stsi_0_0_0 = lvl; + debugfs_create_u8("0_0_0", 0400, stsi_root, &stsi_0_0_0); for (i = 0; i < ARRAY_SIZE(stsi_file); i++) { sf = &stsi_file[i]; debugfs_create_file(sf->name, 0400, stsi_root, NULL, sf->fops); |