Skip to content

Commit 7b6e4ba

Browse files
author
Ingo Molnar
committed
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 <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Brian Gerst <[email protected]> Cc: Dan Williams <[email protected]> Cc: Denys Vlasenko <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: Huang, Ying <[email protected]> Cc: Josh Poimboeuf <[email protected]> Cc: Juergen Gross <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Paul Jackson <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Rafael J. Wysocki <[email protected]> Cc: Tejun Heo <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Wei Yang <[email protected]> Cc: Yinghai Lu <[email protected]> Cc: [email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent 99da1ff commit 7b6e4ba

File tree

2 files changed

+7
-15
lines changed

2 files changed

+7
-15
lines changed

arch/x86/include/asm/e820/api.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,6 @@
11
#ifndef _ASM_E820_API_H
22
#define _ASM_E820_API_H
33

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 asm/e820/types.h.
9-
*/
10-
#include <linux/numa.h>
11-
#define E820_X_MAX (E820MAX + 3 * MAX_NUMNODES)
12-
134
#include <asm/e820/types.h>
145

156
#ifndef __ASSEMBLY__

arch/x86/include/asm/e820/types.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33

44
#include <uapi/asm/e820/types.h>
55

6-
/* Our map: */
7-
#define E820MAP 0x2d0
8-
96
/*
107
* The legacy E820 BIOS limits us to 128 (E820MAX) nodes due to the
118
* constrained space in the zeropage.
@@ -31,9 +28,13 @@
3128
* to allow more than three entries per node or otherwise refine
3229
* this size.
3330
*/
34-
#ifndef __KERNEL__
35-
# define E820_X_MAX E820MAX
36-
#endif
31+
32+
#include <linux/numa.h>
33+
34+
#define E820_X_MAX (E820MAX + 3*MAX_NUMNODES)
35+
36+
/* Our map: */
37+
#define E820MAP 0x2d0
3738

3839
/* Number of entries in E820MAP: */
3940
#define E820NR 0x1e8

0 commit comments

Comments
 (0)