Blame SOURCES/libhugetlbfs-2.20-defined-task-size-value-to-be-512T-if-it-is-more-than-64Tb.patch

f1281f
commit 02df38e93e25e07f4d54edae94fb4ec90b7a2824
f1281f
Author: Santhosh G <santhog4@linux.vnet.ibm.com>
f1281f
Date:   Thu Jul 27 13:10:37 2017 +0530
f1281f
f1281f
    Defined task size value to be 512T if it is more that 64Tb.
f1281f
    
f1281f
    The Test case needs to loop till 512Tb to get the TASK_SIZE value.
f1281f
    This patch defines the value to be 512T if the test tries to loop
f1281f
    above 64T.
f1281f
    
f1281f
    Signed-off-by: Santhosh G <santhog4@linux.vnet.ibm.com>
f1281f
    Signed-off-by: Eric B Munson <emunson@mgebm.net>
f1281f
f1281f
diff --git a/tests/task-size-overrun.c b/tests/task-size-overrun.c
f1281f
index 0ab76c7..dc9ce0e 100644
f1281f
--- a/tests/task-size-overrun.c
f1281f
+++ b/tests/task-size-overrun.c
f1281f
@@ -82,6 +82,10 @@ static unsigned long find_task_size(void)
f1281f
 		}
f1281f
 		munmap(p, getpagesize());
f1281f
 		addr += getpagesize();
f1281f
+#if defined(__powerpc64__)
f1281f
+		if (addr > (1UL << 46) && addr < (1UL << 49))
f1281f
+			addr = 1UL << 49;
f1281f
+#endif
f1281f
 #if defined(__s390x__)
f1281f
 		if (addr > (1UL << 42) && addr < (1UL << 53))
f1281f
 			addr = 1UL << 53;