lkml.org 
[lkml]   [2019]   [Dec]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 2/2] sh: add support for folded p4d page tables
Hi Mike,

On Tue, Dec 17, 2019 at 3:23 PM Mike Rapoport <rppt@kernel.org> wrote:
> From: Mike Rapoport <rppt@linux.ibm.com>
>
> Implement primitives necessary for the 4th level folding, add walks of p4d
> level where appropriate and remove usage of __ARCH_USE_5LEVEL_HACK.
>
> Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>

Thanks for your patch!

> --- a/arch/sh/mm/fault.c
> +++ b/arch/sh/mm/fault.c
> @@ -65,7 +66,20 @@ static void show_pte(struct mm_struct *mm, unsigned long addr)
> break;
> }
>
> - pud = pud_offset(pgd, addr);
> + p4d = p4d_offset(pgd, addr);
> + if (PTRS_PER_P4D != 1)
> + printk(", *p4d=%0*Lx", (u32)(sizeof(*p4d) * 2),
> + (u64)p4d_val(*p4d));

This (and the prints below) is gonna cause lots of broken output lines.
You should use pr_cont() instead, and probably rebase on top of my
"[PATCH 7/7] sh: fault: Modernize printing of kernel messages"
(https://lore.kernel.org/lkml/20191203162645.19950-8-geert+renesas@glider.be/).

> +
> + if (p4d_none(*p4d))
> + break;
> +
> + if (p4d_bad(*p4d)) {
> + printk("(bad)");
> + break;
> + }
> +
> + pud = pud_offset(p4d, addr);
> if (PTRS_PER_PUD != 1)
> printk(", *pud=%0*Lx", (u32)(sizeof(*pud) * 2),
> (u64)pud_val(*pud));

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

\
 
 \ /
  Last update: 2019-12-17 19:00    [W:0.074 / U:4.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site