From: Dan Williams <dan.j.williams@intel.com>
To: tglx@linutronix.de
Cc: x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 1/5] generic/pgtable: Make {pmd, pud}_same() unconditionally available
Date: Fri, 30 Nov 2018 16:35:11 -0800 [thread overview]
Message-ID: <154362451167.2367148.8282228698157089741.stgit@dwillia2-desk3.amr.corp.intel.com> (raw)
In-Reply-To: <154362450646.2367148.16448130381211111341.stgit@dwillia2-desk3.amr.corp.intel.com>
In preparation for {pmd,pud}_same() to be used outside of transparent
huge page code paths, make them unconditionally available. This enables
them to be used in the definition of a new family of
set_{pte,pmd,pud,p4d,pgd}_safe() helpers.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
include/asm-generic/pgtable.h | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
index 359fb935ded6..eea50ef8b8cd 100644
--- a/include/asm-generic/pgtable.h
+++ b/include/asm-generic/pgtable.h
@@ -375,7 +375,6 @@ static inline int pte_unused(pte_t pte)
#endif
#ifndef __HAVE_ARCH_PMD_SAME
-#ifdef CONFIG_TRANSPARENT_HUGEPAGE
static inline int pmd_same(pmd_t pmd_a, pmd_t pmd_b)
{
return pmd_val(pmd_a) == pmd_val(pmd_b);
@@ -385,19 +384,6 @@ static inline int pud_same(pud_t pud_a, pud_t pud_b)
{
return pud_val(pud_a) == pud_val(pud_b);
}
-#else /* CONFIG_TRANSPARENT_HUGEPAGE */
-static inline int pmd_same(pmd_t pmd_a, pmd_t pmd_b)
-{
- BUILD_BUG();
- return 0;
-}
-
-static inline int pud_same(pud_t pud_a, pud_t pud_b)
-{
- BUILD_BUG();
- return 0;
-}
-#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
#endif
#ifndef __HAVE_ARCH_DO_SWAP_PAGE
next prev parent reply other threads:[~2018-12-01 0:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-01 0:35 [PATCH v2 0/5] x86/mm: Drop usage of __flush_tlb_all() in kernel_physical_mapping_init() Dan Williams
2018-12-01 0:35 ` Dan Williams [this message]
2018-12-01 0:35 ` [PATCH v2 2/5] generic/pgtable: Introduce {p4d,pgd}_same() Dan Williams
2018-12-01 0:35 ` [PATCH v2 3/5] generic/pgtable: Introduce set_pte_safe() Dan Williams
2018-12-03 17:53 ` Dave Hansen
2018-12-03 17:57 ` Dan Williams
2018-12-01 0:35 ` [PATCH v2 4/5] x86/mm: Validate kernel_physical_mapping_init() pte population Dan Williams
2018-12-01 0:35 ` [PATCH v2 5/5] x86/mm: Drop usage of __flush_tlb_all() in kernel_physical_mapping_init() Dan Williams
2018-12-01 10:27 ` Peter Zijlstra
2018-12-02 6:43 ` Sasha Levin
2018-12-02 17:04 ` Dan Williams
2018-12-03 17:18 ` Dave Hansen
2018-12-01 10:28 ` [PATCH v2 0/5] " Peter Zijlstra
2018-12-01 17:49 ` Dan Williams
2018-12-03 9:21 ` 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=154362451167.2367148.8282228698157089741.stgit@dwillia2-desk3.amr.corp.intel.com \
--to=dan.j.williams@intel.com \
--cc=linux-kernel@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).