mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: mpm@selenic.com, akpm@linux-foundation.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] stub out is_swap_pte for !MMU
Date: Fri,  8 Feb 2008 15:02:39 -0500	[thread overview]
Message-ID: <1202500959-2727-1-git-send-email-vapier@gentoo.org> (raw)

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


             reply	other threads:[~2008-02-08 20:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-08 20:02 Mike Frysinger [this message]
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

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=1202500959-2727-1-git-send-email-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpm@selenic.com \
    /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®