lkml.org 
[lkml]   [2008]   [Nov]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] vmap: cope with vm_unmap_aliases before vmalloc_init()
Jeremy Fitzhardinge wrote:
> Xen can end up calling vm_unmap_aliases() before vmalloc_init() has
> been called. In this case its safe to make it a simple no-op.
>
> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>

Ping? Nick, Ingo: do you want to pick these up, or shall I send them to
Linus myself?

Thanks,
J

> ---
> mm/vmalloc.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> ===================================================================
> --- a/mm/vmalloc.c
> +++ b/mm/vmalloc.c
> @@ -592,6 +592,8 @@
>
> #define VMAP_BLOCK_SIZE (VMAP_BBMAP_BITS * PAGE_SIZE)
>
> +static bool vmap_initialized __read_mostly = false;
> +
> struct vmap_block_queue {
> spinlock_t lock;
> struct list_head free;
> @@ -828,6 +830,9 @@
> int cpu;
> int flush = 0;
>
> + if (unlikely(!vmap_initialized))
> + return;
> +
> for_each_possible_cpu(cpu) {
> struct vmap_block_queue *vbq = &per_cpu(vmap_block_queue, cpu);
> struct vmap_block *vb;
> @@ -941,6 +946,8 @@
> INIT_LIST_HEAD(&vbq->dirty);
> vbq->nr_dirty = 0;
> }
> +
> + vmap_initialized = true;
> }
>
> void unmap_kernel_range(unsigned long addr, unsigned long size)
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe
> linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/



\
 
 \ /
  Last update: 2008-11-05 19:55    [W:0.083 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site