From: James Custer <jcuster@sgi.com>
To: x86@kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de,
mingo@redhat.com, hpa@zytor.com
Cc: James Custer <jcuster@sgi.com>
Subject: [PATCH] x86: Allow 1GB pages to be SPECIAL similar to 2MB
Date: Wed, 24 Sep 2014 12:19:03 -0500 [thread overview]
Message-ID: <1411579143-10963-1-git-send-email-jcuster@sgi.com> (raw)
Signed-off-by: James Custer <jcuster@sgi.com>
---
arch/x86/mm/gup.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/x86/mm/gup.c b/arch/x86/mm/gup.c
index dd74e46..12ca9cf 100644
--- a/arch/x86/mm/gup.c
+++ b/arch/x86/mm/gup.c
@@ -121,7 +121,6 @@ static noinline int gup_huge_pmd(pmd_t pmd, unsigned long addr,
mask |= _PAGE_RW;
if ((pte_flags(pte) & mask) != mask)
return 0;
- /* hugepages are never "special" */
VM_BUG_ON(pte_flags(pte) & _PAGE_SPECIAL);
VM_BUG_ON(!pfn_valid(pte_pfn(pte)));
@@ -191,7 +190,6 @@ static noinline int gup_huge_pud(pud_t pud, unsigned long addr,
mask |= _PAGE_RW;
if ((pte_flags(pte) & mask) != mask)
return 0;
- /* hugepages are never "special" */
VM_BUG_ON(pte_flags(pte) & _PAGE_SPECIAL);
VM_BUG_ON(!pfn_valid(pte_pfn(pte)));
@@ -223,7 +221,7 @@ static int gup_pud_range(pgd_t pgd, unsigned long addr, unsigned long end,
pud_t pud = *pudp;
next = pud_addr_end(addr, end);
- if (pud_none(pud))
+ if (pud_none(pud) || (pud_val(pud) & _PAGE_SPECIAL))
return 0;
if (unlikely(pud_large(pud))) {
if (!gup_huge_pud(pud, addr, next, write, pages, nr))
--
1.8.2.1
next reply other threads:[~2014-09-24 17:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-24 17:19 James Custer [this message]
2014-09-24 22:04 ` [PATCH] x86: Allow 1GB pages to be SPECIAL similar to 2MB David Rientjes
2014-09-25 10:39 ` Thomas Gleixner
-- strict thread matches above, loose matches on Subject: below --
2014-09-25 14:40 James Custer
2014-11-25 21:23 ` Andrew Morton
2014-11-26 6:17 ` Kirill A. Shutemov
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=1411579143-10963-1-git-send-email-jcuster@sgi.com \
--to=jcuster@sgi.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@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