From: "tip-bot2 for Peter Zijlstra" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: "Peter Zijlstra (Intel)" <peterz@infradead.org>,
"Matthew Wilcox (Oracle)" <willy@infradead.org>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: perf/core] mm: Introduce pXX_leaf_size()
Date: Thu, 03 Dec 2020 09:24:32 -0000 [thread overview]
Message-ID: <160698747295.3364.6132255453696965707.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20201126121121.102580109@infradead.org>
The following commit has been merged into the perf/core branch of tip:
Commit-ID: 560dabbdf68bb15f9e241af8f828b1c8c38d6c6f
Gitweb: https://git.kernel.org/tip/560dabbdf68bb15f9e241af8f828b1c8c38d6c6f
Author: Peter Zijlstra <peterz@infradead.org>
AuthorDate: Fri, 13 Nov 2020 11:45:36 +01:00
Committer: Peter Zijlstra <peterz@infradead.org>
CommitterDate: Thu, 03 Dec 2020 10:14:50 +01:00
mm: Introduce pXX_leaf_size()
A number of architectures have non-pagetable aligned huge/large pages.
For such architectures a leaf can actually be part of a larger entry.
Provide generic helpers to determine the size of a page-table leaf.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Link: https://lkml.kernel.org/r/20201126121121.102580109@infradead.org
---
include/linux/pgtable.h | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h
index ed9266c..fefbbdb 100644
--- a/include/linux/pgtable.h
+++ b/include/linux/pgtable.h
@@ -1536,4 +1536,20 @@ typedef unsigned int pgtbl_mod_mask;
#define pmd_leaf(x) 0
#endif
+#ifndef pgd_leaf_size
+#define pgd_leaf_size(x) (1ULL << PGDIR_SHIFT)
+#endif
+#ifndef p4d_leaf_size
+#define p4d_leaf_size(x) P4D_SIZE
+#endif
+#ifndef pud_leaf_size
+#define pud_leaf_size(x) PUD_SIZE
+#endif
+#ifndef pmd_leaf_size
+#define pmd_leaf_size(x) PMD_SIZE
+#endif
+#ifndef pte_leaf_size
+#define pte_leaf_size(x) PAGE_SIZE
+#endif
+
#endif /* _LINUX_PGTABLE_H */
next prev parent reply other threads:[~2020-12-03 9:25 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-26 12:01 [PATCH v2 0/6] perf/mm: Fix PERF_SAMPLE_*_PAGE_SIZE Peter Zijlstra
2020-11-26 12:01 ` [PATCH v2 1/6] mm/gup: Provide gup_get_pte() more generic Peter Zijlstra
2020-11-26 12:43 ` Matthew Wilcox
2020-11-26 13:02 ` Peter Zijlstra
2020-12-03 9:07 ` [tip: perf/core] " tip-bot2 for Peter Zijlstra
2020-12-03 9:24 ` tip-bot2 for Peter Zijlstra
2020-11-26 12:01 ` [PATCH v2 2/6] mm: Introduce pXX_leaf_size() Peter Zijlstra
2020-11-26 12:43 ` Matthew Wilcox
2020-12-03 9:07 ` [tip: perf/core] " tip-bot2 for Peter Zijlstra
2020-12-03 9:24 ` tip-bot2 for Peter Zijlstra [this message]
2020-11-26 12:01 ` [PATCH v2 3/6] perf/core: Fix arch_perf_get_page_size() Peter Zijlstra
2020-11-26 12:34 ` Matthew Wilcox
2020-11-26 12:42 ` Peter Zijlstra
2020-11-26 12:56 ` Matthew Wilcox
2020-11-26 13:06 ` Peter Zijlstra
2020-11-26 13:27 ` Matthew Wilcox
2020-12-03 9:07 ` [tip: perf/core] " tip-bot2 for Peter Zijlstra
2020-12-03 9:24 ` tip-bot2 for Peter Zijlstra
2020-11-26 12:01 ` [PATCH v2 4/6] arm64/mm: Implement pXX_leaf_size() support Peter Zijlstra
2020-11-26 12:57 ` Peter Zijlstra
2020-11-26 14:32 ` Will Deacon
2020-12-03 9:07 ` [tip: perf/core] " tip-bot2 for Peter Zijlstra
2020-12-03 9:24 ` tip-bot2 for Peter Zijlstra
2020-11-26 12:01 ` [PATCH v2 5/6] sparc64/mm: " Peter Zijlstra
2020-12-03 9:07 ` [tip: perf/core] " tip-bot2 for Peter Zijlstra
2020-12-03 9:24 ` tip-bot2 for Peter Zijlstra
2020-12-09 18:44 ` tip-bot2 for Peter Zijlstra
2020-11-26 12:01 ` [PATCH v2 6/6] powerpc/8xx: " Peter Zijlstra
2020-12-03 9:07 ` [tip: perf/core] " tip-bot2 for Peter Zijlstra
2020-12-03 9:24 ` tip-bot2 for Peter Zijlstra
2020-12-09 18:44 ` tip-bot2 for Peter Zijlstra
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=160698747295.3364.6132255453696965707.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=willy@infradead.org \
--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).