[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdXd=eha_pRNGCFHN7sS2OOh60cj=c=yPUyg_-J0S8V8yQ@mail.gmail.com>
Date: Thu, 26 Jun 2025 10:38:48 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: "Vishal Moola (Oracle)" <vishal.moola@...il.com>
Cc: linux-m68k@...ts.linux-m68k.org, linux-kernel@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 1/4] m68k: mm: Convert get_pointer_table() to use ptdescs
Hi Vishal,
On Wed, 11 Jun 2025 at 02:13, Vishal Moola (Oracle)
<vishal.moola@...il.com> wrote:
> Motorola uses get_pointer_table() for page tables, so it should be using
> struct ptdesc, not struct page.
>
> This helps us prepare to allocate ptdescs as their own memory
> descriptor, and prepares to remove a user of page->lru.
>
> Signed-off-by: Vishal Moola (Oracle) <vishal.moola@...il.com>
Thanks for your patch!
Reviewed-by: Geert Uytterhoeven <geert@...ux-m68k.org>
i.e. will queue in the m68k tree for v6.17, with the small changes
described below.
> --- a/arch/m68k/mm/motorola.c
> +++ b/arch/m68k/mm/motorola.c
> @@ -148,16 +148,18 @@ void *get_pointer_table(struct mm_struct *mm, int type)
>
> /*
> * For a pointer table for a user process address space, a
> - * table is taken from a page allocated for the purpose. Each
> - * page can hold 8 pointer tables. The page is remapped in
> + * table is taken from a ptdesc allocated for the purpose. Each
> + * ptdesc can hold 8 pointer tables. The ptdesc is remapped in
> * virtual address space to be noncacheable.
> */
> if (mask == 0) {
> - void *page;
> + struct ptdesc *ptdesc = pagetable_alloc(GFP_KERNEL | __GFP_ZERO, 0);
I will move the assignment just before the NULL-check below, to ease
applying the WIP preempt patches on top.
> + void *pt_addr;
I will move this one line down, to follow the reverse Xmas rule.
> ptable_desc *new;
>
> - if (!(page = (void *)get_zeroed_page(GFP_KERNEL)))
> + if (!ptdesc)
> return NULL;
> + pt_addr = ptdesc_address(ptdesc);
>
> switch (type) {
> case TABLE_PTE:
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists