Thread (46 messages) 46 messages, 5 authors, 2023-06-27

Re: [PATCH v5 24/33] m68k: Convert various functions to use ptdescs

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2023-06-25 08:51:37
Also in: kvm, linux-arch, linux-arm-kernel, linux-m68k, linux-mips, linux-mm, linux-riscv, linux-s390, linux-sh, linux-um, loongarch, sparclinux, xen-devel

Hi Vishal,

On Thu, Jun 22, 2023 at 10:58 PM Vishal Moola (Oracle)
[off-list ref] wrote:
As part of the conversions to replace pgtable constructor/destructors with
ptdesc equivalents, convert various page table functions to use ptdescs.

Some of the functions use the *get*page*() helper functions. Convert
these to use pagetable_alloc() and ptdesc_address() instead to help
standardize page tables further.

Signed-off-by: Vishal Moola (Oracle) <redacted>
Thanks for your patch!
quoted hunk ↗ jump to hunk
--- a/arch/m68k/include/asm/mcf_pgalloc.h
+++ b/arch/m68k/include/asm/mcf_pgalloc.h
 static inline pgd_t *pgd_alloc(struct mm_struct *mm)
 {
        pgd_t *new_pgd;
+       struct ptdesc *ptdesc = pagetable_alloc((GFP_DMA | GFP_NOWARN) &
0-day already told you for v3 that GFP_NOWARN does not exist.
Please try cross-compiling your changes:
https://mirrors.edge.kernel.org/pub/tools/crosstool/
+                       ~__GFP_HIGHMEM, 0);

-       new_pgd = (pgd_t *)__get_free_page(GFP_DMA | __GFP_NOWARN);
-       if (!new_pgd)
+       if (!ptdesc)
                return NULL;
+       new_pgd = ptdesc_address(ptdesc);
+
        memcpy(new_pgd, swapper_pg_dir, PTRS_PER_PGD * sizeof(pgd_t));
        memset(new_pgd, 0, PAGE_OFFSET >> PGDIR_SHIFT);
        return new_pgd;
Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help