]> git.ipfire.org Git - thirdparty/linux.git/blobdiff - lib/test_vmalloc.c
mm: switch the test_vmalloc module to use __vmalloc_node
[thirdparty/linux.git] / lib / test_vmalloc.c
index 8bbefcaddfe843f65dae4fcd7ac77867fc53eb18..ddc9685702b15a203cb39029ad8889a1cc716291 100644 (file)
@@ -91,12 +91,8 @@ static int random_size_align_alloc_test(void)
                 */
                size = ((rnd % 10) + 1) * PAGE_SIZE;
 
-               ptr = __vmalloc_node_range(size, align,
-                  VMALLOC_START, VMALLOC_END,
-                  GFP_KERNEL | __GFP_ZERO,
-                  PAGE_KERNEL,
-                  0, 0, __builtin_return_address(0));
-
+               ptr = __vmalloc_node(size, align, GFP_KERNEL | __GFP_ZERO, 0,
+                               __builtin_return_address(0));
                if (!ptr)
                        return -1;
 
@@ -118,12 +114,8 @@ static int align_shift_alloc_test(void)
        for (i = 0; i < BITS_PER_LONG; i++) {
                align = ((unsigned long) 1) << i;
 
-               ptr = __vmalloc_node_range(PAGE_SIZE, align,
-                       VMALLOC_START, VMALLOC_END,
-                       GFP_KERNEL | __GFP_ZERO,
-                       PAGE_KERNEL,
-                       0, 0, __builtin_return_address(0));
-
+               ptr = __vmalloc_node(PAGE_SIZE, align, GFP_KERNEL|__GFP_ZERO, 0,
+                               __builtin_return_address(0));
                if (!ptr)
                        return -1;
 
@@ -139,13 +131,9 @@ static int fix_align_alloc_test(void)
        int i;
 
        for (i = 0; i < test_loop_count; i++) {
-               ptr = __vmalloc_node_range(5 * PAGE_SIZE,
-                       THREAD_ALIGN << 1,
-                       VMALLOC_START, VMALLOC_END,
-                       GFP_KERNEL | __GFP_ZERO,
-                       PAGE_KERNEL,
-                       0, 0, __builtin_return_address(0));
-
+               ptr = __vmalloc_node(5 * PAGE_SIZE, THREAD_ALIGN << 1,
+                               GFP_KERNEL | __GFP_ZERO, 0,
+                               __builtin_return_address(0));
                if (!ptr)
                        return -1;