summaryrefslogtreecommitdiff
path: root/arch/s390/include/asm/mem_detect.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/include/asm/mem_detect.h')
-rw-r--r--arch/s390/include/asm/mem_detect.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/s390/include/asm/mem_detect.h b/arch/s390/include/asm/mem_detect.h
index 058ac2647eb7..08798ddf5143 100644
--- a/arch/s390/include/asm/mem_detect.h
+++ b/arch/s390/include/asm/mem_detect.h
@@ -66,6 +66,17 @@ static inline int __get_mem_detect_block(u32 n, unsigned long *start,
i < mem_detect.count; \
i++, __get_mem_detect_block(i, p_start, p_end))
+static inline unsigned long get_mem_detect_online_total(void)
+{
+ unsigned long start, end, total = 0;
+ int i;
+
+ for_each_mem_detect_block(i, &start, &end)
+ total += end - start;
+
+ return total;
+}
+
static inline void get_mem_detect_reserved(unsigned long *start,
unsigned long *size)
{