All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] stub out is_swap_pte for !MMU
@ 2008-02-08 20:02 Mike Frysinger
  2008-02-08 20:49 ` Matt Mackall
  0 siblings, 1 reply; 6+ messages in thread
From: Mike Frysinger @ 2008-02-08 20:02 UTC (permalink / raw)
  To: mpm, akpm; +Cc: linux-kernel

With commit 698dd4ba6b12e34e1e432c944c01478c0b2cd773, swap_pte() was moved
into view of both MMU and !MMU, but uses functions only provided by MMU.
Here we stub out the function for !MMU ports.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 include/linux/swapops.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/include/linux/swapops.h b/include/linux/swapops.h
index 7bf2d14..e6b54f7 100644
--- a/include/linux/swapops.h
+++ b/include/linux/swapops.h
@@ -45,7 +45,11 @@ static inline pgoff_t swp_offset(swp_entry_t entry)
 /* check whether a pte points to a swap entry */
 static inline int is_swap_pte(pte_t pte)
 {
+#ifdef CONFIG_MMU
 	return !pte_none(pte) && !pte_present(pte) && !pte_file(pte);
+#else
+	return 0;
+#endif
 }
 
 /*
-- 
1.5.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-02-08 22:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-08 20:02 [PATCH] stub out is_swap_pte for !MMU Mike Frysinger
2008-02-08 20:49 ` Matt Mackall
2008-02-08 21:25   ` Mike Frysinger
2008-02-08 21:41     ` Matt Mackall
2008-02-08 22:05       ` Andrew Morton
2008-02-08 22:19         ` Matt Mackall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.