
Date: Thu, 2 Feb 2012 09:41:46 +0900
Subject: [PATCH 4/4] ppc: define BookE page table format

BookE provides 64bit physical address and translates virtual address
by extending PGD to 16KB table (two-level translation).
Thus PTRS_PER_PTE owns 512 indices, PTRS_PER_PGD owns 2048 indices,
and fill PGD with 16KB buffer to access whole virtual address space.

Signed-off-by: Toshikazu Nakayama <nakayama.ts@ncos.nec.co.jp>
---
 defs.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/defs.h b/defs.h
index 68169b1..b6c7cd9 100755
--- a/defs.h
+++ b/defs.h
@@ -2614,6 +2614,12 @@ extern int PTE_TABLE_SIZE;
 #define PTRS_PER_PGD_DEFAULT	(1024)
 #define PGD_TABLE_SIZE_DEFAULT	(1 << 12)
 #define PTE_TABLE_SIZE_DEFAULT	(1 << 12)
+/* BookE page table format */
+#define PGDIR_SHIFT_PPC44X	(21)
+#define PTRS_PER_PTE_PPC44X	(512)
+#define PTRS_PER_PGD_PPC44X	(2048)
+#define PGD_TABLE_SIZE_PPC44X	(1 << 12)
+#define PTE_TABLE_SIZE_PPC44X	(1 << 14)
 
 #define _PAGE_PRESENT   0x001   /* software: pte contains a translation */
 #define _PAGE_USER      0x002   /* matches one of the PP bits */
-- 
1.7.8.163.g9859a


