Commit 4ad0ae8c authored by Nicholas Piggin's avatar Nicholas Piggin Committed by Linus Torvalds
Browse files

mm/vmalloc: remove unmap_kernel_range

This is a shim around vunmap_range, get rid of it.

Move the main API comment from the _noflush variant to the normal
variant, and make _noflush internal to mm/.

[npiggin@gmail.com: fix nommu builds and a comment bug per sfr]
  Link: https://lkml.kernel.org/r/1617292598.m6g0knx24s.astroid@bobo.none
[akpm@linux-foundation.org: move vunmap_range_noflush() stub inside !CONFIG_MMU, not !CONFIG_NUMA]
[npiggin@gmail.com: fix nommu builds]
  Link: https://lkml.kernel.org/r/1617292497.o1uhq5ipxp.astroid@bobo.none

Link: https://lkml.kernel.org/r/20210322021806.892164-5-npiggin@gmail.com


Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Cc: Cédric Le Goater <clg@kaod.org>
Cc: Uladzislau Rezki <urezki@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 94f88d7b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -215,7 +215,7 @@ Here are the routines, one by one:

	The first of these two routines is invoked after vmap_range()
	has installed the page table entries.  The second is invoked
	before unmap_kernel_range() deletes the page table entries.
	before vunmap_range() deletes the page table entries.

There exists another whole class of cpu cache issues which currently
require a whole different set of interfaces to handle properly.
+1 −1
Original line number Diff line number Diff line
@@ -521,7 +521,7 @@ void free_initmem(void)
	 * prevents the region from being reused for kernel modules, which
	 * is not supported by kallsyms.
	 */
	unmap_kernel_range((u64)__init_begin, (u64)(__init_end - __init_begin));
	vunmap_range((u64)__init_begin, (u64)__init_end);
}

void dump_mem_limit(void)
+2 −2
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ static void remap_isa_base(phys_addr_t pa, unsigned long size)
	if (slab_is_available()) {
		if (ioremap_page_range(ISA_IO_BASE, ISA_IO_BASE + size, pa,
				pgprot_noncached(PAGE_KERNEL)))
			unmap_kernel_range(ISA_IO_BASE, size);
			vunmap_range(ISA_IO_BASE, ISA_IO_BASE + size);
	} else {
		early_ioremap_range(ISA_IO_BASE, pa, size,
				pgprot_noncached(PAGE_KERNEL));
@@ -311,7 +311,7 @@ static void isa_bridge_remove(void)
	isa_bridge_pcidev = NULL;

	/* Unmap the ISA area */
	unmap_kernel_range(ISA_IO_BASE, 0x10000);
	vunmap_range(ISA_IO_BASE, ISA_IO_BASE + 0x10000);
}

/**
+1 −1
Original line number Diff line number Diff line
@@ -140,7 +140,7 @@ void __iomem *ioremap_phb(phys_addr_t paddr, unsigned long size)
	addr = (unsigned long)area->addr;
	if (ioremap_page_range(addr, addr + size, paddr,
			pgprot_noncached(PAGE_KERNEL))) {
		unmap_kernel_range(addr, size);
		vunmap_range(addr, addr + size);
		return NULL;
	}

+1 −1
Original line number Diff line number Diff line
@@ -93,7 +93,7 @@ void __iomem *do_ioremap(phys_addr_t pa, phys_addr_t offset, unsigned long size,
	if (!ret)
		return (void __iomem *)area->addr + offset;

	unmap_kernel_range(va, size);
	vunmap_range(va, va + size);
	free_vm_area(area);

	return NULL;
Loading