]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - mm/vmalloc.c
Merge branches 'x86/apic', 'x86/defconfig', 'x86/memtest', 'x86/mm' and 'linus' into...
[linux-2.6-omap-h63xx.git] / mm / vmalloc.c
index 75f49d312e8c1d47648f3e96b8a1eb6d14076405..7774c6328970b223f8dad3c80c7a5a44b2a15cc4 100644 (file)
@@ -1012,6 +1012,8 @@ void __init vmalloc_init(void)
 void unmap_kernel_range(unsigned long addr, unsigned long size)
 {
        unsigned long end = addr + size;
+
+       flush_cache_vunmap(addr, end);
        vunmap_page_range(addr, end);
        flush_tlb_kernel_range(addr, end);
 }
@@ -1106,6 +1108,14 @@ struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags,
 }
 EXPORT_SYMBOL_GPL(__get_vm_area);
 
+struct vm_struct *__get_vm_area_caller(unsigned long size, unsigned long flags,
+                                      unsigned long start, unsigned long end,
+                                      void *caller)
+{
+       return __get_vm_area_node(size, flags, start, end, -1, GFP_KERNEL,
+                                 caller);
+}
+
 /**
  *     get_vm_area  -  reserve a contiguous kernel virtual area
  *     @size:          size of the area
@@ -1249,6 +1259,7 @@ EXPORT_SYMBOL(vfree);
 void vunmap(const void *addr)
 {
        BUG_ON(in_interrupt());
+       might_sleep();
        __vunmap(addr, 0);
 }
 EXPORT_SYMBOL(vunmap);
@@ -1268,6 +1279,8 @@ void *vmap(struct page **pages, unsigned int count,
 {
        struct vm_struct *area;
 
+       might_sleep();
+
        if (count > num_physpages)
                return NULL;