aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Thorlton <athorlton@sgi.com>2016-12-05 12:49:13 -0500
committerJuergen Gross <jgross@suse.com>2016-12-09 04:59:04 -0500
commit9d2f86c6cad5a8a3f0b38a80136ba68364ca7278 (patch)
tree006d4ed0a80b362461b463272b72c16e92377257
parent577f79e411b7a81a8ae7ae4daf5d4056ebbfbc58 (diff)
x86: Make E820_X_MAX unconditionally larger than E820MAX
It's really not necessary to limit E820_X_MAX to 128 in the non-EFI case. This commit drops E820_X_MAX's dependency on CONFIG_EFI, so that E820_X_MAX is always at least slightly larger than E820MAX. The real motivation behind this is actually to prevent some issues in the Xen kernel, where the XENMEM_machine_memory_map hypercall can produce an e820 map larger than 128 entries, even on systems where the original e820 table was quite a bit smaller than that, depending on how many IOAPICs are installed on the system. Signed-off-by: Alex Thorlton <athorlton@sgi.com> Suggested-by: Ingo Molnar <mingo@redhat.com> Acked-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Juergen Gross <jgross@suse.com>
-rw-r--r--arch/x86/include/asm/e820.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/arch/x86/include/asm/e820.h b/arch/x86/include/asm/e820.h
index 476b574de99e..ec23d8e1297c 100644
--- a/arch/x86/include/asm/e820.h
+++ b/arch/x86/include/asm/e820.h
@@ -1,13 +1,17 @@
1#ifndef _ASM_X86_E820_H 1#ifndef _ASM_X86_E820_H
2#define _ASM_X86_E820_H 2#define _ASM_X86_E820_H
3 3
4#ifdef CONFIG_EFI 4/*
5 * E820_X_MAX is the maximum size of the extended E820 table. The extended
6 * table may contain up to 3 extra E820 entries per possible NUMA node, so we
7 * make room for 3 * MAX_NUMNODES possible entries, beyond the standard 128.
8 * Also note that E820_X_MAX *must* be defined before we include uapi/asm/e820.h.
9 */
5#include <linux/numa.h> 10#include <linux/numa.h>
6#define E820_X_MAX (E820MAX + 3 * MAX_NUMNODES) 11#define E820_X_MAX (E820MAX + 3 * MAX_NUMNODES)
7#else /* ! CONFIG_EFI */ 12
8#define E820_X_MAX E820MAX
9#endif
10#include <uapi/asm/e820.h> 13#include <uapi/asm/e820.h>
14
11#ifndef __ASSEMBLY__ 15#ifndef __ASSEMBLY__
12/* see comment in arch/x86/kernel/e820.c */ 16/* see comment in arch/x86/kernel/e820.c */
13extern struct e820map *e820; 17extern struct e820map *e820;