OSDN Git Service

efi/x86: Merge the setup_efi_pci32() and setup_efi_pci64() routines
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 20 Jul 2018 01:47:19 +0000 (10:47 +0900)
committerIngo Molnar <mingo@kernel.org>
Sun, 22 Jul 2018 12:13:42 +0000 (14:13 +0200)
commit75c5a713ab4b774c7d990ec748dddba714034436
tree4f93626e4a3c48136319906de088bcecb3e33c2a
parent83a0a2ea0b991927e42984be220329e776ce7137
efi/x86: Merge the setup_efi_pci32() and setup_efi_pci64() routines

After merging the 32-bit and 64-bit versions of the code that invokes
the PCI I/O protocol methods to preserve PCI ROM images in commit:

  2c3625cb9fa2 ("efi/x86: Fold __setup_efi_pci32() and __setup_efi_pci64() ...")

there are still separate code paths for 32-bit and 64-bit, where the only
difference is the size of a EFI_HANDLE. So let's parameterize a single
implementation for that difference only, and get rid of the two copies of
the code.

While at it, rename __setup_efi_pci() to preserve_pci_rom_image() to
better reflect its purpose.

Tested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Lukas Wunner <lukas@wunner.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/20180720014726.24031-3-ard.biesheuvel@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/boot/compressed/eboot.c