efivars: Add compatibility code for compat tasks
authorMatt Fleming <matt.fleming@intel.com>
Mon, 17 Mar 2014 15:36:37 +0000 (15:36 +0000)
committerMark Brown <broonie@linaro.org>
Wed, 23 Jul 2014 20:07:00 +0000 (21:07 +0100)
commit59f8fdc6a7b7f45186cbf26e059417b99218ce7a
treed8cf56dd4283927f41c72561c13654086a54d2f4
parent4cb8543b3302dc7fbe17b259fadd510add43f434
efivars: Add compatibility code for compat tasks

It seems people are using 32-bit efibootmgr on top of 64-bit kernels,
which will currently fail horribly when using the efivars interface,
which is the traditional efibootmgr backend (the other being efivarfs).

Since there is no versioning info in the data structure, figure out when
we need to munge the structure data via judicious use of
is_compat_task().

Cc: Mike Waychison <mikew@google.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
(cherry picked from commit e33655a386ed3b26ad36fb97a47ebb1c2ca1e928)
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/firmware/efi/efivars.c