diff options
author | Helge Deller <deller@gmx.de> | 2016-03-31 13:11:05 +0200 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2016-05-22 21:43:41 +0200 |
commit | a4351cb5511b917556c796d97068318a53a00849 (patch) | |
tree | 4f797b85c26c5faa5b13da85e4a381310c12d5d5 /tools | |
parent | 54b668009076caddbede8fde513ca2c982590bfe (diff) | |
download | linux-stable-a4351cb5511b917556c796d97068318a53a00849.tar.gz linux-stable-a4351cb5511b917556c796d97068318a53a00849.tar.bz2 linux-stable-a4351cb5511b917556c796d97068318a53a00849.zip |
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 <deller@gmx.de>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/vm/thuge-gen.c | 2 |
1 files changed, 2 insertions, 0 deletions
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 |