Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1571390
| From | tip-bot for Lukas Wunner <tipbot@zytor.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [tip:efi/core] x86/efi: Deduplicate efi_char16_printk() |
| Date | 2017-02-01 10:50 +0100 |
| Message-ID | <t5ZI6-4dz-29@gated-at.bofh.it> (permalink) |
| References | <t5GFt-1cI-51@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Commit-ID: db4545d9a7881db0a7e18599e6cd1adbcb93db33
Gitweb: http://git.kernel.org/tip/db4545d9a7881db0a7e18599e6cd1adbcb93db33
Author: Lukas Wunner <lukas@wunner.de>
AuthorDate: Tue, 31 Jan 2017 13:21:34 +0000
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 1 Feb 2017 08:45:43 +0100
x86/efi: Deduplicate efi_char16_printk()
Eliminate the separate 32-bit and 64x- bit code paths by way of the shiny
new efi_call_proto() macro.
No functional change intended.
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
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/1485868902-20401-3-git-send-email-ard.biesheuvel@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/boot/compressed/eboot.c | 26 ++------------------------
include/linux/efi.h | 8 ++++----
2 files changed, 6 insertions(+), 28 deletions(-)
diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c
index f1cf284..6d3aeab 100644
--- a/arch/x86/boot/compressed/eboot.c
+++ b/arch/x86/boot/compressed/eboot.c
@@ -101,30 +101,8 @@ efi_open_volume(efi_system_table_t *sys_table, void *__image, void **__fh)
void efi_char16_printk(efi_system_table_t *table, efi_char16_t *str)
{
- unsigned long output_string;
- size_t offset;
-
- if (efi_early->is64) {
- struct efi_simple_text_output_protocol_64 *out;
- u64 *func;
-
- offset = offsetof(typeof(*out), output_string);
- output_string = efi_early->text_output + offset;
- out = (typeof(out))(unsigned long)efi_early->text_output;
- func = (u64 *)output_string;
-
- efi_early->call(*func, out, str);
- } else {
- struct efi_simple_text_output_protocol_32 *out;
- u32 *func;
-
- offset = offsetof(typeof(*out), output_string);
- output_string = efi_early->text_output + offset;
- out = (typeof(out))(unsigned long)efi_early->text_output;
- func = (u32 *)output_string;
-
- efi_early->call(*func, out, str);
- }
+ efi_call_proto(efi_simple_text_output_protocol, output_string,
+ efi_early->text_output, str);
}
static efi_status_t
diff --git a/include/linux/efi.h b/include/linux/efi.h
index 5b1af30..6642c4d 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -1240,17 +1240,17 @@ struct efivar_entry {
bool deleting;
};
-struct efi_simple_text_output_protocol_32 {
+typedef struct {
u32 reset;
u32 output_string;
u32 test_string;
-};
+} efi_simple_text_output_protocol_32_t;
-struct efi_simple_text_output_protocol_64 {
+typedef struct {
u64 reset;
u64 output_string;
u64 test_string;
-};
+} efi_simple_text_output_protocol_64_t;
struct efi_simple_text_output_protocol {
void *reset;
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[GIT PULL 00/10] EFI updates for v4.11 Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-01-31 14:30 +0100
[PATCH 03/10] efi: Make EFI_MEMORY_ATTRIBUTES_TABLE initialization common across all architectures Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-01-31 14:30 +0100
[tip:efi/core] efi: Make EFI_MEMORY_ATTRIBUTES_TABLE initialization common across all architectures tip-bot for Sai Praneeth <tipbot@zytor.com> - 2017-02-01 10:50 +0100
[PATCH 04/10] efi: Introduce EFI_MEM_ATTR bit and set it from memory attributes table Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-01-31 14:30 +0100
[tip:efi/core] efi: Introduce the EFI_MEM_ATTR bit and set it from the memory attributes table tip-bot for Sai Praneeth <tipbot@zytor.com> - 2017-02-01 10:50 +0100
[PATCH 02/10] x86/efi: Deduplicate efi_char16_printk() Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-01-31 14:30 +0100
[tip:efi/core] x86/efi: Deduplicate efi_char16_printk() tip-bot for Lukas Wunner <tipbot@zytor.com> - 2017-02-01 10:50 +0100
[PATCH 08/10] efi/x86: Move EFI BGRT init code to early init code Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2017-01-31 14:30 +0100
[tip:efi/core] efi/x86: Move the EFI BGRT init code to early init code tip-bot for Dave Young <tipbot@zytor.com> - 2017-02-01 10:50 +0100
csiph-web