[PATCH v4 2/8] powerpc/mm/hash64: Map all the kernel regions in the same 0xc range

Aneesh Kumar K.V aneesh.kumar at linux.ibm.com
Thu Apr 18 13:47:24 AEST 2019


On 4/17/19 6:29 PM, Aneesh Kumar K.V wrote:
> This patch maps vmalloc, IO and vmemap regions in the 0xc address range
> instead of the current 0xd and 0xf range. This brings the mapping closer
> to radix translation mode.
> 
> With hash 64K page size each of this region is 512TB whereas with 4K config
> we are limited by the max page table range of 64TB and hence there regions
> are of 16TB size.
> 
> The kernel mapping is now:
> 
>   On 4K hash
> 
>       kernel_region_map_size = 16TB
>       kernel vmalloc start   = 0xc000100000000000
>       kernel IO start        = 0xc000200000000000
>       kernel vmemmap start   = 0xc000300000000000
> 
> 64K hash, 64K radix and 4k radix:
> 
>       kernel_region_map_size = 512TB
>       kernel vmalloc start   = 0xc008000000000000
>       kernel IO start        = 0xc00a000000000000
>       kernel vmemmap start   = 0xc00c000000000000

I missed this when sending out the patch.

diff --git a/arch/powerpc/mm/pgtable-radix.c 
b/arch/powerpc/mm/pgtable-radix.c
index 263c3ff662c3..30fc0909f1d8 100644
--- a/arch/powerpc/mm/pgtable-radix.c
+++ b/arch/powerpc/mm/pgtable-radix.c
@@ -136,7 +136,7 @@ static int __map_kernel_page(unsigned long ea, 
unsigned long pa,
         BUILD_BUG_ON(TASK_SIZE_USER64 > RADIX_PGTABLE_RANGE);

  #ifdef CONFIG_PPC_64K_PAGES
-       BUILD_BUG_ON(RADIX_KERN_MAP_SIZE != MAX_EA_BITS_PER_CONTEXT);
+       BUILD_BUG_ON(RADIX_KERN_MAP_SIZE != (1UL << 
MAX_EA_BITS_PER_CONTEXT));
  #endif

         if (unlikely(!slab_is_available()))





More information about the Linuxppc-dev mailing list