powerpc/mm/hash64: Increase the VA range
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Mon, 26 Mar 2018 10:04:49 +0000 (15:34 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 30 Mar 2018 13:10:38 +0000 (00:10 +1100)
This patch increases the max virtual (effective) address value to 4PB.
With 4K page size config we continue to limit ourself to 64TB.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
[mpe: Keep the H_PGTABLE_RANGE test, update it to work]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/book3s/64/hash-64k.h
arch/powerpc/include/asm/processor.h
arch/powerpc/mm/init_64.c
arch/powerpc/mm/pgtable-hash64.c
arch/powerpc/mm/pgtable_64.c

index f7a4f5cbf63e8284d658f2fdad5faf26924a7301..eb393135d0543b25892e96bcdf322df42c35c9ad 100644 (file)
@@ -4,7 +4,7 @@
 
 #define H_PTE_INDEX_SIZE  8
 #define H_PMD_INDEX_SIZE  10
-#define H_PUD_INDEX_SIZE  7
+#define H_PUD_INDEX_SIZE  10
 #define H_PGD_INDEX_SIZE  8
 
 /*
index 75b084486ce11b344e3555a624246411e7fcf46b..bb9cb25ffb2010f7c10de0fd4e1d4bb247098ecd 100644 (file)
@@ -109,6 +109,13 @@ void release_thread(struct task_struct *);
 #define TASK_SIZE_64TB  (0x0000400000000000UL)
 #define TASK_SIZE_128TB (0x0000800000000000UL)
 #define TASK_SIZE_512TB (0x0002000000000000UL)
+#define TASK_SIZE_1PB   (0x0004000000000000UL)
+#define TASK_SIZE_2PB   (0x0008000000000000UL)
+/*
+ * With 52 bits in the address we can support
+ * upto 4PB of range.
+ */
+#define TASK_SIZE_4PB   (0x0010000000000000UL)
 
 /*
  * For now 512TB is only supported with book3s and 64K linux page size.
@@ -117,7 +124,7 @@ void release_thread(struct task_struct *);
 /*
  * Max value currently used:
  */
-#define TASK_SIZE_USER64               TASK_SIZE_512TB
+#define TASK_SIZE_USER64               TASK_SIZE_4PB
 #define DEFAULT_MAP_WINDOW_USER64      TASK_SIZE_128TB
 #define TASK_CONTEXT_SIZE              TASK_SIZE_512TB
 #else
index fdb424a29f0358743ed2d03907065f75a9bc1e72..63470b06c50295632c7a0bfc9397d2a7ad78c331 100644 (file)
 
 #include "mmu_decl.h"
 
-#ifdef CONFIG_PPC_BOOK3S_64
-#if H_PGTABLE_RANGE > USER_VSID_RANGE
-#warning Limited user VSID range means pagetable space is wasted
-#endif
-#endif /* CONFIG_PPC_BOOK3S_64 */
-
 phys_addr_t memstart_addr = ~0;
 EXPORT_SYMBOL_GPL(memstart_addr);
 phys_addr_t kernstart_addr;
index a87b18cf67492281cb1d44555c1a44e59b322527..199bfda5f0d96dd8b85a567dd4966ee3fca33965 100644 (file)
 #define CREATE_TRACE_POINTS
 #include <trace/events/thp.h>
 
+#if H_PGTABLE_RANGE > (USER_VSID_RANGE * (TASK_SIZE_USER64 / TASK_CONTEXT_SIZE))
+#warning Limited user VSID range means pagetable space is wasted
+#endif
+
 #ifdef CONFIG_SPARSEMEM_VMEMMAP
 /*
  * vmemmap is the starting address of the virtual address space where
index adf469f312f2044b9b4035a201b63b3da393e6ce..9bf659d5078c85506fa46636bdf8330d7877ba53 100644 (file)
 
 #include "mmu_decl.h"
 
-#ifdef CONFIG_PPC_BOOK3S_64
-#if TASK_SIZE_USER64 > (1UL << (ESID_BITS + SID_SHIFT))
-#error TASK_SIZE_USER64 exceeds user VSID range
-#endif
-#endif
 
 #ifdef CONFIG_PPC_BOOK3S_64
 /*