Re: [RESEND v7 03/29] loongarch: mm: add PMD swap-exclusive helpers

From: David Hildenbrand (Arm)

Date: Fri Sep 18 2026 - 17:18:39 EST


On 9/14/26 14:27, Usama Arif wrote:
> A later patch keeps a PMD-mapped anonymous THP mapped by a PMD across the
> swap round-trip, so PG_anon_exclusive now has to survive in a swap PMD and
> not just in a swap PTE.
>
> A LoongArch swap PMD is the swap PTE value plus _PAGE_HUGE, and
> _PAGE_SWP_EXCLUSIVE sits outside both the type and the offset field, so the
> PMD helpers can use the same bit.
>
> Cc: Huacai Chen <chenhuacai@xxxxxxxxxx>
> Signed-off-by: Usama Arif <usama.arif@xxxxxxxxx>
> ---

Reviewed-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>

--
Cheers,

David