Messages in this thread |  | | Date | Fri, 20 Feb 2009 00:32:29 -0800 | | From | Andrew Morton <> | | Subject | Re: Subject: [PATCH 08/10 UPDATED] vmalloc: add un/map_kernel_range_noflush() |
| |
On Fri, 20 Feb 2009 16:15:39 +0900 Tejun Heo <tj@kernel.org> wrote:
> +/** > + * map_kernel_range_noflush - map kernel VM area with the specified pages > + * @addr: start of the VM area to map > + * @size: size of the VM area to map > + * @prot: page protection flags to use > + * @pages: pages to map > + * > + * Map PFN_UP(@size) pages at @addr. The VM area @addr and @size > + * specify should have been allocated using get_vm_area() and its > + * friends. > + * > + * NOTE: > + * This function does NOT do any cache flushing. The caller is > + * responsible for calling flush_cache_vmap() on to-be-mapped areas > + * before calling this function. > + * > + * RETURNS: > + * The number of pages mapped on success, -errno on failure. > + */ > +int map_kernel_range_noflush(unsigned long addr, unsigned long size, > + pgprot_t prot, struct page **pages) > +{ > + return vmap_page_range_noflush(addr, addr + size, prot, pages); > +} > + > +/** > + * unmap_kernel_range_noflush - unmap kernel VM area > + * @addr: start of the VM area to unmap > + * @size: size of the VM area to unmap > + * > + * Unmap PFN_UP(@size) pages at @addr. The VM area @addr and @size > + * specify should have been allocated using get_vm_area() and its > + * friends. > + * > + * NOTE: > + * This function does NOT do any cache flushing. The caller is > + * responsible for calling flush_cache_vunmap() on to-be-mapped areas > + * before calling this function and flush_tlb_kernel_range() after. > + */ > +void unmap_kernel_range_noflush(unsigned long addr, unsigned long size) > +{ > + vunmap_page_range(addr, addr + size); > +}
Should these be called vmap_kernel_range_noflush/vunmap_kernel_range_noflush?
<avoids pointing out the 2 gigapage limit>
|  |