[PATCH 1/2] powerpc/mm/64s: Drop pgd_huge()

Michael Ellerman mpe at ellerman.id.au
Sun Sep 4 21:24:23 AEST 2022


Christophe Leroy <christophe.leroy at csgroup.eu> writes:
> Le 03/09/2022 à 14:36, Michael Ellerman a écrit :
>
> ...
>
>> 
>> However in commit ba95b5d03596 ("powerpc/mm/book3s/64: Rework page table
>> geometry for lower memory usage") the page table layout was reworked to
>> shrink the size of the PGD.
>> 
>> As a result the 16GB page size now fits at the PUD level when using 64K
>> base page size.
>> 
>> Therefore there are no longer any supported configurations where
>> pgd_huge() can be true, so drop the definitions for pgd_huge(), and
>> fallback to the generic definition which is always false.
>
> We also have pgd_huge defined as always false in:
>   arch/powerpc/include/asm/page.h
>   arch/powerpc/include/asm/nohash/pgtable.h
>
> Those could be removed as well as there is a default definition in 
> include/linux/hugetlb.h
 
Yep.

> And then all uses of pgd_huge() in the core mm can be dropped because 
> powerpc was the only user.

The original reason I looked at this is because Mike was looking at
things on the mm side and noticed that we were the only user of
pgd_huge().

So yeah I think it can be removed from core mm, but I'll leave that up
to the mm folks. There are already some other changes in that area in
flight that could conflict if I try to do more extensive changes in this
series.

cheers


More information about the Linuxppc-dev mailing list