efi/x86: Merge 32-bit and 64-bit UGA draw protocol setup routines
commit290084c2fa13e9aaa7f856ed1ab30760327dd9f8
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 20 Jul 2018 01:47:21 +0000 (20 10:47 +0900)
committerIngo Molnar <mingo@kernel.org>
Sun, 22 Jul 2018 12:13:43 +0000 (22 14:13 +0200)
treeed0be28bf4ac8955a9b2ba18d44088e01236ce00
parent0b767b16d7b634dd62667f224425cef3c78e031c
efi/x86: Merge 32-bit and 64-bit UGA draw protocol setup routines

The two versions of setup_uga##() are mostly identical, with the
exception of the size of EFI_HANDLE. So let's merge the two, and
pull the implementation into the calling function setup_uga().

Note that the 32-bit version was only mixed-mode safe by accident:
it only calls the get_mode() method of the UGA draw protocol, which
happens to be the first member, and so truncating the 64-bit void* at
offset 0 to 32 bits happens to produce the correct value. But let's
not rely on that, and use the proper API instead.

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-5-ard.biesheuvel@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/boot/compressed/eboot.c