[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2fde44aa-f74a-3948-d444-d04bc1f839eb@arm.com>
Date: Thu, 10 Jun 2021 09:46:10 +0530
From: Anshuman Khandual <anshuman.khandual@....com>
To: Mike Rapoport <rppt@...nel.org>
Cc: linux-mm@...ck.org, akpm@...ux-foundation.org,
Nick Hu <nickhu@...estech.com>,
Richard Henderson <rth@...ddle.net>,
Vineet Gupta <vgupta@...opsys.com>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>, Guo Ren <guoren@...nel.org>,
Brian Cain <bcain@...eaurora.org>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Michal Simek <monstr@...str.eu>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Ley Foon Tan <ley.foon.tan@...el.com>,
Jonas Bonn <jonas@...thpole.se>,
Stefan Kristiansson <stefan.kristiansson@...nalahti.fi>,
Stafford Horne <shorne@...il.com>,
"James E.J. Bottomley" <James.Bottomley@...senpartnership.com>,
Michael Ellerman <mpe@...erman.id.au>,
Christophe Leroy <christophe.leroy@...roup.eu>,
Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>,
Heiko Carstens <hca@...ux.ibm.com>,
Yoshinori Sato <ysato@...rs.sourceforge.jp>,
"David S. Miller" <davem@...emloft.net>,
Jeff Dike <jdike@...toit.com>,
Thomas Gleixner <tglx@...utronix.de>,
Chris Zankel <chris@...kel.net>, linux-arch@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH V2] mm/thp: Define default pmd_pgtable()
On 6/9/21 2:20 PM, Mike Rapoport wrote:
> Hi Anshuman,
>
> On Wed, Jun 09, 2021 at 10:29:59AM +0530, Anshuman Khandual wrote:
>> Currently most platforms define pmd_pgtable() as pmd_page() duplicating the
>> same code all over. Instead just define a default value i.e pmd_page() for
>> pmd_pgtable() and let platforms override when required via <asm/pgtable.h>.
>> All the existing platform that override pmd_pgtable() have been moved into
>> their respective <asm/pgtable.h> header in order to precede before the new
>> generic definition. This makes it much cleaner with reduced code.
>>
>> Cc: Nick Hu <nickhu@...estech.com>
>> Cc: Richard Henderson <rth@...ddle.net>
>> Cc: Vineet Gupta <vgupta@...opsys.com>
>> Cc: Catalin Marinas <catalin.marinas@....com>
>> Cc: Will Deacon <will@...nel.org>
>> Cc: Guo Ren <guoren@...nel.org>
>> Cc: Brian Cain <bcain@...eaurora.org>
>> Cc: Geert Uytterhoeven <geert@...ux-m68k.org>
>> Cc: Michal Simek <monstr@...str.eu>
>> Cc: Thomas Bogendoerfer <tsbogend@...ha.franken.de>
>> Cc: Ley Foon Tan <ley.foon.tan@...el.com>
>> Cc: Jonas Bonn <jonas@...thpole.se>
>> Cc: Stefan Kristiansson <stefan.kristiansson@...nalahti.fi>
>> Cc: Stafford Horne <shorne@...il.com>
>> Cc: "James E.J. Bottomley" <James.Bottomley@...senPartnership.com>
>> Cc: Michael Ellerman <mpe@...erman.id.au>
>> Cc: Christophe Leroy <christophe.leroy@...roup.eu>
>> Cc: Paul Walmsley <paul.walmsley@...ive.com>
>> Cc: Palmer Dabbelt <palmer@...belt.com>
>> Cc: Heiko Carstens <hca@...ux.ibm.com>
>> Cc: Yoshinori Sato <ysato@...rs.sourceforge.jp>
>> Cc: "David S. Miller" <davem@...emloft.net>
>> Cc: Jeff Dike <jdike@...toit.com>
>> Cc: Thomas Gleixner <tglx@...utronix.de>
>> Cc: Chris Zankel <chris@...kel.net>
>> Cc: Andrew Morton <akpm@...ux-foundation.org>
>> Cc: linux-arch@...r.kernel.org
>> Cc: linux-mm@...ck.org
>> Cc: linux-kernel@...r.kernel.org
>> Signed-off-by: Anshuman Khandual <anshuman.khandual@....com>
> One nit below, otherwise
>
> Acked-by: Mike Rapoport <rppt@...ux.ibm.com>
>
>> ---
>> This patch applies on linux-next (20210608) as there is a merge conflict
>> dependency on the following commit.
>>
>> 40762590e8be ("mm: define default value for FIRST_USER_ADDRESS").
>>
>> This patch has been built tested across multiple platforms.
>>
>> Changes in V2:
>>
>> - Changed m68k per Geert
>>
>> Changes in V1:
>>
>> https://lore.kernel.org/linux-arch/1623130327-13325-1-git-send-email-anshuman.khandual@arm.com/
> ...
>
>> diff --git a/arch/m68k/include/asm/sun3_pgalloc.h b/arch/m68k/include/asm/sun3_pgalloc.h
>> index 000f64869b91..198036aff519 100644
>> --- a/arch/m68k/include/asm/sun3_pgalloc.h
>> +++ b/arch/m68k/include/asm/sun3_pgalloc.h
>> @@ -32,7 +32,6 @@ static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, pgtable_t page
>> {
>> pmd_val(*pmd) = __pa((unsigned long)page_address(page));
>> }
>> -#define pmd_pgtable(pmd) pmd_page(pmd)
>>
>> /*
>> * allocating and freeing a pmd is trivial: the 1-entry pmd is
>> diff --git a/arch/m68k/include/asm/sun3_pgtable.h b/arch/m68k/include/asm/sun3_pgtable.h
>> index 5b24283a0a42..127282bd8b96 100644
>> --- a/arch/m68k/include/asm/sun3_pgtable.h
>> +++ b/arch/m68k/include/asm/sun3_pgtable.h
>> @@ -96,6 +96,8 @@
>>
>> #ifndef __ASSEMBLY__
>>
>> +#define pmd_pgtable(pmd) pmd_page(pmd)
>> +
> Is this one really needed? Won't the generic definition work instead?
>
It should, sun3_defconfig builds without problem. Will drop pmd_pgtable() here.
Powered by blists - more mailing lists