diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2017-03-13 17:58:59 +0300 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2017-03-22 10:29:15 +0300 |
commit | ae5ca67acaf070ced4e3ba324160ad6a99637e71 (patch) | |
tree | b85f8ea4bd0a43f6cd93744e0546f93f51016747 /arch/s390/include/asm/sysinfo.h | |
parent | 050f99b1b85876a8456b76ebfee7d43746d37f6c (diff) | |
download | linux-ae5ca67acaf070ced4e3ba324160ad6a99637e71.tar.xz |
s390/sysinfo,topology: provide raw stsi 15,1,x data via debugfs
Provide the raw stsi 15,1,x data contents via debugfs. This makes it
much easier to debug unexpected scheduling domains on machines that
provide cpu topology information.
Therefore this file adds a new 's390/stsi' debugfs directory with a
file for each possible topology nesting level that is allowed by the
architecture. The files will be created regardless if the machine
supports all, or any, level. If a level is not supported, or no data
is available, user space can recognize this with a -EINVAL error code
when trying to read such data.
In addition a 'topology' symlink is created that points to the file
that contains the data that is used to create the scheduling domains.
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/include/asm/sysinfo.h')
-rw-r--r-- | arch/s390/include/asm/sysinfo.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/s390/include/asm/sysinfo.h b/arch/s390/include/asm/sysinfo.h index 27394989073a..73bff45ced55 100644 --- a/arch/s390/include/asm/sysinfo.h +++ b/arch/s390/include/asm/sysinfo.h @@ -142,6 +142,15 @@ struct sysinfo_3_2_2 { extern int topology_max_mnest; +/* + * Returns the maximum nesting level supported by the cpu topology code. + * The current maximum level is 4 which is the drawer level. + */ +static inline int topology_mnest_limit(void) +{ + return min(topology_max_mnest, 4); +} + #define TOPOLOGY_NR_MAG 6 struct topology_core { |