Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1602055

Re: [PATCH v7 1/3] x86/mm: Adapt MODULES_END based on Fixmap section size

From Ingo Molnar <mingo@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH v7 1/3] x86/mm: Adapt MODULES_END based on Fixmap section size
Date 2017-03-16 09:20 +0100
Message-ID <tlyNA-3TH-13@gated-at.bofh.it> (permalink)
References <tkY7o-3hF-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


* Thomas Garnier <thgarnie@google.com> wrote:

> This patch aligns MODULES_END to the beginning of the Fixmap section.
> It optimizes the space available for both sections. The address is
> pre-computed based on the number of pages required by the Fixmap
> section.
> 
> It will allow GDT remapping in the Fixmap section. The current
> MODULES_END static address does not provide enough space for the kernel
> to support a large number of processors.
> 
> Signed-off-by: Thomas Garnier <thgarnie@google.com>
> ---
> Based on next-20170308
> ---
>  Documentation/x86/x86_64/mm.txt         | 5 ++++-
>  arch/x86/include/asm/pgtable_64_types.h | 3 ++-
>  arch/x86/kernel/module.c                | 1 +
>  arch/x86/mm/dump_pagetables.c           | 1 +
>  arch/x86/mm/kasan_init_64.c             | 1 +
>  mm/vmalloc.c                            | 1 +

> --- a/mm/vmalloc.c
> +++ b/mm/vmalloc.c
> @@ -35,6 +35,7 @@
>  #include <linux/uaccess.h>
>  #include <asm/tlbflush.h>
>  #include <asm/shmparam.h>
> +#include <asm/fixmap.h>
>  
>  #include "internal.h"

Note that asm/fixmap.h is an x86-ism that isn't present in many other 
architectures, so this hunk will break the build.

To make progress with these patches I've fixed it up with an ugly #ifdef 
CONFIG_X86, but it needs a real solution instead before this can be pushed 
upstream.

Thanks,

	Ingo

=====================>
 mm/vmalloc.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index dabea6a29fad..b7d2a23349f4 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -35,7 +35,10 @@
 #include <linux/uaccess.h>
 #include <asm/tlbflush.h>
 #include <asm/shmparam.h>
-#include <asm/fixmap.h>
+
+#ifdef CONFIG_X86
+# include <asm/fixmap.h>
+#endif
 
 #include "internal.h"
 

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v7 1/3] x86/mm: Adapt MODULES_END based on Fixmap section size Thomas Garnier <thgarnie@google.com> - 2017-03-14 18:10 +0100
  Re: [PATCH v7 1/3] x86/mm: Adapt MODULES_END based on Fixmap section  size Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2017-03-15 15:00 +0100
  Re: [PATCH v7 1/3] x86/mm: Adapt MODULES_END based on Fixmap section  size Ingo Molnar <mingo@kernel.org> - 2017-03-16 09:20 +0100
  [tip:x86/mm] x86/mm: Adapt MODULES_END based on fixmap section size tip-bot for Thomas Garnier <tipbot@zytor.com> - 2017-03-16 12:20 +0100

csiph-web