Re: [RFC PATCH 02/34] ARM: mm: make 2-level pgd_t a scalar

Yeoreum Yun <[email protected]> Thu, 16 Jul 2026 11:56:58 +0100
Newsgroups org.kernel.vger.linux-csky,dev.linux.lists.loongarch,org.infradead.lists.kvm-riscv,org.infradead.lists.linux-riscv,org.kernel.vger.linux-arch,org.kernel.vger.linux-kernel,org.kernel.vger.linux-m68k,org.kernel.vger.linux-mips,org.kernel.vger.linux-openrisc,org.kvack.linux-mm
Message-ID <[email protected]>
Hi,

> On Mon, Jul 13, 2026, at 15:55, Yeoreum Yun wrote:
> 
> >  typedef pteval_t pte_t;
> >  typedef pmdval_t pmd_t;
> > -typedef pmdval_t pgd_t[2];
> > +typedef pgdval_t pgd_t;
> >  typedef pteval_t pgprot_t;
> > 
> 
> Just noticed one more issue here, I think this will break these
> two macros that now access four entries instead of two:
> 
> #define copy_pmd(pmdpd,pmdps)           \
>         do {                            \
>                 pmdpd[0] = pmdps[0];    \
>                 pmdpd[1] = pmdps[1];    \
>                 flush_pmd_entry(pmdpd); \
>         } while (0)
> 
> #define pmd_clear(pmdp)                 \
>         do {                            \
>                 pmdp[0] = __pmd(0);     \
>                 pmdp[1] = __pmd(0);     \
>                 clean_pmd_entry(pmdp);  \
>         } while (0)
> 
>     Arnd

I don't this this change wouldn't affect for this macros since
both of them still uses *pmd_t* which is u32.
So it still only changes tow entries.

-- 
Sincerely,
Yeoreum Yun