Skip to content

Commit 893acc5

Browse files
Asphalttgregkh
authored andcommitted
Revert "selftests: mm: fix map_hugetlb failure on 64K page size systems"
This reverts commit a584c77 which is commit 91b80cc upstream. This fixes the following build error: map_hugetlb.c: In function 'main': map_hugetlb.c:79:25: warning: implicit declaration of function 'default_huge_page_size' [-Wimplicit-function-declaration] 79 | hugepage_size = default_huge_page_size(); Signed-off-by: Leon Hwang <leon.hwang@linux.dev> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 41cb9fd commit 893acc5

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

tools/testing/selftests/vm/map_hugetlb.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include <unistd.h>
1616
#include <sys/mman.h>
1717
#include <fcntl.h>
18-
#include "vm_util.h"
1918

2019
#define LENGTH (256UL*1024*1024)
2120
#define PROTECTION (PROT_READ | PROT_WRITE)
@@ -71,16 +70,10 @@ int main(int argc, char **argv)
7170
{
7271
void *addr;
7372
int ret;
74-
size_t hugepage_size;
7573
size_t length = LENGTH;
7674
int flags = FLAGS;
7775
int shift = 0;
7876

79-
hugepage_size = default_huge_page_size();
80-
/* munmap with fail if the length is not page aligned */
81-
if (hugepage_size > length)
82-
length = hugepage_size;
83-
8477
if (argc > 1)
8578
length = atol(argv[1]) << 20;
8679
if (argc > 2) {

0 commit comments

Comments
 (0)