From: jeremy.linton@arm.com (Jeremy Linton)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/7] arm64: Macros to check/set/unset the contiguous bit
Date: Wed, 7 Oct 2015 12:00:21 -0500 [thread overview]
Message-ID: <1444237225-13802-4-git-send-email-jeremy.linton@arm.com> (raw)
In-Reply-To: <1444237225-13802-1-git-send-email-jeremy.linton@arm.com>
Add the supporting macros to check if the contiguous bit
is set, set the bit, or clear it in a PTE entry.
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
---
arch/arm64/include/asm/pgtable.h | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/arm64/include/asm/pgtable.h b/arch/arm64/include/asm/pgtable.h
index 26b0666..cc19ec1 100644
--- a/arch/arm64/include/asm/pgtable.h
+++ b/arch/arm64/include/asm/pgtable.h
@@ -140,6 +140,7 @@ extern struct page *empty_zero_page;
#define pte_special(pte) (!!(pte_val(pte) & PTE_SPECIAL))
#define pte_write(pte) (!!(pte_val(pte) & PTE_WRITE))
#define pte_exec(pte) (!(pte_val(pte) & PTE_UXN))
+#define pte_cont(pte) (!!(pte_val(pte) & PTE_CONT))
#ifdef CONFIG_ARM64_HW_AFDBM
#define pte_hw_dirty(pte) (pte_write(pte) && !(pte_val(pte) & PTE_RDONLY))
@@ -202,6 +203,16 @@ static inline pte_t pte_mkspecial(pte_t pte)
return set_pte_bit(pte, __pgprot(PTE_SPECIAL));
}
+static inline pte_t pte_mkcont(pte_t pte)
+{
+ return set_pte_bit(pte, __pgprot(PTE_CONT));
+}
+
+static inline pte_t pte_mknoncont(pte_t pte)
+{
+ return clear_pte_bit(pte, __pgprot(PTE_CONT));
+}
+
static inline void set_pte(pte_t *ptep, pte_t pte)
{
*ptep = pte;
--
2.4.3
next prev parent reply other threads:[~2015-10-07 17:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-07 17:00 [PATCHv3 0/7] arm64: Use contiguous PTE bit for the kernel linear mapping Jeremy Linton
2015-10-07 17:00 ` [PATCH 1/7] arm64: Add contiguous page flag shifts and constants Jeremy Linton
2015-10-07 17:00 ` [PATCH 2/7] arm64: PTE/PMD contiguous bit definition Jeremy Linton
2015-10-07 17:00 ` Jeremy Linton [this message]
2015-10-07 17:00 ` [PATCH 4/7] arm64: Default kernel pages should be contiguous Jeremy Linton
2015-10-07 17:00 ` [PATCH 5/7] arm64: Make the kernel page dump utility aware of the CONT bit Jeremy Linton
2015-10-07 17:00 ` [PATCH 6/7] arm64: Add a kernel Kconfig option to enable contiguous PTE marking Jeremy Linton
2015-10-07 17:00 ` [PATCH 7/7] arm64: Mark kernel page ranges contiguous Jeremy Linton
2015-10-09 12:50 ` [PATCHv3 0/7] arm64: Use contiguous PTE bit for the kernel linear mapping Catalin Marinas
2015-10-09 15:00 ` Jeremy Linton
2015-11-17 15:37 ` Jeremy Linton
2015-11-18 11:01 ` Will Deacon
2015-11-18 14:10 ` Jeremy Linton
-- strict thread matches above, loose matches on Subject: below --
2015-10-02 20:47 [PATCHv2 " Jeremy Linton
2015-10-02 20:47 ` [PATCH 3/7] arm64: Macros to check/set/unset the contiguous bit Jeremy Linton
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=1444237225-13802-4-git-send-email-jeremy.linton@arm.com \
--to=jeremy.linton@arm.com \
--cc=linux-arm-kernel@lists.infradead.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).