From a4351cb5511b917556c796d97068318a53a00849 Mon Sep 17 00:00:00 2001 From: Helge Deller Date: Thu, 31 Mar 2016 13:11:05 +0200 Subject: [PATCH] selftests/thuge-gen: Use platform specific MAP_HUGETLB value Do not hardcode MAP_HUGETLB to 0x40000, since quite some architectures use a different value. Tested with a parisc architecture 64bit kernel. Signed-off-by: Helge Deller --- tools/testing/selftests/vm/thuge-gen.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/testing/selftests/vm/thuge-gen.c b/tools/testing/selftests/vm/thuge-gen.c index c87957295f74..0bc737a75150 100644 --- a/tools/testing/selftests/vm/thuge-gen.c +++ b/tools/testing/selftests/vm/thuge-gen.c @@ -30,7 +30,9 @@ #define MAP_HUGE_1GB (30 << MAP_HUGE_SHIFT) #define MAP_HUGE_SHIFT 26 #define MAP_HUGE_MASK 0x3f +#if !defined(MAP_HUGETLB) #define MAP_HUGETLB 0x40000 +#endif #define SHM_HUGETLB 04000 /* segment will use huge TLB pages */ #define SHM_HUGE_SHIFT 26 -- 2.20.1