Commit 61de13df authored by Ard Biesheuvel's avatar Ard Biesheuvel Committed by Borislav Petkov

x86/boot/compressed: Only build mem_encrypt.S if AMD_MEM_ENCRYPT=y

Avoid building the mem_encrypt.o object if memory encryption support is
not enabled to begin with.
Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/20221122161017.2426828-17-ardb@kernel.org
parent 30c9ca16
...@@ -100,7 +100,7 @@ vmlinux-objs-$(CONFIG_RANDOMIZE_BASE) += $(obj)/kaslr.o ...@@ -100,7 +100,7 @@ vmlinux-objs-$(CONFIG_RANDOMIZE_BASE) += $(obj)/kaslr.o
ifdef CONFIG_X86_64 ifdef CONFIG_X86_64
vmlinux-objs-y += $(obj)/ident_map_64.o vmlinux-objs-y += $(obj)/ident_map_64.o
vmlinux-objs-y += $(obj)/idt_64.o $(obj)/idt_handlers_64.o vmlinux-objs-y += $(obj)/idt_64.o $(obj)/idt_handlers_64.o
vmlinux-objs-y += $(obj)/mem_encrypt.o vmlinux-objs-$(CONFIG_AMD_MEM_ENCRYPT) += $(obj)/mem_encrypt.o
vmlinux-objs-y += $(obj)/pgtable_64.o vmlinux-objs-y += $(obj)/pgtable_64.o
vmlinux-objs-$(CONFIG_AMD_MEM_ENCRYPT) += $(obj)/sev.o vmlinux-objs-$(CONFIG_AMD_MEM_ENCRYPT) += $(obj)/sev.o
endif endif
......
...@@ -307,7 +307,6 @@ SYM_FUNC_END(startup32_check_sev_cbit) ...@@ -307,7 +307,6 @@ SYM_FUNC_END(startup32_check_sev_cbit)
.data .data
#ifdef CONFIG_AMD_MEM_ENCRYPT
.balign 8 .balign 8
SYM_DATA(sme_me_mask, .quad 0) SYM_DATA(sme_me_mask, .quad 0)
SYM_DATA(sev_status, .quad 0) SYM_DATA(sev_status, .quad 0)
...@@ -323,4 +322,3 @@ SYM_DATA_START_LOCAL(boot32_idt_desc) ...@@ -323,4 +322,3 @@ SYM_DATA_START_LOCAL(boot32_idt_desc)
.word . - boot32_idt - 1 .word . - boot32_idt - 1
.long 0 .long 0
SYM_DATA_END(boot32_idt_desc) SYM_DATA_END(boot32_idt_desc)
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment