Re: [PATCH] x86/head: Refactor 32-bit pgtable setup

From: Ingo Molnar
Date: Thu Jan 05 2017 - 03:54:56 EST



* Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx> wrote:

> The new Xen PVH entry point requires page tables to be setup by the
> kernel since it is entered with paging disabled.
>
> Pull the common code out of head_32.S so that mk_early_pgtbl_32 can be
> invoked from both the new Xen entry point and the existing startup_32
> code.
>
> Convert resulting common code to C.
>
> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
> ---
> This is replacement for https://lkml.org/lkml/2016/10/14/434, with
> assembly code re-written in C as requested by Ingo.
>
>
> arch/x86/include/asm/pgtable_32.h | 32 ++++++++++
> arch/x86/kernel/head32.c | 62 +++++++++++++++++++
> arch/x86/kernel/head_32.S | 122 +++-----------------------------------
> 3 files changed, 101 insertions(+), 115 deletions(-)

Yeah, so (belatedly) I tried to merge this to latest upstream, via the commit
below (note the slight edits to the changelog) - but 32-bit defconfig fails to
build:

arch/x86/kernel/head_32.S:615: Error: can't resolve `init_thread_union' {*UND* section} - `SIZEOF_PTREGS' {*UND* section}

Thanks,

Ingo

=======================>