efi: Deduplicate efi_open_volume()
There's one ARM, one x86_32 and one x86_64 version of efi_open_volume()
which can be folded into a single shared version by masking their
differences with the efi_call_proto() macro introduced by commit:
3552fdf29f
("efi: Allow bitness-agnostic protocol calls").
To be able to dereference the device_handle attribute from the
efi_loaded_image_t table in an arch- and bitness-agnostic manner,
introduce the efi_table_attr() macro (which already exists for x86)
to arm and arm64.
No functional change intended.
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
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-7-ard.biesheuvel@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:

committed by
Ingo Molnar

parent
093174f525
commit
c4db9c1e8c
@@ -894,6 +894,16 @@ typedef struct _efi_file_handle {
|
||||
void *flush;
|
||||
} efi_file_handle_t;
|
||||
|
||||
typedef struct {
|
||||
u64 revision;
|
||||
u32 open_volume;
|
||||
} efi_file_io_interface_32_t;
|
||||
|
||||
typedef struct {
|
||||
u64 revision;
|
||||
u64 open_volume;
|
||||
} efi_file_io_interface_64_t;
|
||||
|
||||
typedef struct _efi_file_io_interface {
|
||||
u64 revision;
|
||||
int (*open_volume)(struct _efi_file_io_interface *,
|
||||
|
Reference in New Issue
Block a user