]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
x86/boot/e820: Introduce 'enum e820_type'
authorIngo Molnar <mingo@kernel.org>
Sat, 28 Jan 2017 15:42:39 +0000 (16:42 +0100)
committerIngo Molnar <mingo@kernel.org>
Sat, 28 Jan 2017 16:02:56 +0000 (17:02 +0100)
Use an enum instead of CPP #define.

Also fix various small annoyances in the descriptions of the
various E820 types.

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/types.h

index da9477d78214e9d0e683501bd0f4947fc66b580d..1c342682553544c59f11c5676f58e4a4f56bd8ef 100644 (file)
@@ -1,6 +1,37 @@
 #ifndef _ASM_E820_TYPES_H
 #define _ASM_E820_TYPES_H
 
+enum e820_type {
+       E820_RAM                = 1,
+       E820_RESERVED           = 2,
+       E820_ACPI               = 3,
+       E820_NVS                = 4,
+       E820_UNUSABLE           = 5,
+       E820_PMEM               = 7,
+
+       /*
+        * This is a non-standardized way to represent ADR or
+        * NVDIMM regions that persist over a reboot.
+        *
+        * The kernel will ignore their special capabilities
+        * unless the CONFIG_X86_PMEM_LEGACY=y option is set.
+        *
+        * ( Note that older platforms also used 6 for the same
+        *   type of memory, but newer versions switched to 12 as
+        *   6 was assigned differently. Some time they will learn... )
+        */
+       E820_PRAM               = 12,
+
+       /*
+        * Reserved RAM used by the kernel itself if
+        * CONFIG_INTEL_TXT=y is enabled, memory of this type
+        * will be included in the S3 integrity calculation
+        * and so should not include any memory that the BIOS
+        * might alter over the S3 transition:
+        */
+       E820_RESERVED_KERN      = 128,
+};
+
 #include <uapi/asm/e820/types.h>
 
 /*
 /* Number of entries in E820MAP: */
 #define E820NR                 0x1e8
 
-#define E820_RAM               1
-#define E820_RESERVED          2
-#define E820_ACPI              3
-#define E820_NVS               4
-#define E820_UNUSABLE          5
-#define E820_PMEM              7
-
-/*
- * This is a non-standardized way to represent ADR or NVDIMM regions that
- * persist over a reboot.  The kernel will ignore their special capabilities
- * unless the CONFIG_X86_PMEM_LEGACY option is set.
- *
- * ( Note that older platforms also used 6 for the same type of memory,
- *   but newer versions switched to 12 as 6 was assigned differently.  Some
- *   time they will learn... )
- */
-#define E820_PRAM              12
-
-/*
- * reserved RAM used by kernel itself
- * if CONFIG_INTEL_TXT is enabled, memory of this type will be
- * included in the S3 integrity calculation and so should not include
- * any memory that BIOS might alter over the S3 transition
- */
-#define E820_RESERVED_KERN     128
-
 /*
  * The whole array of E820 entries:
  */