efi: x86: Move EFI runtime map sysfs code to arch/x86
authorArd Biesheuvel <ardb@kernel.org>
Mon, 7 Nov 2022 08:17:16 +0000 (09:17 +0100)
committerArd Biesheuvel <ardb@kernel.org>
Fri, 18 Nov 2022 08:14:09 +0000 (09:14 +0100)
commit1fff234de2b6047ee311c6bf88f31ad5008f2889
tree730cbd65af945e6ef4ac46f8bda9e72e341ff4fe
parent8dfac4d8ad27c168c6e778adbebaac85b92606d8
efi: x86: Move EFI runtime map sysfs code to arch/x86

The EFI runtime map code is only wired up on x86, which is the only
architecture that has a need for it in its implementation of kexec.

So let's move this code under arch/x86 and drop all references to it
from generic code. To ensure that the efi_runtime_map_init() is invoked
at the appropriate time use a 'sync' subsys_initcall() that will be
called right after the EFI initcall made from generic code where the
original invocation of efi_runtime_map_init() resided.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Dave Young <dyoung@redhat.com>
arch/x86/Kconfig
arch/x86/include/asm/efi.h
arch/x86/platform/efi/Makefile
arch/x86/platform/efi/runtime-map.c [new file with mode: 0644]
drivers/firmware/efi/Kconfig
drivers/firmware/efi/Makefile
drivers/firmware/efi/efi.c
drivers/firmware/efi/runtime-map.c [deleted file]
include/linux/efi.h