public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Mundt <lethal@linux-sh.org>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 5/7] sh: pte_mkhuge() compile fix for !CONFIG_HUGETLB_PAGE.
Date: Thu, 3 Nov 2005 00:31:40 +0200	[thread overview]
Message-ID: <20051102223140.GE27200@linux-sh.org> (raw)

Presently it is bogus to call pte_mkhuge() outside of the
CONFIG_HUGETLB_PAGE context, as the only processors that support
_PAGE_SZHUGE do so in the hugetlbpage context only (and this is the only
time that _PAGE_SZHUGE is even defined). SH-2 and SH-3 do not support
huge pages at all, and so it is not possible to enable this.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>

---

 include/asm-sh/pgtable.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

applies-to: 0aae3fb59b1e7a2877f297fbdc5acb7d281498ad
e1789731db5df57ba5a775be94f4d4e2a5a1c6de
diff --git a/include/asm-sh/pgtable.h b/include/asm-sh/pgtable.h
index aef8ae4..dee36bc 100644
--- a/include/asm-sh/pgtable.h
+++ b/include/asm-sh/pgtable.h
@@ -196,7 +196,9 @@ static inline pte_t pte_mkexec(pte_t pte
 static inline pte_t pte_mkdirty(pte_t pte)	{ set_pte(&pte, __pte(pte_val(pte) | _PAGE_DIRTY)); return pte; }
 static inline pte_t pte_mkyoung(pte_t pte)	{ set_pte(&pte, __pte(pte_val(pte) | _PAGE_ACCESSED)); return pte; }
 static inline pte_t pte_mkwrite(pte_t pte)	{ set_pte(&pte, __pte(pte_val(pte) | _PAGE_RW)); return pte; }
+#ifdef CONFIG_HUGETLB_PAGE
 static inline pte_t pte_mkhuge(pte_t pte)	{ set_pte(&pte, __pte(pte_val(pte) | _PAGE_SZHUGE)); return pte; }
+#endif
 
 /*
  * Macro and implementation to make a page protection as uncachable.
---
0.99.8.GIT

                 reply	other threads:[~2005-11-02 22:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20051102223140.GE27200@linux-sh.org \
    --to=lethal@linux-sh.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.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