1
0
Fork 0

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>
hifive-unleashed-5.1
Helge Deller 2016-03-31 13:11:05 +02:00
parent 54b6680090
commit a4351cb551
1 changed files with 2 additions and 0 deletions

View File

@ -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