summaryrefslogtreecommitdiff
path: root/arch/s390/include/asm/sysinfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/include/asm/sysinfo.h')
-rw-r--r--arch/s390/include/asm/sysinfo.h9
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 {