diff options
author | Ingo Molnar <mingo@kernel.org> | 2017-01-28 17:01:06 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-01-28 17:02:56 +0100 |
commit | 09c5151339caea3a5752e577c66521f6e7443fe5 (patch) | |
tree | ffbd7517061d05a479f546e7a1cfb5c612527a5f /arch/x86/kernel/e820.c | |
parent | 7ad1ed8abc50eb44dd628bda23313599503aee87 (diff) | |
download | linux-09c5151339caea3a5752e577c66521f6e7443fe5.tar.bz2 |
x86/boot/e820: Use 'enum e820_type' in 'struct e820_entry'
Use a stricter type for struct e820_entry. Add a build-time check to make
sure the compiler won't ever pack the enum into a field smaller than
'int'.
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>
Diffstat (limited to 'arch/x86/kernel/e820.c')
-rw-r--r-- | arch/x86/kernel/e820.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index 511402d88795..010a289ddd9f 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c @@ -1164,6 +1164,9 @@ void __init e820__memory_setup(void) { char *who; + /* This is a firmware interface ABI - make sure we don't break it: */ + BUILD_BUG_ON(sizeof(struct e820_entry) != 20); + who = x86_init.resources.memory_setup(); memcpy(e820_table_firmware, e820_table, sizeof(struct e820_table)); |