[PATCH v2 1/7] mm/ppc: Define pXd_large() with pXd_leaf()

Jason Gunthorpe jgg at nvidia.com
Mon Mar 4 23:56:58 AEDT 2024


On Thu, Feb 29, 2024 at 04:42:52PM +0800, peterx at redhat.com wrote:
> From: Peter Xu <peterx at redhat.com>
> 
> The two definitions are the same.  The only difference is that pXd_large()
> is only defined with THP selected, and only on book3s 64bits.
> 
> Instead of implementing it twice, make pXd_large() a macro to pXd_leaf().
> Define it unconditionally just like pXd_leaf().  This helps to prepare
> merging the two APIs.
> 
> Cc: Michael Ellerman <mpe at ellerman.id.au>
> Cc: Nicholas Piggin <npiggin at gmail.com>
> Cc: Christophe Leroy <christophe.leroy at csgroup.eu>
> Cc: "Aneesh Kumar K.V" <aneesh.kumar at kernel.org>
> Cc: "Naveen N. Rao" <naveen.n.rao at linux.ibm.com>
> Cc: linuxppc-dev at lists.ozlabs.org
> Signed-off-by: Peter Xu <peterx at redhat.com>
> ---
>  arch/powerpc/include/asm/book3s/64/pgtable.h | 16 ++--------------
>  arch/powerpc/include/asm/pgtable.h           |  2 +-
>  2 files changed, 3 insertions(+), 15 deletions(-)

Reviewed-by: Jason Gunthorpe <jgg at nvidia.com>

Jason


More information about the Linuxppc-dev mailing list