Skip to content
  • Ingo Molnar's avatar
    x86/boot/e820: Separate the E820 ABI structures from the in-kernel structures · 7410aa1c
    Ingo Molnar authored
    
    
    Linus pointed out that relying on the compiler to pack structures with
    enums is fragile not just for the kernel, but for external tooling as
    well which might rely on our UAPI headers.
    
    So separate the two from each other: introduce 'struct boot_e820_entry',
    which is the boot protocol entry format.
    
    This actually simplifies the code, as e820__update_table() is now never
    called directly with boot protocol table entries - we can rely on
    append_e820_table() and do a e820__update_table() call afterwards.
    
    ( This will allow further simplifications of __e820__update_table(),
      but that will be done in a separate patch. )
    
    This change also has the side effect of not modifying the bootparams structure
    anymore - which might be useful for debugging. In theory we could even constify
    the boot_params structure - at least from the E820 code's point of view.
    
    Remove the uapi/asm/e820/types.h file, as it's not used anymore - all
    kernel side E820 types are defined in asm/e820/types.h.
    
    Reported-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    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: 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: default avatarIngo Molnar <mingo@kernel.org>
    7410aa1c