Skip to content

Commit 05f3f75

Browse files
edliawakpm00
authored andcommitted
selftests/mm: include linux/mman.h
thuge-gen defines MAP_HUGE_* macros that are provided by linux/mman.h since 4.15. Removes the macros and includes linux/mman.h instead. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Edward Liaw <[email protected]> Reviewed-by: Carlos Llamas <[email protected]> Reviewed-by: Muhammad Usama Anjum <[email protected]> Cc: Bill Wendling <[email protected]> Cc: Justin Stitt <[email protected]> Cc: Nathan Chancellor <[email protected]> Cc: Nick Desaulniers <[email protected]> Cc: Shuah Khan <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 5958d35 commit 05f3f75

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

tools/testing/selftests/mm/thuge-gen.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
#define _GNU_SOURCE 1
1717
#include <sys/mman.h>
18+
#include <linux/mman.h>
1819
#include <stdlib.h>
1920
#include <stdio.h>
2021
#include <sys/ipc.h>
@@ -28,10 +29,6 @@
2829
#include "vm_util.h"
2930
#include "../kselftest.h"
3031

31-
#define MAP_HUGE_2MB (21 << MAP_HUGE_SHIFT)
32-
#define MAP_HUGE_1GB (30 << MAP_HUGE_SHIFT)
33-
#define MAP_HUGE_SHIFT 26
34-
#define MAP_HUGE_MASK 0x3f
3532
#if !defined(MAP_HUGETLB)
3633
#define MAP_HUGETLB 0x40000
3734
#endif

0 commit comments

Comments
 (0)