Re: [PATCH v2 12/13] um: add support for folded p4d page tables

From: Richard Weinberger
Date: Fri Nov 01 2019 - 05:20:16 EST


----- UrsprÃngliche Mail -----
> Von: "Mike Rapoport" <rppt@xxxxxxxxxx>

[...]

> #define pte_page(x) pfn_to_page(pte_pfn(x))
> diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c
> index 417ff64..6fd17bc 100644
> --- a/arch/um/kernel/mem.c
> +++ b/arch/um/kernel/mem.c
> @@ -92,10 +92,26 @@ static void __init one_md_table_init(pud_t *pud)
> #endif
> }
>
> +static void __init one_pud_table_init(p4d_t *p4d)
> +{
> +#if CONFIG_PGTABLE_LEVELS > 3

Isn't this dead code?

For uml we have:
config PGTABLE_LEVELS
int
default 3 if 3_LEVEL_PGTABLES
default 2

Thanks,
//richard