Skip to content

Commit a29adb6

Browse files
Christoph Hellwigtorvalds
authored andcommitted
mm: rename vmap_page_range to map_kernel_range
This matches the map_kernel_range_noflush API. Also change to pass a size instead of the end, similar to the noflush version. 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 b521c43 commit a29adb6

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

mm/vmalloc.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -273,13 +273,13 @@ int map_kernel_range_noflush(unsigned long addr, unsigned long size,
273273
return nr;
274274
}
275275

276-
static int vmap_page_range(unsigned long start, unsigned long end,
276+
static int map_kernel_range(unsigned long start, unsigned long size,
277277
pgprot_t prot, struct page **pages)
278278
{
279279
int ret;
280280

281-
ret = map_kernel_range_noflush(start, end - start, prot, pages);
282-
flush_cache_vmap(start, end);
281+
ret = map_kernel_range_noflush(start, size, prot, pages);
282+
flush_cache_vmap(start, start + size);
283283
return ret;
284284
}
285285

@@ -1867,7 +1867,7 @@ void *vm_map_ram(struct page **pages, unsigned int count, int node, pgprot_t pro
18671867

18681868
kasan_unpoison_vmalloc(mem, size);
18691869

1870-
if (vmap_page_range(addr, addr + size, prot, pages) < 0) {
1870+
if (map_kernel_range(addr, size, prot, pages) < 0) {
18711871
vm_unmap_ram(mem, count);
18721872
return NULL;
18731873
}
@@ -2031,10 +2031,9 @@ void unmap_kernel_range(unsigned long addr, unsigned long size)
20312031
int map_vm_area(struct vm_struct *area, pgprot_t prot, struct page **pages)
20322032
{
20332033
unsigned long addr = (unsigned long)area->addr;
2034-
unsigned long end = addr + get_vm_area_size(area);
20352034
int err;
20362035

2037-
err = vmap_page_range(addr, end, prot, pages);
2036+
err = map_kernel_range(addr, get_vm_area_size(area), prot, pages);
20382037

20392038
return err > 0 ? 0 : err;
20402039
}

0 commit comments

Comments
 (0)