From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932970AbcFOTE1 (ORCPT ); Wed, 15 Jun 2016 15:04:27 -0400 Received: from relay1.sgi.com ([192.48.180.66]:50768 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753203AbcFOTEU (ORCPT ); Wed, 15 Jun 2016 15:04:20 -0400 From: Alex Thorlton To: linux-kernel@vger.kernel.org Cc: Alex Thorlton , Matt Fleming , Russ Anderson , Dimitri Sivanich , Russell King , Catalin Marinas , Will Deacon , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Ard Biesheuvel , Mark Rutland , Roy Franz , linux-arm-kernel@lists.infradead.org, linux-efi@vger.kernel.org, x86@kernel.org Subject: [PATCHv2 0/3] x86/UV, x86/efi: Re-factor efi_call_virt for general use Date: Wed, 15 Jun 2016 14:04:12 -0500 Message-Id: <1466017455-236934-1-git-send-email-athorlton@sgi.com> X-Mailer: git-send-email 1.8.5.6 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hey guys, This patchset creates a general purpose version of the efi_call_virt macro that does not assume that the function pointer being passed in is inside of efi.systab->runtime. It also fixes up uv_bios_call to use the new functionality, and does a bit of cleanup in the efi_thunk macro. Quick breakdown of the patches: Patch 1) Move necessary macros to locations where we can access them. Remove hard-coded efi.systab reference from efi_call_virt. Rename/create new macros as needed. Patch 2) Simple change to allow UV code to utilize the new functionality. Included a detailed explanation of how we got here. Patch 3) Replace a few bits of the efi_thunk macro with the arch_efi_call_setup/teardown macros. The first two have been tested on simulators and hardware, but the third has only been compile-tested. I don't have any hardware to test that on. Updates for v2: - Fix up arm and arm64 versions of arch_efi_call_virt. I missed these on my first pass - Add some more detail to the commit message for the uv_bios_call fix. - Change the third patch to use the arch_efi_call_setup/teardown macros inside of the efi_thunk macro, instead of replacing efi_thunk entirely for the CONFIG_EFI_MIXED case. Cc: Matt Fleming Cc: Russ Anderson Cc: Dimitri Sivanich Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Ard Biesheuvel Cc: Mark Rutland Cc: Roy Franz Cc: linux-arm-kernel@lists.infradead.org Cc: linux-efi@vger.kernel.org Cc: x86@kernel.org Alex Thorlton (3): Convert efi_call_virt to efi_call_virt_pointer Update uv_bios_call to use efi_call_virt_pointer Update efi_thunk to use the the arch_efi_call_virt* macros arch/arm/include/asm/efi.h | 4 +-- arch/arm64/include/asm/efi.h | 4 +-- arch/x86/include/asm/efi.h | 9 +++--- arch/x86/platform/efi/efi_64.c | 11 ++----- arch/x86/platform/uv/bios_uv.c | 3 +- drivers/firmware/efi/runtime-wrappers.c | 53 +++++++-------------------------- include/linux/efi.h | 51 +++++++++++++++++++++++++++++++ 7 files changed, 73 insertions(+), 62 deletions(-) -- 1.8.5.6 From mboxrd@z Thu Jan 1 00:00:00 1970 From: athorlton@sgi.com (Alex Thorlton) Date: Wed, 15 Jun 2016 14:04:12 -0500 Subject: [PATCHv2 0/3] x86/UV, x86/efi: Re-factor efi_call_virt for general use Message-ID: <1466017455-236934-1-git-send-email-athorlton@sgi.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hey guys, This patchset creates a general purpose version of the efi_call_virt macro that does not assume that the function pointer being passed in is inside of efi.systab->runtime. It also fixes up uv_bios_call to use the new functionality, and does a bit of cleanup in the efi_thunk macro. Quick breakdown of the patches: Patch 1) Move necessary macros to locations where we can access them. Remove hard-coded efi.systab reference from efi_call_virt. Rename/create new macros as needed. Patch 2) Simple change to allow UV code to utilize the new functionality. Included a detailed explanation of how we got here. Patch 3) Replace a few bits of the efi_thunk macro with the arch_efi_call_setup/teardown macros. The first two have been tested on simulators and hardware, but the third has only been compile-tested. I don't have any hardware to test that on. Updates for v2: - Fix up arm and arm64 versions of arch_efi_call_virt. I missed these on my first pass - Add some more detail to the commit message for the uv_bios_call fix. - Change the third patch to use the arch_efi_call_setup/teardown macros inside of the efi_thunk macro, instead of replacing efi_thunk entirely for the CONFIG_EFI_MIXED case. Cc: Matt Fleming Cc: Russ Anderson Cc: Dimitri Sivanich Cc: Russell King Cc: Catalin Marinas Cc: Will Deacon Cc: Thomas Gleixner Cc: Ingo Molnar Cc: "H. Peter Anvin" Cc: Ard Biesheuvel Cc: Mark Rutland Cc: Roy Franz Cc: linux-arm-kernel at lists.infradead.org Cc: linux-efi at vger.kernel.org Cc: x86 at kernel.org Alex Thorlton (3): Convert efi_call_virt to efi_call_virt_pointer Update uv_bios_call to use efi_call_virt_pointer Update efi_thunk to use the the arch_efi_call_virt* macros arch/arm/include/asm/efi.h | 4 +-- arch/arm64/include/asm/efi.h | 4 +-- arch/x86/include/asm/efi.h | 9 +++--- arch/x86/platform/efi/efi_64.c | 11 ++----- arch/x86/platform/uv/bios_uv.c | 3 +- drivers/firmware/efi/runtime-wrappers.c | 53 +++++++-------------------------- include/linux/efi.h | 51 +++++++++++++++++++++++++++++++ 7 files changed, 73 insertions(+), 62 deletions(-) -- 1.8.5.6