Re: [PATCH] Revert "MIPS: add PMD table accounting into MIPS'pmd_alloc_one"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 26, 2021 at 03:26:42PM +0800, Huang Pei wrote:
> This reverts commit 002d8b395fa1c0679fc3c3e68873de6c1cc300a2.
> 
> Commit b2b29d6d011944 (mm: account PMD tables like PTE tables) is
> introduced between v5.9 and v5.10, so this fix (commit 002d8b395fa1)
> should NOT apply to any pre-5.10 branch.
> 
> Signed-off-by: Huang Pei <huangpei@xxxxxxxxxxx>
> ---
>  arch/mips/include/asm/pgalloc.h | 10 +++-------
>  1 file changed, 3 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/mips/include/asm/pgalloc.h b/arch/mips/include/asm/pgalloc.h
> index dd10854321ca..166842337eb2 100644
> --- a/arch/mips/include/asm/pgalloc.h
> +++ b/arch/mips/include/asm/pgalloc.h
> @@ -62,15 +62,11 @@ do {							\
>  
>  static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address)
>  {
> -	pmd_t *pmd = NULL;
> -	struct page *pg;
> +	pmd_t *pmd;
>  
> -	pg = alloc_pages(GFP_KERNEL | __GFP_ACCOUNT, PMD_ORDER);
> -	if (pg) {
> -		pgtable_pmd_page_ctor(pg);
> -		pmd = (pmd_t *)page_address(pg);
> +	pmd = (pmd_t *) __get_free_pages(GFP_KERNEL, PMD_ORDER);
> +	if (pmd)
>  		pmd_init((unsigned long)pmd, (unsigned long)invalid_pte_table);
> -	}
>  	return pmd;
>  }
>  
> -- 
> 2.25.1
> 

Queued up everywhere, thanks.

greg k-h



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux