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

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