public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Nicholas Piggin <npiggin@gmail•com>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux•ibm.com>,
	mpe@ellerman•id.au, paulus@samba•org
Cc: linuxppc-dev@lists•ozlabs.org
Subject: Re: [PATCH] powerpc/mm/radix: Use the right page size for vmemmap mapping
Date: Mon, 01 Jul 2019 12:17:26 +1000	[thread overview]
Message-ID: <1561947331.l5nlocglj3.astroid@bobo.none> (raw)
In-Reply-To: <20190629073829.13095-1-aneesh.kumar@linux.ibm.com>

Aneesh Kumar K.V's on June 29, 2019 5:38 pm:
> Also on hash with 4K PAGE_SIZE make sure we use 4K page size for
> vmemmap.

Can you add a line in the changelog to describe the radix problem
you fixed?

Also I would say the also could be a separate patch?

Thanks,
Nick

> 
> Fixes: 2bfd65e45e87 ("powerpc/mm/radix: Add radix callbacks for early init routines")
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux•ibm.com>
> ---
>  arch/powerpc/mm/book3s64/hash_utils.c    |  4 +---
>  arch/powerpc/mm/book3s64/radix_pgtable.c | 16 +++++++---------
>  2 files changed, 8 insertions(+), 12 deletions(-)
> 
> diff --git a/arch/powerpc/mm/book3s64/hash_utils.c b/arch/powerpc/mm/book3s64/hash_utils.c
> index 49f8c8940bd9..54013bbc60aa 100644
> --- a/arch/powerpc/mm/book3s64/hash_utils.c
> +++ b/arch/powerpc/mm/book3s64/hash_utils.c
> @@ -686,10 +686,8 @@ static void __init htab_init_page_sizes(void)
>  	if (mmu_psize_defs[MMU_PAGE_16M].shift &&
>  	    memblock_phys_mem_size() >= 0x40000000)
>  		mmu_vmemmap_psize = MMU_PAGE_16M;
> -	else if (mmu_psize_defs[MMU_PAGE_64K].shift)
> -		mmu_vmemmap_psize = MMU_PAGE_64K;
>  	else
> -		mmu_vmemmap_psize = MMU_PAGE_4K;
> +		mmu_vmemmap_psize = mmu_virtual_psize;
>  #endif /* CONFIG_SPARSEMEM_VMEMMAP */
>  
>  	printk(KERN_DEBUG "Page orders: linear mapping = %d, "
> diff --git a/arch/powerpc/mm/book3s64/radix_pgtable.c b/arch/powerpc/mm/book3s64/radix_pgtable.c
> index 60d97fab4de2..03d804a0dc8c 100644
> --- a/arch/powerpc/mm/book3s64/radix_pgtable.c
> +++ b/arch/powerpc/mm/book3s64/radix_pgtable.c
> @@ -529,14 +529,6 @@ void __init radix__early_init_devtree(void)
>  	mmu_psize_defs[MMU_PAGE_64K].shift = 16;
>  	mmu_psize_defs[MMU_PAGE_64K].ap = 0x5;
>  found:
> -#ifdef CONFIG_SPARSEMEM_VMEMMAP
> -	if (mmu_psize_defs[MMU_PAGE_2M].shift) {
> -		/*
> -		 * map vmemmap using 2M if available
> -		 */
> -		mmu_vmemmap_psize = MMU_PAGE_2M;
> -	}
> -#endif /* CONFIG_SPARSEMEM_VMEMMAP */
>  	return;
>  }
>  
> @@ -601,7 +593,13 @@ void __init radix__early_init_mmu(void)
>  
>  #ifdef CONFIG_SPARSEMEM_VMEMMAP
>  	/* vmemmap mapping */
> -	mmu_vmemmap_psize = mmu_virtual_psize;
> +	if (mmu_psize_defs[MMU_PAGE_2M].shift) {
> +		/*
> +		 * map vmemmap using 2M if available
> +		 */
> +		mmu_vmemmap_psize = MMU_PAGE_2M;
> +	} else
> +		mmu_vmemmap_psize = mmu_virtual_psize;
>  #endif
>  	/*
>  	 * initialize page table size
> -- 
> 2.21.0
> 
> 

      reply	other threads:[~2019-07-01  2:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-29  7:38 [PATCH] powerpc/mm/radix: Use the right page size for vmemmap mapping Aneesh Kumar K.V
2019-07-01  2:17 ` Nicholas Piggin [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=1561947331.l5nlocglj3.astroid@bobo.none \
    --to=npiggin@gmail$(echo .)com \
    --cc=aneesh.kumar@linux$(echo .)ibm.com \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=mpe@ellerman$(echo .)id.au \
    --cc=paulus@samba$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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