mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: torvalds@osdl.org, akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org, David Howells <dhowells@redhat.com>
Subject: [PATCH 2/4] NOMMU: There are no pagetables for walk_page_range() in NOMMU mode
Date: Thu, 24 Sep 2009 12:33:37 +0100	[thread overview]
Message-ID: <20090924113337.6031.10798.stgit@warthog.procyon.org.uk> (raw)
In-Reply-To: <20090924113332.6031.11718.stgit@warthog.procyon.org.uk>

walk_page_range() can't walk the page tables in NOMMU mode, so make it
unavailable in such circumstances.

Signed-off-by: David Howells <dhowells@redhat.com>
---

 include/linux/mm.h |    3 +++
 mm/Makefile        |    4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)


diff --git a/include/linux/mm.h b/include/linux/mm.h
index 23e7fd6..17dc39f 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -750,6 +750,7 @@ unsigned long unmap_vmas(struct mmu_gather **tlb,
 		unsigned long end_addr, unsigned long *nr_accounted,
 		struct zap_details *);
 
+#ifdef CONFIG_MMU
 /**
  * mm_walk - callbacks for walk_page_range
  * @pgd_entry: if set, called for each non-empty PGD (top-level) entry
@@ -772,6 +773,8 @@ struct mm_walk {
 
 int walk_page_range(unsigned long addr, unsigned long end,
 		struct mm_walk *walk);
+#endif
+
 void free_pgd_range(struct mmu_gather *tlb, unsigned long addr,
 		unsigned long end, unsigned long floor, unsigned long ceiling);
 int copy_page_range(struct mm_struct *dst, struct mm_struct *src,
diff --git a/mm/Makefile b/mm/Makefile
index 88193d7..5ac31a1 100644
--- a/mm/Makefile
+++ b/mm/Makefile
@@ -5,14 +5,14 @@
 mmu-y			:= nommu.o
 mmu-$(CONFIG_MMU)	:= fremap.o highmem.o madvise.o memory.o mincore.o \
 			   mlock.o mmap.o mprotect.o mremap.o msync.o rmap.o \
-			   vmalloc.o
+			   vmalloc.o pagewalk.o
 
 obj-y			:= bootmem.o filemap.o mempool.o oom_kill.o fadvise.o \
 			   maccess.o page_alloc.o page-writeback.o \
 			   readahead.o swap.o truncate.o vmscan.o shmem.o \
 			   prio_tree.o util.o mmzone.o vmstat.o backing-dev.o \
 			   page_isolation.o mm_init.o mmu_context.o \
-			   pagewalk.o $(mmu-y)
+			   $(mmu-y)
 obj-y += init-mm.o
 
 obj-$(CONFIG_BOUNCE)	+= bounce.o


  reply	other threads:[~2009-09-24 11:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-24 11:33 [PATCH 1/4] NOMMU: Fallback for is_vmalloc_or_module_addr() should be inline David Howells
2009-09-24 11:33 ` David Howells [this message]
2009-09-24 11:33 ` [PATCH 3/4] NOMMU: Make it possible to get the per-task stack usage through /proc for NOMMU David Howells
2009-09-24 11:33 ` [PATCH 4/4] NOMMU: Ignore mmap() address param as it is a hint David Howells
2009-09-24 17:20 ` [PATCH 3/4] NOMMU: Make it possible to get the per-task stack usage through /proc for NOMMU David Howells

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=20090924113337.6031.10798.stgit@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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

all inboxes | Powered by JetHome®