linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: linuxppc-dev <linuxppc-dev@lists.ozlabs.org>
Cc: Nick Piggin <npiggin@suse.de>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: [PATCH 1/2] mm/vmalloc: Export purge_vmap_area_lazy()
Date: Wed, 24 Mar 2010 18:56:31 +1100	[thread overview]
Message-ID: <1269417391.8599.188.camel@pasglop> (raw)

Some powerpc code needs to ensure that all previous iounmap/vunmap has
really been flushed out of the MMU hash table. Without that, various
hotplug operations may fail when trying to return those pieces to
the hypervisor due to existing active mappings.

This exports purge_vmap_area_lazy() to allow the powerpc code to perform
that purge when unplugging devices.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 include/linux/vmalloc.h |    1 +
 mm/vmalloc.c            |    5 ++---
 2 files changed, 3 insertions(+), 3 deletions(-)

Nick, care to give me an Ack so I can get that upstream along with
the next patch ASAP (and back into distros) ?

Thanks !
Ben.

diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h
index 227c2a5..0d0ae4e 100644
--- a/include/linux/vmalloc.h
+++ b/include/linux/vmalloc.h
@@ -99,6 +99,7 @@ extern int map_kernel_range_noflush(unsigned long start, unsigned long size,
 				    pgprot_t prot, struct page **pages);
 extern void unmap_kernel_range_noflush(unsigned long addr, unsigned long size);
 extern void unmap_kernel_range(unsigned long addr, unsigned long size);
+extern void purge_vmap_area_lazy(void);
 
 /* Allocate/destroy a 'vmalloc' VM area. */
 extern struct vm_struct *alloc_vm_area(size_t size);
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index ae00746..d25c741 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -317,8 +317,6 @@ static void __insert_vmap_area(struct vmap_area *va)
 		list_add_rcu(&va->list, &vmap_area_list);
 }
 
-static void purge_vmap_area_lazy(void);
-
 /*
  * Allocate a region of KVA of the specified size and alignment, within the
  * vstart and vend.
@@ -590,12 +588,13 @@ static void try_purge_vmap_area_lazy(void)
 /*
  * Kick off a purge of the outstanding lazy areas.
  */
-static void purge_vmap_area_lazy(void)
+void purge_vmap_area_lazy(void)
 {
 	unsigned long start = ULONG_MAX, end = 0;
 
 	__purge_vmap_area_lazy(&start, &end, 1, 0);
 }
+EXPORT_SYMBOL_GPL(purge_vmap_area_lazy);
 
 /*
  * Free and unmap a vmap area, caller ensuring flush_cache_vunmap had been

             reply	other threads:[~2010-03-24  8:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-24  7:56 Benjamin Herrenschmidt [this message]
2010-03-25  5:28 ` [PATCH 1/2] mm/vmalloc: Export purge_vmap_area_lazy() Nick Piggin
2010-03-25  8:25   ` Benjamin Herrenschmidt
2010-03-25  8:39 ` MJ embd

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1269417391.8599.188.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=npiggin@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).