Re: [PATCH v2 1/7] mm/ppc: Define pXd_large() with pXd_leaf()
From: Jason Gunthorpe
Date: Mon Mar 04 2024 - 07:57:12 EST
On Thu, Feb 29, 2024 at 04:42:52PM +0800, peterx@xxxxxxxxxx wrote:
> From: Peter Xu <peterx@xxxxxxxxxx>
>
> 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@xxxxxxxxxxxxxx>
> Cc: Nicholas Piggin <npiggin@xxxxxxxxx>
> Cc: Christophe Leroy <christophe.leroy@xxxxxxxxxx>
> Cc: "Aneesh Kumar K.V" <aneesh.kumar@xxxxxxxxxx>
> Cc: "Naveen N. Rao" <naveen.n.rao@xxxxxxxxxxxxx>
> Cc: linuxppc-dev@xxxxxxxxxxxxxxxx
> Signed-off-by: Peter Xu <peterx@xxxxxxxxxx>
> ---
> 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@xxxxxxxxxx>
Jason