linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeremy Linton <jeremy.linton@arm.com>
To: linux-arm-kernel@lists.infradead.org
Cc: catalin.marinas@arm.com, will.deacon@arm.com,
	linux-kernel@vger.kernel.org, dwoods@ezcip.com,
	steve.capper@arm.com, shijie.huang@arm.com,
	Jeremy Linton <jeremy.linton@arm.com>
Subject: [PATCH 1/7] arm64: Add contiguous page flag shifts and constants
Date: Wed, 16 Sep 2015 14:03:00 -0500	[thread overview]
Message-ID: <1442430186-9083-2-git-send-email-jeremy.linton@arm.com> (raw)
In-Reply-To: <1442430186-9083-1-git-send-email-jeremy.linton@arm.com>

Add the number of pages required to form a contiguous range,
as well as some supporting constants.

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
---
 arch/arm64/include/asm/page.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/include/asm/page.h b/arch/arm64/include/asm/page.h
index 7d9c7e4..33892ef 100644
--- a/arch/arm64/include/asm/page.h
+++ b/arch/arm64/include/asm/page.h
@@ -20,14 +20,20 @@
 #define __ASM_PAGE_H
 
 /* PAGE_SHIFT determines the page size */
+/* CONT_SHIFT determines the number of pages which can be tracked together  */
 #ifdef CONFIG_ARM64_64K_PAGES
 #define PAGE_SHIFT		16
+#define CONT_SHIFT		5
 #else
 #define PAGE_SHIFT		12
+#define CONT_SHIFT		4
 #endif
-#define PAGE_SIZE		(_AC(1,UL) << PAGE_SHIFT)
+#define PAGE_SIZE		(_AC(1, UL) << PAGE_SHIFT)
 #define PAGE_MASK		(~(PAGE_SIZE-1))
 
+#define CONT_SIZE		(_AC(1, UL) << (CONT_SHIFT + PAGE_SHIFT))
+#define CONT_MASK		(~(CONT_SIZE-1))
+
 /*
  * The idmap and swapper page tables need some space reserved in the kernel
  * image. Both require pgd, pud (4 levels only) and pmd tables to (section)
-- 
2.4.3



  reply	other threads:[~2015-09-16 19:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-16 19:02 [PATCH 0/7] arm64: Use contigous PTE bit for the kernel linear mapping Jeremy Linton
2015-09-16 19:03 ` Jeremy Linton [this message]
2015-09-16 19:03 ` [PATCH 2/7] arm64: Shorten lines which exceed 80 characters Jeremy Linton
2015-09-17  9:45   ` Catalin Marinas
2015-09-16 19:03 ` [PATCH 3/7] arm64: PTE/PMD contiguous bit definition Jeremy Linton
2015-09-16 19:03 ` [PATCH 4/7] arm64: Macros to check/set/unset the contiguous bit Jeremy Linton
2015-09-16 19:03 ` [PATCH 5/7] arm64: Default kernel pages should be contiguous Jeremy Linton
2015-09-16 19:03 ` [PATCH 6/7] arm64: Make the kernel page dump utility aware of the CONT bit Jeremy Linton
2015-09-18  7:02   ` Huang Shijie
2015-09-18  8:35   ` Huang Shijie
2015-09-16 19:03 ` [PATCH 7/7] arm64: Mark kernel page ranges contiguous Jeremy Linton
2015-09-17 17:23   ` Steve Capper
2015-09-17 17:33     ` 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=1442430186-9083-2-git-send-email-jeremy.linton@arm.com \
    --to=jeremy.linton@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=dwoods@ezcip.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shijie.huang@arm.com \
    --cc=steve.capper@arm.com \
    --cc=will.deacon@arm.com \
    /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).