From: Paul Mackerras <paulus@ozlabs.org>
To: linuxppc-dev@ozlabs.org
Cc: Michael Ellerman <mpe@ellerman.id.au>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Subject: [PATCH 9/9] powerpc/mm/book3s-64: Expand the real page number field of the Linux PTE
Date: Mon, 22 Feb 2016 13:41:20 +1100 [thread overview]
Message-ID: <1456108880-27464-10-git-send-email-paulus@ozlabs.org> (raw)
In-Reply-To: <1456108880-27464-1-git-send-email-paulus@ozlabs.org>
From: Paul Mackerras <paulus@samba.org>
Now that other PTE fields have been moved out of the way, we can
expand the RPN field of the PTE on 64-bit Book 3S systems and align
it with the RPN field in the radix PTE format used by PowerISA v3.0
CPUs in radix mode. For 64k page size, this means we need to move
the _PAGE_COMBO and _PAGE_4K_PFN bits.
Signed-off-by: Paul Mackerras <paulus@samba.org>
---
arch/powerpc/include/asm/book3s/64/hash-4k.h | 4 ++--
arch/powerpc/include/asm/book3s/64/hash-64k.h | 12 ++++++------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/arch/powerpc/include/asm/book3s/64/hash-4k.h b/arch/powerpc/include/asm/book3s/64/hash-4k.h
index 0425d3e..7f60f7e 100644
--- a/arch/powerpc/include/asm/book3s/64/hash-4k.h
+++ b/arch/powerpc/include/asm/book3s/64/hash-4k.h
@@ -52,8 +52,8 @@
_PAGE_F_SECOND | _PAGE_F_GIX)
/* shift to put page number into pte */
-#define PTE_RPN_SHIFT (18)
-#define PTE_RPN_SIZE (39) /* gives 51-bit real addresses */
+#define PTE_RPN_SHIFT (12)
+#define PTE_RPN_SIZE (45) /* gives 57-bit real addresses */
#define _PAGE_4K_PFN 0
#ifndef __ASSEMBLY__
diff --git a/arch/powerpc/include/asm/book3s/64/hash-64k.h b/arch/powerpc/include/asm/book3s/64/hash-64k.h
index ed390e1..8bb0325 100644
--- a/arch/powerpc/include/asm/book3s/64/hash-64k.h
+++ b/arch/powerpc/include/asm/book3s/64/hash-64k.h
@@ -25,8 +25,8 @@
#define PGDIR_SIZE (1UL << PGDIR_SHIFT)
#define PGDIR_MASK (~(PGDIR_SIZE-1))
-#define _PAGE_COMBO 0x00040000 /* this is a combo 4k page */
-#define _PAGE_4K_PFN 0x00080000 /* PFN is for a single 4k page */
+#define _PAGE_COMBO 0x00001000 /* this is a combo 4k page */
+#define _PAGE_4K_PFN 0x00002000 /* PFN is for a single 4k page */
/*
* Used to track subpage group valid if _PAGE_COMBO is set
* This overloads _PAGE_F_GIX and _PAGE_F_SECOND
@@ -39,11 +39,11 @@
/* Shift to put page number into pte.
*
- * That gives us a max RPN of 37 bits, which means a max of 53 bits
- * of addressable physical space, or 49 bits for the special 4k PFNs.
+ * That gives us a max RPN of 41 bits, which means a max of 57 bits
+ * of addressable physical space, or 53 bits for the special 4k PFNs.
*/
-#define PTE_RPN_SHIFT (20)
-#define PTE_RPN_SIZE (37)
+#define PTE_RPN_SHIFT (16)
+#define PTE_RPN_SIZE (41)
/*
* we support 16 fragments per PTE page of 64K size.
--
2.6.4
prev parent reply other threads:[~2016-02-22 2:41 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-22 2:41 [PATCH 0/9] powerpc/mm: Restructure Linux PTE on Book3S/64 to radix format Paul Mackerras
2016-02-22 2:41 ` [PATCH 1/9] powerpc/mm/book3s-64: Clean up some obsolete or misleading comments Paul Mackerras
2016-02-29 11:05 ` [1/9] " Michael Ellerman
2016-02-22 2:41 ` [PATCH 2/9] powerpc/mm/book3s-64: Free up 7 high-order bits in the Linux PTE Paul Mackerras
2016-02-22 2:41 ` [PATCH 3/9] powerpc/mm/book3s-64: Use physical addresses in upper page table tree levels Paul Mackerras
2016-02-22 4:55 ` Aneesh Kumar K.V
2016-02-23 1:16 ` Paul Mackerras
2016-02-22 7:06 ` Aneesh Kumar K.V
2016-02-23 1:19 ` Paul Mackerras
2016-02-23 2:36 ` [PATCH v2 " Paul Mackerras
2016-02-22 2:41 ` [PATCH 4/9] powerpc/mm/book3s-64: Move _PAGE_PRESENT to the most significant bit Paul Mackerras
2016-02-22 2:41 ` [PATCH 5/9] powerpc/mm/book3s-64: Move _PAGE_PTE to 2nd " Paul Mackerras
2016-02-22 2:41 ` [PATCH 6/9] powerpc/mm/book3s-64: Move HPTE-related bits in PTE to upper end Paul Mackerras
2016-02-22 2:41 ` [PATCH 7/9] powerpc/mm/book3s-64: Shuffle read, write, execute and user bits in PTE Paul Mackerras
2016-02-22 2:41 ` [PATCH 8/9] powerpc/mm/book3s-64: Move software-used " Paul Mackerras
2016-02-22 2:41 ` Paul Mackerras [this message]
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=1456108880-27464-10-git-send-email-paulus@ozlabs.org \
--to=paulus@ozlabs.org \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=mpe@ellerman.id.au \
/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).