From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com,
x86@kernel.org, linux-kernel@vger.kernel.org,
xen-devel@lists.xenproject.org, matt@codeblueprint.co.uk
Subject: Re: [PATCH] x86/head: Refactor 32-bit pgtable setup
Date: Thu, 5 Jan 2017 09:17:43 -0500 [thread overview]
Message-ID: <c9031b26-d349-9dd0-f8bf-bef15a8fa7ee@oracle.com> (raw)
In-Reply-To: <20170105085252.GA15715@gmail.com>
On 01/05/2017 03:52 AM, Ingo Molnar wrote:
>
> 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}
When you dropped MAPPING_BEYOND_END (that I indeed should have removed)
you left comment opening in the wrong place:
> diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S
> index 4e8577d03372..eca1c93c38e8 100644
> --- a/arch/x86/kernel/head_32.S
> +++ b/arch/x86/kernel/head_32.S
> @@ -24,6 +24,7 @@
> #include <asm/nops.h>
> #include <asm/bootparam.h>
> #include <asm/export.h>
> +#include <asm/pgtable_32.h>
>
> /* Physical address */
> #define pa(X) ((X) - __PAGE_OFFSET)
> @@ -42,43 +43,8 @@
> #define X86_VENDOR_ID new_cpu_data+CPUINFO_x86_vendor_id
This one:
>
> /*
> - * This is how much memory in addition to the memory covered up to
> - * and including _end we need mapped initially.
> - * We need:
> - * (KERNEL_IMAGE_SIZE/4096) / 1024 pages (worst case, non PAE)
> - * (KERNEL_IMAGE_SIZE/4096) / 512 + 4 pages (worst case for PAE)
> - *
> - * Modulo rounding, each megabyte assigned here requires a kilobyte of
> - * memory, which is currently unreclaimed.
> - *
> - * This should be a multiple of a page.
> - *
> - * KERNEL_IMAGE_SIZE should be greater than pa(_end)
> - * and small than max_low_pfn, otherwise will waste some page table entries
> - */
> -
> -#if PTRS_PER_PMD > 1
> -#define PAGE_TABLE_SIZE(pages) (((pages) / PTRS_PER_PMD) + PTRS_PER_PGD)
> -#else
> -#define PAGE_TABLE_SIZE(pages) ((pages) / PTRS_PER_PGD)
> -#endif
> -
> #define SIZEOF_PTREGS 17*4
>
In other words, this version of the patch needs:
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S
index eca1c93..1f85ee8 100644
--- a/arch/x86/kernel/head_32.S
+++ b/arch/x86/kernel/head_32.S
@@ -42,9 +42,10 @@
#define X86_CAPABILITY new_cpu_data+CPUINFO_x86_capability
#define X86_VENDOR_ID new_cpu_data+CPUINFO_x86_vendor_id
-/*
+
#define SIZEOF_PTREGS 17*4
+/*
* Worst-case size of the kernel mapping we need to make:
* a relocatable kernel can live anywhere in lowmem, so we need to be able
* to map all of lowmem.
-boris
next prev parent reply other threads:[~2017-01-05 14:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-08 16:44 [PATCH] x86/head: Refactor 32-bit pgtable setup Boris Ostrovsky
2016-12-09 4:33 ` Ingo Molnar
2016-12-09 14:33 ` Boris Ostrovsky
2016-12-18 8:44 ` Ingo Molnar
2016-12-19 14:09 ` Boris Ostrovsky
2017-01-05 8:52 ` Ingo Molnar
2017-01-05 14:17 ` Boris Ostrovsky [this message]
2017-01-05 20:12 ` [PATCH] x86/boot/32: Convert the 32-bit pgtable setup code from assembly to C kbuild test robot
2017-01-06 11:00 ` [tip:x86/boot] " tip-bot for Boris Ostrovsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c9031b26-d349-9dd0-f8bf-bef15a8fa7ee@oracle.com \
--to=boris.ostrovsky@oracle.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=matt@codeblueprint.co.uk \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).