[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 3 Mar 2023 14:38:41 +0000
From: Matthew Wilcox <willy@...radead.org>
To: Mike Rapoport <rppt@...nel.org>
Cc: linux-mm@...ck.org, linux-arch@...r.kernel.org,
linux-kernel@...r.kernel.org, Michal Simek <monstr@...str.eu>
Subject: Re: [PATCH v3 14/34] microblaze: Implement the new page table range
API
On Fri, Mar 03, 2023 at 12:53:36PM +0200, Mike Rapoport wrote:
> On Tue, Feb 28, 2023 at 09:37:17PM +0000, Matthew Wilcox (Oracle) wrote:
> > +static inline void set_ptes(struct mm_struct *mm, unsigned long addr,
> > + pte_t *ptep, pte_t pte, unsigned int nr)
> > {
> > - *ptep = pte;
> > + for (;;) {
> > + set_pte(ptep, pte);
> > + if (--nr == 0)
> > + break;
> > + ptep++;
> > + pte_val(pte) += 1 << PFN_SHIFT_OFFSET;
>
> This is the same as
>
> pte_val(pte) += PAGE_SIZE;
>
> isn't it?
Looks like it. Based on this:
$ git grep PFN_SHIFT_OFFSET arch/microblaze/
arch/microblaze/include/asm/pgtable.h:#define PFN_SHIFT_OFFSET (PAGE_SHIFT)
arch/microblaze/include/asm/pgtable.h:#define pte_pfn(x) (pte_val(x) >> PFN_SHIFT_OFFSET)
I only looked at the definition of pte_pfn(); I didn't look to see how
PFN_SHIFT_OFFSET was defined. I don't see the need to change it from
what I have though?
Powered by blists - more mailing lists