Skip to content

Commit f38fcb9

Browse files
Christoph Hellwigtorvalds
authored andcommitted
mm: remove the prot argument to __vmalloc_node
This is always PAGE_KERNEL now. Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Acked-by: Peter Zijlstra (Intel) <[email protected]> Cc: Christian Borntraeger <[email protected]> Cc: Christophe Leroy <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: David Airlie <[email protected]> Cc: Gao Xiang <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Haiyang Zhang <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: "K. Y. Srinivasan" <[email protected]> Cc: Laura Abbott <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Michael Kelley <[email protected]> Cc: Minchan Kim <[email protected]> Cc: Nitin Gupta <[email protected]> Cc: Robin Murphy <[email protected]> Cc: Sakari Ailus <[email protected]> Cc: Stephen Hemminger <[email protected]> Cc: Sumit Semwal <[email protected]> Cc: Wei Liu <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Heiko Carstens <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Vasily Gorbik <[email protected]> Cc: Will Deacon <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
1 parent 88dca4c commit f38fcb9

File tree

1 file changed

+14
-21
lines changed

1 file changed

+14
-21
lines changed

mm/vmalloc.c

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2402,8 +2402,7 @@ void *vmap(struct page **pages, unsigned int count,
24022402
EXPORT_SYMBOL(vmap);
24032403

24042404
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);
24072406
static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
24082407
pgprot_t prot, int node)
24092408
{
@@ -2421,7 +2420,7 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
24212420
/* Please note that the recursion is strictly bounded. */
24222421
if (array_size > PAGE_SIZE) {
24232422
pages = __vmalloc_node(array_size, 1, nested_gfp|highmem_mask,
2424-
PAGE_KERNEL, node, area->caller);
2423+
node, area->caller);
24252424
} else {
24262425
pages = kmalloc_node(array_size, nested_gfp, node);
24272426
}
@@ -2540,13 +2539,11 @@ EXPORT_SYMBOL_GPL(__vmalloc_node_range);
25402539
* @size: allocation size
25412540
* @align: desired alignment
25422541
* @gfp_mask: flags for the page level allocator
2543-
* @prot: protection mask for the allocated pages
25442542
* @node: node to use for allocation or NUMA_NO_NODE
25452543
* @caller: caller's return address
25462544
*
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.
25502547
*
25512548
* Reclaim modifiers in @gfp_mask - __GFP_NORETRY, __GFP_RETRY_MAYFAIL
25522549
* and __GFP_NOFAIL are not supported
@@ -2557,32 +2554,31 @@ EXPORT_SYMBOL_GPL(__vmalloc_node_range);
25572554
* Return: pointer to the allocated memory or %NULL on error
25582555
*/
25592556
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)
25622558
{
25632559
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);
25652561
}
25662562

25672563
void *__vmalloc(unsigned long size, gfp_t gfp_mask)
25682564
{
2569-
return __vmalloc_node(size, 1, gfp_mask, PAGE_KERNEL, NUMA_NO_NODE,
2565+
return __vmalloc_node(size, 1, gfp_mask, NUMA_NO_NODE,
25702566
__builtin_return_address(0));
25712567
}
25722568
EXPORT_SYMBOL(__vmalloc);
25732569

25742570
static inline void *__vmalloc_node_flags(unsigned long size,
25752571
int node, gfp_t flags)
25762572
{
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));
25792575
}
25802576

25812577

25822578
void *__vmalloc_node_flags_caller(unsigned long size, int node, gfp_t flags,
25832579
void *caller)
25842580
{
2585-
return __vmalloc_node(size, 1, flags, PAGE_KERNEL, node, caller);
2581+
return __vmalloc_node(size, 1, flags, node, caller);
25862582
}
25872583

25882584
/**
@@ -2657,8 +2653,8 @@ EXPORT_SYMBOL(vmalloc_user);
26572653
*/
26582654
void *vmalloc_node(unsigned long size, int node)
26592655
{
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));
26622658
}
26632659
EXPORT_SYMBOL(vmalloc_node);
26642660

@@ -2671,9 +2667,6 @@ EXPORT_SYMBOL(vmalloc_node);
26712667
* allocator and map them into contiguous kernel virtual space.
26722668
* The memory allocated is set to zero.
26732669
*
2674-
* For tight control over page level allocator and protection flags
2675-
* use __vmalloc_node() instead.
2676-
*
26772670
* Return: pointer to the allocated memory or %NULL on error
26782671
*/
26792672
void *vzalloc_node(unsigned long size, int node)
@@ -2746,8 +2739,8 @@ void *vmalloc_exec(unsigned long size)
27462739
*/
27472740
void *vmalloc_32(unsigned long size)
27482741
{
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));
27512744
}
27522745
EXPORT_SYMBOL(vmalloc_32);
27532746

0 commit comments

Comments
 (0)