@@ -2402,8 +2402,7 @@ void *vmap(struct page **pages, unsigned int count,
2402
2402
EXPORT_SYMBOL (vmap );
2403
2403
2404
2404
static void * __vmalloc_node (unsigned long size , unsigned long align ,
2405
- gfp_t gfp_mask , pgprot_t prot ,
2406
- int node , const void * caller );
2405
+ gfp_t gfp_mask , int node , const void * caller );
2407
2406
static void * __vmalloc_area_node (struct vm_struct * area , gfp_t gfp_mask ,
2408
2407
pgprot_t prot , int node )
2409
2408
{
@@ -2421,7 +2420,7 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
2421
2420
/* Please note that the recursion is strictly bounded. */
2422
2421
if (array_size > PAGE_SIZE ) {
2423
2422
pages = __vmalloc_node (array_size , 1 , nested_gfp |highmem_mask ,
2424
- PAGE_KERNEL , node , area -> caller );
2423
+ node , area -> caller );
2425
2424
} else {
2426
2425
pages = kmalloc_node (array_size , nested_gfp , node );
2427
2426
}
@@ -2540,13 +2539,11 @@ EXPORT_SYMBOL_GPL(__vmalloc_node_range);
2540
2539
* @size: allocation size
2541
2540
* @align: desired alignment
2542
2541
* @gfp_mask: flags for the page level allocator
2543
- * @prot: protection mask for the allocated pages
2544
2542
* @node: node to use for allocation or NUMA_NO_NODE
2545
2543
* @caller: caller's return address
2546
2544
*
2547
- * Allocate enough pages to cover @size from the page level
2548
- * allocator with @gfp_mask flags. Map them into contiguous
2549
- * kernel virtual space, using a pagetable protection of @prot.
2545
+ * Allocate enough pages to cover @size from the page level allocator with
2546
+ * @gfp_mask flags. Map them into contiguous kernel virtual space.
2550
2547
*
2551
2548
* Reclaim modifiers in @gfp_mask - __GFP_NORETRY, __GFP_RETRY_MAYFAIL
2552
2549
* and __GFP_NOFAIL are not supported
@@ -2557,32 +2554,31 @@ EXPORT_SYMBOL_GPL(__vmalloc_node_range);
2557
2554
* Return: pointer to the allocated memory or %NULL on error
2558
2555
*/
2559
2556
static void * __vmalloc_node (unsigned long size , unsigned long align ,
2560
- gfp_t gfp_mask , pgprot_t prot ,
2561
- int node , const void * caller )
2557
+ gfp_t gfp_mask , int node , const void * caller )
2562
2558
{
2563
2559
return __vmalloc_node_range (size , align , VMALLOC_START , VMALLOC_END ,
2564
- gfp_mask , prot , 0 , node , caller );
2560
+ gfp_mask , PAGE_KERNEL , 0 , node , caller );
2565
2561
}
2566
2562
2567
2563
void * __vmalloc (unsigned long size , gfp_t gfp_mask )
2568
2564
{
2569
- return __vmalloc_node (size , 1 , gfp_mask , PAGE_KERNEL , NUMA_NO_NODE ,
2565
+ return __vmalloc_node (size , 1 , gfp_mask , NUMA_NO_NODE ,
2570
2566
__builtin_return_address (0 ));
2571
2567
}
2572
2568
EXPORT_SYMBOL (__vmalloc );
2573
2569
2574
2570
static inline void * __vmalloc_node_flags (unsigned long size ,
2575
2571
int node , gfp_t flags )
2576
2572
{
2577
- return __vmalloc_node (size , 1 , flags , PAGE_KERNEL ,
2578
- node , __builtin_return_address (0 ));
2573
+ return __vmalloc_node (size , 1 , flags , node ,
2574
+ __builtin_return_address (0 ));
2579
2575
}
2580
2576
2581
2577
2582
2578
void * __vmalloc_node_flags_caller (unsigned long size , int node , gfp_t flags ,
2583
2579
void * caller )
2584
2580
{
2585
- return __vmalloc_node (size , 1 , flags , PAGE_KERNEL , node , caller );
2581
+ return __vmalloc_node (size , 1 , flags , node , caller );
2586
2582
}
2587
2583
2588
2584
/**
@@ -2657,8 +2653,8 @@ EXPORT_SYMBOL(vmalloc_user);
2657
2653
*/
2658
2654
void * vmalloc_node (unsigned long size , int node )
2659
2655
{
2660
- return __vmalloc_node (size , 1 , GFP_KERNEL , PAGE_KERNEL ,
2661
- node , __builtin_return_address (0 ));
2656
+ return __vmalloc_node (size , 1 , GFP_KERNEL , node ,
2657
+ __builtin_return_address (0 ));
2662
2658
}
2663
2659
EXPORT_SYMBOL (vmalloc_node );
2664
2660
@@ -2671,9 +2667,6 @@ EXPORT_SYMBOL(vmalloc_node);
2671
2667
* allocator and map them into contiguous kernel virtual space.
2672
2668
* The memory allocated is set to zero.
2673
2669
*
2674
- * For tight control over page level allocator and protection flags
2675
- * use __vmalloc_node() instead.
2676
- *
2677
2670
* Return: pointer to the allocated memory or %NULL on error
2678
2671
*/
2679
2672
void * vzalloc_node (unsigned long size , int node )
@@ -2746,8 +2739,8 @@ void *vmalloc_exec(unsigned long size)
2746
2739
*/
2747
2740
void * vmalloc_32 (unsigned long size )
2748
2741
{
2749
- return __vmalloc_node (size , 1 , GFP_VMALLOC32 , PAGE_KERNEL ,
2750
- NUMA_NO_NODE , __builtin_return_address (0 ));
2742
+ return __vmalloc_node (size , 1 , GFP_VMALLOC32 , NUMA_NO_NODE ,
2743
+ __builtin_return_address (0 ));
2751
2744
}
2752
2745
EXPORT_SYMBOL (vmalloc_32 );
2753
2746
0 commit comments