From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66FDBC2D0CF for ; Tue, 24 Dec 2019 15:11:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3E0D8206D3 for ; Tue, 24 Dec 2019 15:11:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577200317; bh=VjiI9pnf1cQc/crLdBBdKIYtlUwGTCJNkegMsA/ka2I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=AmQ2AMudXwF8eifJtMtiC3RNXydAZeQLXhcMEymLoCy8XXQiWcZCM7gi5CkyD+DpJ 1LiiW6IxeykKM7f7tUE7Jt4uCPvaQ5XbdwyBjUXqw5l4gT7y5pVZRogflLLC/iE0UQ Z+zJHWA7Iyey0HNRrkMJoAtAKaWhQMP/VMJi4/wk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727460AbfLXPL4 (ORCPT ); Tue, 24 Dec 2019 10:11:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:51158 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727186AbfLXPLL (ORCPT ); Tue, 24 Dec 2019 10:11:11 -0500 Received: from localhost.localdomain (aaubervilliers-681-1-7-6.w90-88.abo.wanadoo.fr [90.88.129.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 994C12071A; Tue, 24 Dec 2019 15:11:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1577200270; bh=VjiI9pnf1cQc/crLdBBdKIYtlUwGTCJNkegMsA/ka2I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W57JZ515Ht+jLukXnvd+f6kskGtjO0+VWifyYslDfEvHwKTa3M1ukaK35vj6lqiZl WWhtY/QGkXO1XgR81o3CxJjLsLSoHzLg6RpIBUV4SvfGu8RD2sZPjF7krIe/Xykg9K zYASqYL6bXI0iT4i4LJxbQDFBGN+4OUgVsCkoZ5U= From: Ard Biesheuvel To: linux-efi@vger.kernel.org, Ingo Molnar , Thomas Gleixner Cc: Ard Biesheuvel , linux-kernel@vger.kernel.org, Arvind Sankar Subject: [PATCH 16/25] efi/libstub: unify the efi_char16_printk implementations Date: Tue, 24 Dec 2019 16:10:16 +0100 Message-Id: <20191224151025.32482-17-ardb@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191224151025.32482-1-ardb@kernel.org> References: <20191224151025.32482-1-ardb@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use a single implementation for efi_char16_printk() across all architectures. Signed-off-by: Ard Biesheuvel --- arch/x86/boot/compressed/eboot.c | 7 ------- drivers/firmware/efi/libstub/arm-stub.c | 9 --------- drivers/firmware/efi/libstub/efi-stub-helper.c | 9 +++++++++ 3 files changed, 9 insertions(+), 16 deletions(-) diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c index 3a7c900b9c66..5fb12827bdc2 100644 --- a/arch/x86/boot/compressed/eboot.c +++ b/arch/x86/boot/compressed/eboot.c @@ -46,13 +46,6 @@ static void setup_boot_services##bits(struct efi_config *c) \ BOOT_SERVICES(32); BOOT_SERVICES(64); -void efi_char16_printk(efi_system_table_t *table, efi_char16_t *str) -{ - efi_call_proto(efi_simple_text_output_protocol, output_string, - ((efi_simple_text_output_protocol_t *)(unsigned long) - efi_early->text_output), str); -} - static efi_status_t preserve_pci_rom_image(efi_pci_io_protocol_t *pci, struct pci_setup_rom **__rom) { diff --git a/drivers/firmware/efi/libstub/arm-stub.c b/drivers/firmware/efi/libstub/arm-stub.c index 47f072ac3f30..b44b1bd4d480 100644 --- a/drivers/firmware/efi/libstub/arm-stub.c +++ b/drivers/firmware/efi/libstub/arm-stub.c @@ -44,15 +44,6 @@ __pure efi_system_table_t *efi_system_table(void) return sys_table; } -void efi_char16_printk(efi_system_table_t *sys_table_arg, - efi_char16_t *str) -{ - efi_simple_text_output_protocol_t *out; - - out = (efi_simple_text_output_protocol_t *)sys_table_arg->con_out; - out->output_string(out, str); -} - static struct screen_info *setup_graphics(efi_system_table_t *sys_table_arg) { efi_guid_t gop_proto = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID; diff --git a/drivers/firmware/efi/libstub/efi-stub-helper.c b/drivers/firmware/efi/libstub/efi-stub-helper.c index 9bb74ad4b7fe..f74b514789d7 100644 --- a/drivers/firmware/efi/libstub/efi-stub-helper.c +++ b/drivers/firmware/efi/libstub/efi-stub-helper.c @@ -955,3 +955,12 @@ void *get_efi_config_table(efi_system_table_t *sys_table, efi_guid_t guid) } return NULL; } + +void efi_char16_printk(efi_system_table_t *table, efi_char16_t *str) +{ + efi_call_proto(efi_simple_text_output_protocol, + output_string, + efi_table_attr(efi_system_table, con_out, + efi_system_table()), + str); +} -- 2.20.1