[tip:x86/boot] x86/boot/e820: Clean up the E820_X_MAX definition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit-ID:  7b6e4ba3cb1ffdf84fc4d3775b922d64663ec6fc
Gitweb:     http://git.kernel.org/tip/7b6e4ba3cb1ffdf84fc4d3775b922d64663ec6fc
Author:     Ingo Molnar <mingo@xxxxxxxxxx>
AuthorDate: Fri, 27 Jan 2017 11:46:14 +0100
Committer:  Ingo Molnar <mingo@xxxxxxxxxx>
CommitDate: Sat, 28 Jan 2017 09:31:14 +0100

x86/boot/e820: Clean up the E820_X_MAX definition

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@xxxxxxx>
Cc: Andy Lutomirski <luto@xxxxxxxxxx>
Cc: Borislav Petkov <bp@xxxxxxxxx>
Cc: Brian Gerst <brgerst@xxxxxxxxx>
Cc: Dan Williams <dan.j.williams@xxxxxxxxx>
Cc: Denys Vlasenko <dvlasenk@xxxxxxxxxx>
Cc: H. Peter Anvin <hpa@xxxxxxxxx>
Cc: Huang, Ying <ying.huang@xxxxxxxxx>
Cc: Josh Poimboeuf <jpoimboe@xxxxxxxxxx>
Cc: Juergen Gross <jgross@xxxxxxxx>
Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Cc: Paul Jackson <pj@xxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Rafael J. Wysocki <rjw@xxxxxxx>
Cc: Tejun Heo <tj@xxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Wei Yang <richard.weiyang@xxxxxxxxx>
Cc: Yinghai Lu <yinghai@xxxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx
Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
---
 arch/x86/include/asm/e820/api.h   |  9 ---------
 arch/x86/include/asm/e820/types.h | 13 +++++++------
 2 files changed, 7 insertions(+), 15 deletions(-)

diff --git a/arch/x86/include/asm/e820/api.h b/arch/x86/include/asm/e820/api.h
index 010efbc..e161deb 100644
--- a/arch/x86/include/asm/e820/api.h
+++ b/arch/x86/include/asm/e820/api.h
@@ -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__
diff --git a/arch/x86/include/asm/e820/types.h b/arch/x86/include/asm/e820/types.h
index cf73c10..b05e812 100644
--- a/arch/x86/include/asm/e820/types.h
+++ b/arch/x86/include/asm/e820/types.h
@@ -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.
@@ -31,9 +28,13 @@
  * 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
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux