From: tip-bot for Dan Williams <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: dave.hansen@linux.intel.com, bigeasy@linutronix.de,
kirill.shutemov@linux.intel.com, mingo@kernel.org,
tglx@linutronix.de, luto@kernel.org,
torvalds@linux-foundation.org, dan.j.williams@intel.com,
hpa@zytor.com, peterz@infradead.org,
linux-kernel@vger.kernel.org, riel@surriel.com, bp@alien8.de
Subject: [tip:x86/mm] generic/pgtable: Introduce {p4d,pgd}_same()
Date: Wed, 5 Dec 2018 10:05:37 -0800 [thread overview]
Message-ID: <tip-0cebbb60f759a709dabb3c87b9704f9844878850@git.kernel.org> (raw)
In-Reply-To: <154395943153.32119.1733586547359626311.stgit@dwillia2-desk3.amr.corp.intel.com>
Commit-ID: 0cebbb60f759a709dabb3c87b9704f9844878850
Gitweb: https://git.kernel.org/tip/0cebbb60f759a709dabb3c87b9704f9844878850
Author: Dan Williams <dan.j.williams@intel.com>
AuthorDate: Tue, 4 Dec 2018 13:37:11 -0800
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 5 Dec 2018 09:03:06 +0100
generic/pgtable: Introduce {p4d,pgd}_same()
In preparation for introducing '_safe' versions of page table entry 'set'
helpers, introduce generic versions of p4d_same() and pgd_same().
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rik van Riel <riel@surriel.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/154395943153.32119.1733586547359626311.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
include/asm-generic/pgtable.h | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
index eea50ef8b8cd..dae7f98babed 100644
--- a/include/asm-generic/pgtable.h
+++ b/include/asm-generic/pgtable.h
@@ -386,6 +386,20 @@ static inline int pud_same(pud_t pud_a, pud_t pud_b)
}
#endif
+#ifndef __HAVE_ARCH_P4D_SAME
+static inline int p4d_same(p4d_t p4d_a, p4d_t p4d_b)
+{
+ return p4d_val(p4d_a) == p4d_val(p4d_b);
+}
+#endif
+
+#ifndef __HAVE_ARCH_PGD_SAME
+static inline int pgd_same(pgd_t pgd_a, pgd_t pgd_b)
+{
+ return pgd_val(pgd_a) == pgd_val(pgd_b);
+}
+#endif
+
#ifndef __HAVE_ARCH_DO_SWAP_PAGE
/*
* Some architectures support metadata associated with a page. When a
next prev parent reply other threads:[~2018-12-05 18:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-04 21:37 [PATCH v3 0/5] x86/mm: Drop usage of __flush_tlb_all() in kernel_physical_mapping_init() Dan Williams
2018-12-04 21:37 ` [PATCH v3 1/5] generic/pgtable: Make {pmd, pud}_same() unconditionally available Dan Williams
2018-12-05 18:05 ` [tip:x86/mm] " tip-bot for Dan Williams
2018-12-04 21:37 ` [PATCH v3 2/5] generic/pgtable: Introduce {p4d,pgd}_same() Dan Williams
2018-12-05 18:05 ` tip-bot for Dan Williams [this message]
2018-12-04 21:37 ` [PATCH v3 3/5] generic/pgtable: Introduce set_pte_safe() Dan Williams
2018-12-04 21:37 ` [PATCH v3 4/5] x86/mm: Validate kernel_physical_mapping_init() pte population Dan Williams
2018-12-05 18:06 ` [tip:x86/mm] x86/mm: Validate kernel_physical_mapping_init() PTE population tip-bot for Dan Williams
2018-12-04 21:37 ` [PATCH v3 5/5] x86/mm: Drop usage of __flush_tlb_all() in kernel_physical_mapping_init() Dan Williams
2018-12-05 18:07 ` [tip:x86/mm] " tip-bot for Dan Williams
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=tip-0cebbb60f759a709dabb3c87b9704f9844878850@git.kernel.org \
--to=tipbot@zytor.com \
--cc=bigeasy@linutronix.de \
--cc=bp@alien8.de \
--cc=dan.j.williams@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=riel@surriel.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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).