summaryrefslogtreecommitdiff
path: root/drivers/firmware/efi/libstub/Makefile
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2020-03-27 18:09:40 +0300
committerArd Biesheuvel <ardb@kernel.org>2020-04-24 15:52:16 +0300
commit43b1df0e013c25abb536699f46d0e9f291b586a0 (patch)
treecc2415ae3b79cb9494824ba9a5ce1e7a25e39d5c /drivers/firmware/efi/libstub/Makefile
parent5d12da9dd6c155f7a09dfcaa2b9827764c939b2a (diff)
downloadlinux-43b1df0e013c25abb536699f46d0e9f291b586a0.tar.xz
efi/libstub: Add API function to allocate aligned memory
Break out the code to create an aligned page allocation from mem.c and move it into a function efi_allocate_pages_aligned() in alignedmem.c. Update efi_allocate_pages() to invoke it unless the minimum alignment equals the EFI page size (4 KB), in which case the ordinary page allocator is sufficient. This way, efi_allocate_pages_aligned() will only be pulled into the build if it is actually being used (which will be on arm64 only in the immediate future) Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'drivers/firmware/efi/libstub/Makefile')
-rw-r--r--drivers/firmware/efi/libstub/Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile
index 75cb2c3a1519..bb8af2b16c49 100644
--- a/drivers/firmware/efi/libstub/Makefile
+++ b/drivers/firmware/efi/libstub/Makefile
@@ -42,7 +42,8 @@ KCOV_INSTRUMENT := n
lib-y := efi-stub-helper.o gop.o secureboot.o tpm.o \
file.o mem.o random.o randomalloc.o pci.o \
- skip_spaces.o lib-cmdline.o lib-ctype.o
+ skip_spaces.o lib-cmdline.o lib-ctype.o \
+ alignedmem.o
# include the stub's generic dependencies from lib/ when building for ARM/arm64
efi-deps-y := fdt_rw.c fdt_ro.c fdt_wip.c fdt.c fdt_empty_tree.c fdt_sw.c