]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
x86/boot/e820: Clean up the E820_X_MAX definition
authorIngo Molnar <mingo@kernel.org>
Fri, 27 Jan 2017 10:46:14 +0000 (11:46 +0100)
committerIngo Molnar <mingo@kernel.org>
Sat, 28 Jan 2017 08:31:14 +0000 (09:31 +0100)
E820_X_MAX is defined in a somewhat messy fashion:

 - there's a pretty pointless looking #ifndef __KERNEL__ define that
   makes no sense in the non-UAPI header anymore,

 - part of it is defined in api.h, which is not for type definitions,

 - plus it's defined in two headers and the main explanation is in the
   header where we don't have the real definition.

So move it into a single place in e820/types.h and get rid of the
!__KERNEL__ case altogether. Drop the smaller comment - the larger
one explains it just fine.

Note that the zeropage does not use E820_X_MAX, it uses the legacy
128 entries definition.

No change in functionality.

Cc: Alex Thorlton <athorlton@sgi.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Huang, Ying <ying.huang@intel.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Juergen Gross <jgross@suse.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Paul Jackson <pj@sgi.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Tejun Heo <tj@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Wei Yang <richard.weiyang@gmail.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/include/asm/e820/api.h
arch/x86/include/asm/e820/types.h

index 010efbceb40cb50a94812bf6bc481047b71123f2..e161deb5736ca4aa59980bcf788c1e696a31437a 100644 (file)
@@ -1,15 +1,6 @@
 #ifndef _ASM_E820_API_H
 #define _ASM_E820_API_H
 
-/*
- * E820_X_MAX is the maximum size of the extended E820 table.  The extended
- * table may contain up to 3 extra E820 entries per possible NUMA node, so we
- * make room for 3 * MAX_NUMNODES possible entries, beyond the standard 128.
- * Also note that E820_X_MAX *must* be defined before we include asm/e820/types.h.
- */
-#include <linux/numa.h>
-#define E820_X_MAX (E820MAX + 3 * MAX_NUMNODES)
-
 #include <asm/e820/types.h>
 
 #ifndef __ASSEMBLY__
index cf73c104c04192f05b4141ef3e6d74706323946c..b05e812ff4f2c3f61bb00030941cc4454372b6d2 100644 (file)
@@ -3,9 +3,6 @@
 
 #include <uapi/asm/e820/types.h>
 
-/* Our map: */
-#define E820MAP                        0x2d0
-
 /*
  * The legacy E820 BIOS limits us to 128 (E820MAX) nodes due to the
  * constrained space in the zeropage.
  * to allow more than three entries per node or otherwise refine
  * this size.
  */
-#ifndef __KERNEL__
-# define E820_X_MAX            E820MAX
-#endif
+
+#include <linux/numa.h>
+
+#define E820_X_MAX             (E820MAX + 3*MAX_NUMNODES)
+
+/* Our map: */
+#define E820MAP                        0x2d0
 
 /* Number of entries in E820MAP: */
 #define E820NR                 0x1e8