linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Josh Triplett <josh@joshtriplett.org>
To: Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	David Rientjes <rientjes@google.com>,
	Minchan Kim <minchan@kernel.org>,
	Kautuk Consul <consul.kautuk@gmail.com>,
	Cong Wang <amwang@redhat.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Cc: Josh Triplett <josh@joshtriplett.org>
Subject: [PATCH 23/58] mm: Avoid defining set_iounmap_nonlazy on non-x86
Date: Sun, 18 Nov 2012 21:28:02 -0800	[thread overview]
Message-ID: <1353302917-13995-24-git-send-email-josh@joshtriplett.org> (raw)
In-Reply-To: <1353302917-13995-1-git-send-email-josh@joshtriplett.org>

Commit 3ee48b6af49cf534ca2f481ecc484b156a41451d added the
set_iounmap_nonlazy function for use on x86, but actually defined it on
all architectures.  Only x86 prototypes this function (in asm/io.h), and
only x86 uses it (in arch/x86/kernel/crash_dump_64.c), so avoid defining
it on non-x86.

Meanwhile, include the appropriate header with the prototype, to
eliminate a warning from gcc (-Wmissing-prototypes) and from Sparse
(-Wdecl).

mm/vmalloc.c:563:6: warning: no previous prototype for ‘set_iounmap_nonlazy’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 mm/vmalloc.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 78e0830..fc32a0a 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -27,6 +27,7 @@
 #include <linux/pfn.h>
 #include <linux/kmemleak.h>
 #include <linux/atomic.h>
+#include <linux/io.h>
 #include <asm/uaccess.h>
 #include <asm/tlbflush.h>
 #include <asm/shmparam.h>
@@ -556,6 +557,7 @@ static atomic_t vmap_lazy_nr = ATOMIC_INIT(0);
 /* for per-CPU blocks */
 static void purge_fragmented_blocks_allcpus(void);
 
+#ifdef CONFIG_X86
 /*
  * called before a call to iounmap() if the caller wants vm_area_struct's
  * immediately freed.
@@ -564,6 +566,7 @@ void set_iounmap_nonlazy(void)
 {
 	atomic_set(&vmap_lazy_nr, lazy_max_pages()+1);
 }
+#endif
 
 /*
  * Purges all lazily-freed vmap areas.
-- 
1.7.10.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2012-11-19  5:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1353302917-13995-1-git-send-email-josh@joshtriplett.org>
2012-11-19  5:27 ` [PATCH 18/58] mm: bootmem: Declare internal ___alloc_bootmem_node function static Josh Triplett
2012-11-19  5:28 ` Josh Triplett [this message]
2012-11-19  5:28 ` [PATCH 26/58] mm/internal.h: Declare vma_address unconditionally Josh Triplett
2012-11-19  5:28 ` [PATCH 29/58] mm: Make copy_pte_range static Josh Triplett
2012-11-19 21:40   ` David Rientjes
2012-11-19  5:28 ` [PATCH 43/58] mm: Mark fallback version of __early_pfn_to_nid static Josh Triplett
2012-11-19  5:28 ` [PATCH 44/58] mm: Only define is_pageblock_removable_nolock when needed Josh Triplett

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=1353302917-13995-24-git-send-email-josh@joshtriplett.org \
    --to=josh@joshtriplett.org \
    --cc=akpm@linux-foundation.org \
    --cc=amwang@redhat.com \
    --cc=consul.kautuk@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=rientjes@google.com \
    --cc=torvalds@linux-foundation.org \
    /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).